//---------------------------------------------------------------------------- void UIButtonBase::Load(InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); UIFrame::Load(source); PX2_VERSION_LOAD(source); source.ReadEnum(mButType); source.ReadAggregate(mNormalColor); source.ReadAggregate(mHoveredColor); source.ReadAggregate(mPressedColor); source.ReadAggregate(mDisableColor); source.Read(mNormalAlpha); source.Read(mHoveredAlpha); source.Read(mPressedAlpha); source.Read(mDisableAlpha); source.Read(mNormalBrightness); source.Read(mHoveredBrightness); source.Read(mPressedBrightness); source.Read(mDisableBrightness); source.ReadPointer(mPicBoxNormal); source.ReadPointer(mPicBoxOver); source.ReadPointer(mPicBoxDown); source.ReadPointer(mPicBoxDisabled); source.ReadEnum(mButtonState); PX2_END_DEBUG_STREAM_LOAD(UIButtonBase, 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 UIAnimPicBox::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); UIPicBox::Load(source); source.ReadPointer(mAPBCtrl); source.ReadString(mFrameTexPack); source.Read(mIntervalTime); int numAnim = 0; source.Read(numAnim); mElements.resize(numAnim); for (int i=0; i<numAnim; i++) { source.Read(mElements[i].Index); source.ReadAggregate(mElements[i].UV0); source.ReadAggregate(mElements[i].UV1); source.ReadAggregate(mElements[i].UV2); source.ReadAggregate(mElements[i].UV3); source.ReadPointer(mElements[i].Tex); } PX2_END_DEBUG_STREAM_LOAD(UIAnimPicBox, source); }
//---------------------------------------------------------------------------- void RawTerrain::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Node::Load(source); source.ReadEnum(mMode); source.Read(mNumRows); source.Read(mNumCols); source.Read(mSize); source.Read(mMinElevation); source.Read(mMaxElevation); source.Read(mSpacing); source.Read(mCameraRow); source.Read(mCameraCol); source.ReadPointer(mVFormat); source.ReadPointer(mCamera); source.ReadPointer(mShine); mPages = new2<RawTerrainPagePtr>(mNumCols, mNumRows); for (int row = 0; row < mNumRows; ++row) { for (int col = 0; col < mNumCols; ++col) { source.ReadPointer(mPages[row][col]); } } PX2_END_DEBUG_STREAM_LOAD(RawTerrain, source); }
//---------------------------------------------------------------------------- void Scene::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Netable::Load(source); source.Read<int>(mSceneID); source.ReadPointer(mSceneNode); int numActors; source.Read(numActors); if (numActors > 0) { mActors.resize(numActors); source.ReadPointerVV(numActors, &mActors[0]); } source.ReadPointer(mTerrainActor); source.ReadPointer(mDefaultLight); source.ReadPointer(mDefaultCameraActor); source.ReadPointer(mDefaultARActor); PX2_END_DEBUG_STREAM_LOAD(Scene, source); }
//---------------------------------------------------------------------------- void UI::Load(InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); UIFrame::Load(source); PX2_VERSION_LOAD(source); source.ReadPointer(mDefaultCamera); source.ReadPointer(mDefaultCameraNode); PX2_END_DEBUG_STREAM_LOAD(UI, source); }
//---------------------------------------------------------------------------- void RawTerrainPage::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); TriMesh::Load(source); source.Read(mSize); int numVertices = mSize*mSize; source.ReadVR(numVertices, mHeights); source.ReadAggregate(mOrigin); source.Read(mSpacing); mSizeM1 = mSize - 1; mInvSpacing = 1.0f/mSpacing; source.ReadPointer(mMaterialInstance); source.ReadPointer(mTextureDefault); source.ReadPointer(mTexture0); source.ReadPointer(mTextureAlpha); source.ReadPointer(mTexture1); source.ReadPointer(mTexture2); source.ReadPointer(mTexture3); source.ReadPointer(mTexture4); source.ReadAggregate(mUV01); source.ReadAggregate(mUV23); source.ReadAggregate(mUV4); source.ReadPointer(mUV01Float); source.ReadPointer(mUV23Float); source.ReadPointer(mUV4Float); PX2_END_DEBUG_STREAM_LOAD(RawTerrainPage, source); }
//---------------------------------------------------------------------------- void Renderable::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Movable::Load(source); source.ReadEnum(mType); source.ReadAggregate(mModelBound); source.ReadPointer(mVFormat); source.ReadPointer(mVBuffer); source.ReadPointer(mIBuffer); source.ReadPointer(mMaterial); PX2_END_DEBUG_STREAM_LOAD(Renderable, source); }
//---------------------------------------------------------------------------- void Visual::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Spatial::Load(source); source.ReadEnum(mType); source.ReadAggregate(mModelBound); source.ReadPointer(mVFormat); source.ReadPointer(mVBuffer); source.ReadPointer(mIBuffer); source.ReadPointer(mEffect); WM5_END_DEBUG_STREAM_LOAD(Visual, source); }
//---------------------------------------------------------------------------- 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 SkyActor::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Actor::Load(source); source.ReadPointer(mSky); PX2_END_DEBUG_STREAM_LOAD(SkyActor, 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 SMShadowEffect::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); GlobalEffect::Load(source); source.ReadPointer(mInstance); WM5_END_DEBUG_STREAM_LOAD(SMShadowEffect, source); }
//---------------------------------------------------------------------------- void BillboardNode::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Node::Load(source); source.ReadPointer(mCamera); WM5_END_DEBUG_STREAM_LOAD(BillboardNode, source); }
//---------------------------------------------------------------------------- void ProjectorWorldPositionConstant::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); ShaderFloat::Load(source); source.ReadPointer(mProjector); WM5_END_DEBUG_STREAM_LOAD(ProjectorWorldPositionConstant, source); }
//---------------------------------------------------------------------------- void LightSpecularConstant::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); ShaderFloat::Load(source); source.ReadPointer(mLight); WM5_END_DEBUG_STREAM_LOAD(LightSpecularConstant, source); }
//---------------------------------------------------------------------------- void LightNode::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); Node::Load(source); source.ReadPointer(mLight); WM5_END_DEBUG_STREAM_LOAD(LightNode, source); }
//---------------------------------------------------------------------------- void BlendedTerrainEffect::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); VisualEffect::Load(source); source.ReadPointer(mBlendTexture); WM5_END_DEBUG_STREAM_LOAD(BlendedTerrainEffect, source); }
//---------------------------------------------------------------------------- void LightAmbientConstant::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); ShaderFloat::Load(source); source.ReadPointer(mLight); PX2_END_DEBUG_STREAM_LOAD(LightAmbientConstant, source); }
//---------------------------------------------------------------------------- void MaterialEmissiveConstant::Load (InStream& source) { WM5_BEGIN_DEBUG_STREAM_LOAD(source); ShaderFloat::Load(source); source.ReadPointer(mMaterial); WM5_END_DEBUG_STREAM_LOAD(MaterialEmissiveConstant, source); }
//---------------------------------------------------------------------------- void RawTerrain::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Terrain::Load(source); source.ReadPointer(mVFormat); mPages = new2<RawTerrainPagePtr>(mNumCols, mNumRows); for (int row = 0; row < mNumRows; ++row) { for (int col = 0; col < mNumCols; ++col) { source.ReadPointer(mPages[row][col]); } } source.ReadPointer(mShine); PX2_END_DEBUG_STREAM_LOAD(RawTerrain, source); }
//---------------------------------------------------------------------------- void UIFText::Load(InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); UIFrame::Load(source); PX2_VERSION_LOAD(source); source.ReadPointer(mText); PX2_END_DEBUG_STREAM_LOAD(UIFText, source); }
//---------------------------------------------------------------------------- void LightNode::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Node::Load(source); PX2_VERSION_LOAD(source); source.ReadPointer(mLight); PX2_END_DEBUG_STREAM_LOAD(LightNode, source); }
//---------------------------------------------------------------------------- void ShineDiffuseConstant::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); ShaderFloat::Load(source); PX2_VERSION_LOAD(source); source.ReadPointer(mShine); PX2_END_DEBUG_STREAM_LOAD(ShineDiffuseConstant, 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 ShaderParameters::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); Object::Load(source); source.ReadPointer(mShader); source.ReadPointerRR(mNumConstants, mConstants); source.ReadPointerRR(mNumTextures, mTextures); PX2_END_DEBUG_STREAM_LOAD(ShaderParameters, 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 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 ClodMesh::Load (InStream& source) { PX2_BEGIN_DEBUG_STREAM_LOAD(source); TriMesh::Load(source); PX2_VERSION_LOAD(source); source.Read(mCurrentRecord); source.Read(mTargetRecord); source.ReadPointer(mRecordArray); PX2_END_DEBUG_STREAM_LOAD(ClodMesh, source); }