//---------------------------------------------------------------------------- void CullState::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadBool(Enabled); source.ReadBool(CCWOrder); WM5_END_DEBUG_STREAM_LOAD(CullState, source); }
//---------------------------------------------------------------------------- void DepthProperty::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadBool(Enabled); source.ReadBool(Writable); source.ReadEnum(Compare); PX2_END_DEBUG_STREAM_LOAD(DepthProperty, source); }
//---------------------------------------------------------------------------- void DepthState::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadBool(Enabled); source.ReadBool(Writable); source.ReadEnum(Compare); WM5_END_DEBUG_STREAM_LOAD(DepthState, source); }
//---------------------------------------------------------------------------- void OffsetProperty::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadBool(FillEnabled); source.ReadBool(LineEnabled); source.ReadBool(PointEnabled); source.Read(Scale); source.Read(Bias); PX2_END_DEBUG_STREAM_LOAD(OffsetProperty, source); }
//---------------------------------------------------------------------------- void OffsetState::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadBool(FillEnabled); source.ReadBool(LineEnabled); source.ReadBool(PointEnabled); source.Read(Scale); source.Read(Bias); WM5_END_DEBUG_STREAM_LOAD(OffsetState, source); }
//---------------------------------------------------------------------------- void BlendTransformController::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); TransformController::Load(source); source.ReadPointer(mController0); source.ReadPointer(mController1); source.Read(mWeight); source.ReadBool(mRSMatrices); source.ReadBool(mGeometricRotation); source.ReadBool(mGeometricScale); WM5_END_DEBUG_STREAM_LOAD(BlendTransformController, source); }
//---------------------------------------------------------------------------- void Terrain::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Node::Load(source); PX2_VERSION_LOAD(source); source.Read(mNumRows); source.Read(mNumCols); source.Read(mSize); source.Read(mMinElevation); source.Read(mMaxElevation); source.Read(mSpacing); mPages = new2<TerrainPagePtr>(mNumCols, mNumRows); for (int row = 0; row < mNumRows; ++row) { for (int col = 0; col < mNumCols; ++col) { source.ReadPointer(mPages[row][col]); } } source.ReadBool(mIsUseSimpleMtl); source.ReadPointer(mVFormatEdit); source.ReadPointer(mVFormatSimple); source.ReadPointer(mMtlEdit); source.ReadPointer(mMtlSimple); source.ReadPointer(mShine); source.Read(mJunglerFrequency); source.Read(mJunglerStrength); PX2_END_DEBUG_STREAM_LOAD(Terrain, source); }
//---------------------------------------------------------------------------- void CurveMesh::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Polysegment::Load(source); PX2_VERSION_LOAD(source); source.Read(mNumFullVertices); source.Read(mNumSegments); source.Read(mLevel); source.ReadBool(mAllowDynamicChange); source.ReadPointer(mOrigVBuffer); source.ReadPointer(mOrigParams); bool locked = (mOrigVBuffer == 0); if (!locked) { source.ReadPointerVR(mNumSegments, mSegments); } if (mAllowDynamicChange) { mCInfo = new1<CurveInfo>(mNumFullVertices); for (int i = 0; i < mNumFullVertices; ++i) { source.ReadPointer(mCInfo[i].Segment); source.Read(mCInfo[i].Param); } } PX2_END_DEBUG_STREAM_LOAD(CurveMesh, source); }
//---------------------------------------------------------------------------- void Movable::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Controlledable::Load(source); source.ReadAggregate(LocalTransform); source.ReadAggregate(WorldTransform); source.ReadBool(WorldTransformIsCurrent); source.ReadAggregate(WorldBound); source.ReadBool(WorldBoundIsCurrent); source.ReadEnum(Culling); // mParent不被保存,它会在Node::Link中调用Node::SetChild被设置。 PX2_END_DEBUG_STREAM_LOAD(Movable, source); }
//---------------------------------------------------------------------------- void Spatial::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); ControlledObject::Load(source); source.ReadAggregate(LocalTransform); source.ReadAggregate(WorldTransform); source.ReadBool(WorldTransformIsCurrent); source.ReadAggregate(WorldBound); source.ReadBool(WorldBoundIsCurrent); source.ReadEnum(Culling); // mParent was not saved. It will be set in Node::Link when the child // pointers of the Node are resolved by Node::SetChild. WM5_END_DEBUG_STREAM_LOAD(Spatial, source); }
//---------------------------------------------------------------------------- void Actor::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Netable::Load(source); // mScene不被保存,它会在Scene::Link中调用Scene::AddChild被设置。 source.ReadAggregate(mScale); source.ReadAggregate(mRotation); source.ReadAggregate(mPosition); source.ReadBool(mVisible); source.Read(mTransAlpha); source.ReadPointer(mMovable); source.ReadPointer(mHelpMovable); source.ReadBool(mShowHelpMovable); PX2_END_DEBUG_STREAM_LOAD(Actor, source); }
//---------------------------------------------------------------------------- void WireState::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadBool(Enabled); WM5_END_DEBUG_STREAM_LOAD(WireState, source); }
//---------------------------------------------------------------------------- void Shader::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadStringRR(mNumInputs, mInputName); source.ReadEnumVR(mNumInputs, mInputType); source.ReadEnumVR(mNumInputs, mInputSemantic); source.ReadStringRR(mNumOutputs, mOutputName); source.ReadEnumVR(mNumOutputs, mOutputType); source.ReadEnumVR(mNumOutputs, mOutputSemantic); source.ReadStringRR(mNumConstants, mConstantName); source.ReadVR(mNumConstants, mNumRegistersUsed); source.ReadStringRR(mNumSamplers, mSamplerName); source.ReadEnumVR(mNumSamplers, mSamplerType); source.ReadEnumVR(mNumSamplers, mFilter); source.ReadEnumVR(mNumSamplers, mCoordinate[0]); source.ReadEnumVR(mNumSamplers, mCoordinate[1]); source.ReadEnumVR(mNumSamplers, mCoordinate[2]); source.ReadVR(mNumSamplers, mLodBias); source.ReadVR(mNumSamplers, mAnisotropy); source.ReadAggregateVR(mNumSamplers, mBorderColor); // Test for modified MAX_PROFILES. int maxProfiles; source.Read(maxProfiles); #ifdef WM5_ASSERT_ON_CHANGED_MAX_PROFILES assertion(maxProfiles == MAX_PROFILES, "You changed MAX_PROFILES and are loading an old data set.\n"); #endif source.ReadBool(mProfileOwner); if (mProfileOwner) { int i; for (i = 0; i < maxProfiles; ++i) { source.ReadVR(mNumConstants, mBaseRegister[i]); source.ReadVR(mNumSamplers, mTextureUnit[i]); mProgram[i] = new0 std::string(); source.ReadString(*mProgram[i]); } for (i = maxProfiles; i < MAX_PROFILES; ++i) { mBaseRegister[i] = 0; mTextureUnit[i] = 0; mProgram[i] = 0; } } WM5_END_DEBUG_STREAM_LOAD(Shader, source); }
//---------------------------------------------------------------------------- void LODTerrain::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Terrain::Load(source); source.Read(mPixelTolerance); source.ReadBool(mIsCloseAssumption); PX2_END_DEBUG_STREAM_LOAD(LODTerrain, source); }
//---------------------------------------------------------------------------- void InterpCurveTranslateController::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); InterpCurveFloat3Controller::Load(source); PX2_VERSION_LOAD(source); source.ReadBool(mIsWorld); PX2_END_DEBUG_STREAM_LOAD(InterpCurveTranslateController, source); }
//---------------------------------------------------------------------------- void RenderTarget::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); PX2_VERSION_LOAD(source); source.Read(mNumTargets); source.Read(mWidth); source.Read(mHeight); source.Read(mHasMipmaps); source.ReadBool(mHasDepthStencil); source.ReadBool(mIsOnlyDepth16NoStencil); source.ReadPointerVR(mNumTargets, mColorTextures); source.ReadPointer(mDepthStencilTexture); source.ReadBool(mHasMipmaps); PX2_END_DEBUG_STREAM_LOAD(RenderTarget, source); }
//---------------------------------------------------------------------------- void ShaderFloat::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadRR(mNumElements, mData); source.ReadBool(mAllowUpdater); WM5_END_DEBUG_STREAM_LOAD(ShaderFloat, source); }
//---------------------------------------------------------------------------- void Polysegment::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Visual::Load(source); source.Read(mNumSegments); source.ReadBool(mContiguous); WM5_END_DEBUG_STREAM_LOAD(Polysegment, source); }
//---------------------------------------------------------------------------- void ProjectorMatrixConstant::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); ShaderFloat::Load(source); PX2_VERSION_LOAD(source); source.ReadPointer(mProjector); source.ReadBool(mBiased); PX2_END_DEBUG_STREAM_LOAD(ProjectorMatrixConstant, source); }
//---------------------------------------------------------------------------- void LightConstant::Load(InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); ShaderFloat::Load(source); PX2_VERSION_LOAD(source); source.ReadPointer(mLight); source.ReadBool(mIsDefualtDir); PX2_END_DEBUG_STREAM_LOAD(LightConstant, source); }
//---------------------------------------------------------------------------- void RenderTarget::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadPointerRR(mNumTargets, mColorTextures); source.ReadPointer(mDepthStencilTexture); source.ReadBool(mHasMipmaps); WM5_END_DEBUG_STREAM_LOAD(RenderTarget, source); }
//---------------------------------------------------------------------------- void TerrainActor::Load(InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Actor::Load(source); PX2_VERSION_LOAD(source); source.ReadBool(mIsUseLOD); source.ReadPointer(mRawTerrain); source.ReadPointer(mLODTerrain); PX2_END_DEBUG_STREAM_LOAD(TerrainActor, source); }
//---------------------------------------------------------------------------- void SurfacePatch::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.Read(mUMin); source.Read(mUMax); source.Read(mVMin); source.Read(mVMax); source.ReadBool(mRectangular); WM5_END_DEBUG_STREAM_LOAD(SurfacePatch, source); }
//---------------------------------------------------------------------------- void UIGridFrame::Load(InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); UIFrame::Load(source); PX2_VERSION_LOAD(source); source.ReadBool(mIsBagFrameNeedUpdate); source.ReadEnum(mAlignItemType); source.ReadAggregate(mItemSize); source.ReadAggregate(mAlignItemNum); PX2_END_DEBUG_STREAM_LOAD(UIGridFrame, source); }
//---------------------------------------------------------------------------- void Portal::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadRR(mNumVertices, mModelVertices); source.ReadAggregate(mModelPlane); source.ReadBool(Open); source.ReadPointer(AdjacentRegion); mWorldVertices = new1<APoint>(mNumVertices); WM5_END_DEBUG_STREAM_LOAD(Portal, source); }
//---------------------------------------------------------------------------- void Controller::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadEnum(Repeat); source.Read(MinTime); source.Read(MaxTime); source.Read(Phase); source.Read(Frequency); source.ReadBool(Active); source.ReadPointer(mObject); mApplicationTime = -Mathd::MAX_REAL; PX2_END_DEBUG_STREAM_LOAD(Controller, source); }
//---------------------------------------------------------------------------- void StencilState::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadBool(Enabled); source.ReadEnum(Compare); source.Read(Reference); source.Read(Mask); source.Read(WriteMask); source.ReadEnum(OnFail); source.ReadEnum(OnZFail); source.ReadEnum(OnZPass); WM5_END_DEBUG_STREAM_LOAD(StencilState, source); }
//---------------------------------------------------------------------------- void UIInputText::Load(InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); UIText::Load(source); PX2_VERSION_LOAD(source); source.ReadBool(mIsPassword); source.ReadString(mRealText); int readedVersion = GetReadedVersion(); if (1 <= readedVersion) { source.Read(mFixedWidth); } PX2_END_DEBUG_STREAM_LOAD(UIInputText, source); }
//---------------------------------------------------------------------------- void RevolutionSurface::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); TriMesh::Load(source); source.Read(mXCenter); source.ReadEnum(mTopology); source.Read(mNumCurveSamples); source.Read(mNumRadialSamples); source.ReadVR(mNumRadialSamples + 1, mSin); source.ReadVR(mNumRadialSamples + 1, mCos); source.ReadBool(mSampleByArcLength); // TODO. See note in RevolutionSurface::Save. mCurve = 0; WM5_END_DEBUG_STREAM_LOAD(RevolutionSurface, source); }
//---------------------------------------------------------------------------- void MaterialInstance::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); PX2_VERSION_LOAD(source); source.ReadBool(mIsShareMtl); source.ReadString(mMaterialFilename); source.ReadString(mInstanceTechName); source.ReadPointer(mMaterial); source.Read(mTechniqueIndex); source.ReadPointerRR(mNumPasses, mVertexParameters); source.ReadPointerVR(mNumPasses, mPixelParameters); PX2_END_DEBUG_STREAM_LOAD(MaterialInstance, source); }