//---------------------------------------------------------------------------- void Jungler::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); TriMesh::Load(source); PX2_VERSION_LOAD(source); source.ReadEnum(mJunglerType); source.Read(mMaxNum); source.ReadPointer(mMtlInst); source.ReadPointer(mTexture); int num = 0; source.Read(num); if (num > 0) { mPoses.resize(num); mNormals.resize(num); mWidths.resize(num); mHeights.resize(num); source.ReadAggregateVV(num, &mPoses[0]); source.ReadAggregateVV(num, &mNormals[0]); source.ReadVV(num, &mWidths[0]); source.ReadVV(num, &mHeights[0]); } PX2_END_DEBUG_STREAM_LOAD(Jungler, source); }
//---------------------------------------------------------------------------- void SkinController::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Controller::Load(source); PX2_VERSION_LOAD(source); source.Read(mNumVertices); source.Read(mNumBones); int numWeightsOffsets = mNumVertices*mNumBones; mWeights = new2<float>(mNumBones, mNumVertices); mOffsets = new2<APoint>(mNumBones, mNumVertices); mTMMatrixs = new1<HMatrix>(mNumBones); source.ReadVV(numWeightsOffsets, mWeights[0]); source.ReadAggregateVV(numWeightsOffsets, mOffsets[0]); source.ReadPointerVR(mNumBones, mBones); source.ReadAggregateVV(mNumBones, mTMMatrixs); PX2_END_DEBUG_STREAM_LOAD(SkinController, source); }
//---------------------------------------------------------------------------- void MorphController::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Controller::Load(source); source.Read(mNumVertices); source.Read(mNumTargets); source.Read(mNumKeys); int numTotalVertices = mNumVertices*mNumTargets; mVertices = new2<APoint>(mNumVertices, mNumTargets); source.ReadAggregateVV(numTotalVertices, mVertices[0]); source.ReadVR(mNumKeys, mTimes); int numTotalWeights = mNumKeys*(mNumTargets - 1); mWeights = new2<float>(mNumTargets - 1, mNumKeys); source.ReadVV(numTotalWeights, mWeights[0]); WM5_END_DEBUG_STREAM_LOAD(MorphController, source); }