本文整理汇总了C++中LLDataPacker::packString方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDataPacker::packString方法的具体用法?C++ LLDataPacker::packString怎么用?C++ LLDataPacker::packString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLDataPacker
的用法示例。
在下文中一共展示了LLDataPacker::packString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serialize
BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const
{
dp.packString(mSoundName, "sound_name");
dp.packUUID(mSoundAssetID, "asset_id");
dp.packU32(mFlags, "flags");
return TRUE;
}
示例2: 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],
//.........这里部分代码省略.........
示例3: packParams
void LLTransferSourceParamsFile::packParams(LLDataPacker &dp) const
{
dp.packString(mFilename, "Filename");
dp.packU8((U8)mDeleteOnCompletion, "Delete");
}