本文整理汇总了C++中LLDataPacker::packS32方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDataPacker::packS32方法的具体用法?C++ LLDataPacker::packS32怎么用?C++ LLDataPacker::packS32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLDataPacker
的用法示例。
在下文中一共展示了LLDataPacker::packS32方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: packParams
void LLTransferSourceParamsEstate::packParams(LLDataPacker &dp) const
{
dp.packUUID(mAgentID, "AgentID");
// *NOTE: We do not want to pass the session id from the server to
// the client, but I am not sure if anyone expects this value to
// be set on the client.
dp.packUUID(mSessionID, "SessionID");
dp.packS32(mEstateAssetType, "EstateAssetType");
}
示例2: serialize
BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
{
dp.packS32(GESTURE_VERSION, "version");
dp.packU8(mKey, "key");
dp.packU32(mMask, "mask");
dp.packString(mTrigger, "trigger");
dp.packString(mReplaceText, "replace");
S32 count = (S32)mSteps.size();
dp.packS32(count, "step_count");
S32 i;
for (i = 0; i < count; ++i)
{
LLGestureStep* step = mSteps[i];
dp.packS32(step->getType(), "step_type");
BOOL ok = step->serialize(dp);
if (!ok)
{
return FALSE;
}
}
return TRUE;
}
示例3: serialize
// writes contents to datapacker
BOOL LLBVHLoader::serialize(LLDataPacker& dp)
{
JointVector::iterator ji;
KeyVector::iterator ki;
F32 time;
// count number of non-ignored joints
S32 numJoints = 0;
for (ji=mJoints.begin(); ji!=mJoints.end(); ++ji)
{
Joint *joint = *ji;
if ( ! joint->mIgnore )
numJoints++;
}
// print header
dp.packU16(KEYFRAME_MOTION_VERSION, "version");
dp.packU16(KEYFRAME_MOTION_SUBVERSION, "sub_version");
dp.packS32(mPriority, "base_priority");
dp.packF32(mDuration, "duration");
dp.packString(mEmoteName, "emote_name");
dp.packF32(mLoopInPoint, "loop_in_point");
dp.packF32(mLoopOutPoint, "loop_out_point");
dp.packS32(mLoop, "loop");
dp.packF32(mEaseIn, "ease_in_duration");
dp.packF32(mEaseOut, "ease_out_duration");
dp.packU32(mHand, "hand_pose");
dp.packU32(numJoints, "num_joints");
for ( ji = mJoints.begin();
ji != mJoints.end();
++ji )
{
Joint *joint = *ji;
// if ignored, skip it
if ( joint->mIgnore )
continue;
LLQuaternion first_frame_rot;
LLQuaternion fixup_rot;
dp.packString(joint->mOutName, "joint_name");
dp.packS32(joint->mPriority, "joint_priority");
// compute coordinate frame rotation
LLQuaternion frameRot( joint->mFrameMatrix );
LLQuaternion frameRotInv = ~frameRot;
LLQuaternion offsetRot( joint->mOffsetMatrix );
// find mergechild and mergeparent joints, if specified
LLQuaternion mergeParentRot;
LLQuaternion mergeChildRot;
Joint *mergeParent = NULL;
Joint *mergeChild = NULL;
JointVector::iterator mji;
for (mji=mJoints.begin(); mji!=mJoints.end(); ++mji)
{
Joint *mjoint = *mji;
if ( !joint->mMergeParentName.empty() && (mjoint->mName == joint->mMergeParentName) )
{
mergeParent = *mji;
}
if ( !joint->mMergeChildName.empty() && (mjoint->mName == joint->mMergeChildName) )
{
mergeChild = *mji;
}
}
dp.packS32(joint->mNumRotKeys, "num_rot_keys");
LLQuaternion::Order order = bvhStringToOrder( joint->mOrder );
S32 outcount = 0;
S32 frame = 1;
for ( ki = joint->mKeys.begin();
ki != joint->mKeys.end();
++ki )
{
if ((frame == 1) && joint->mRelativeRotationKey)
{
first_frame_rot = mayaQ( ki->mRot[0], ki->mRot[1], ki->mRot[2], order);
fixup_rot.shortestArc(LLVector3::z_axis * first_frame_rot * frameRot, LLVector3::z_axis);
}
if (ki->mIgnoreRot)
{
frame++;
continue;
}
time = (F32)frame * mFrameTime;
if (mergeParent)
{
mergeParentRot = mayaQ( mergeParent->mKeys[frame-1].mRot[0],
mergeParent->mKeys[frame-1].mRot[1],
mergeParent->mKeys[frame-1].mRot[2],
//.........这里部分代码省略.........
示例4: packParams
void LLTransferSourceParamsAsset::packParams(LLDataPacker &dp) const
{
dp.packUUID(mAssetID, "AssetID");
dp.packS32(mAssetType, "AssetType");
}