//---------------------------------------------------------------------------- void Polyline::Load (Stream& rkStream, Stream::Link* pkLink) { Geometry::Load(rkStream,pkLink); // native data StreamReadBool(rkStream,m_bClosed); // support for drawing vertex arrays m_aiIndex = new int[m_iVertexQuantity]; for (int i = 0; i < m_iVertexQuantity; i++) m_aiIndex[i] = i; if ( rkStream.GetVersion() >= Version(1,6) ) StreamRead(rkStream,m_iActiveQuantity); else m_iActiveQuantity = m_iVertexQuantity; if ( rkStream.GetVersion() >= Version(1,7) ) StreamReadBool(rkStream,m_bContiguous); else m_bContiguous = true; }
//---------------------------------------------------------------------------- void LightNode::Load (Stream& rkStream, Stream::Link* pkLink) { Node::Load(rkStream,pkLink); if ( rkStream.GetVersion() >= Version(1,8) ) { StreamRead(rkStream,m_kLRotate); StreamRead(rkStream,m_kLTranslate); } else { m_kLRotate = Matrix3f::IDENTITY; m_kLTranslate = Vector3f::ZERO; } // link data Light* pkLight; StreamRead(rkStream,pkLight); pkLink->Add(pkLight); }
//---------------------------------------------------------------------------- void Texture::Load (Stream& rkStream, Stream::Link* pkLink) { Object::Load(rkStream,pkLink); // native data StreamReadEnum(rkStream,m_eCorrection); StreamReadEnum(rkStream,m_eApply); StreamRead(rkStream,m_kBlendColor); StreamReadEnum(rkStream,m_eWrap); StreamReadEnum(rkStream,m_eFilter); StreamReadEnum(rkStream,m_eMipmap); StreamRead(rkStream,m_fPriority); if ( rkStream.GetVersion() >= Version(1,3) ) { StreamReadEnum(rkStream,m_eEnvmap); StreamRead(rkStream,m_kBorderColor); StreamReadEnum(rkStream,m_eCombineFuncRGB); StreamReadEnum(rkStream,m_eCombineFuncAlpha); StreamReadEnum(rkStream,m_eCombineSrc0RGB); StreamReadEnum(rkStream,m_eCombineSrc1RGB); StreamReadEnum(rkStream,m_eCombineSrc2RGB); StreamReadEnum(rkStream,m_eCombineSrc0Alpha); StreamReadEnum(rkStream,m_eCombineSrc1Alpha); StreamReadEnum(rkStream,m_eCombineSrc2Alpha); StreamReadEnum(rkStream,m_eCombineOp0RGB); StreamReadEnum(rkStream,m_eCombineOp1RGB); StreamReadEnum(rkStream,m_eCombineOp2RGB); StreamReadEnum(rkStream,m_eCombineOp0Alpha); StreamReadEnum(rkStream,m_eCombineOp1Alpha); StreamReadEnum(rkStream,m_eCombineOp2Alpha); StreamReadEnum(rkStream,m_eCombineScaleRGB); StreamReadEnum(rkStream,m_eCombineScaleAlpha); } // link data Image* pkImage; StreamRead(rkStream,pkImage); pkLink->Add(pkImage); }
//---------------------------------------------------------------------------- void ParticleController::Load (Stream& rkStream, Stream::Link* pkLink) { Controller::Load(rkStream,pkLink); // NOTE. ParticleController was derived from PointController. The // PointController::Save wrote various quantities to disk that are now // managed by ParticleController. These quantities are written to disk // in the same order, so no special handling must occur here based on the // stream version number. // native data StreamRead(rkStream,m_fSystemLinearSpeed); StreamRead(rkStream,m_fSystemAngularSpeed); StreamRead(rkStream,m_kSystemLinearAxis); StreamRead(rkStream,m_kSystemAngularAxis); int iVertexQuantity; StreamRead(rkStream,iVertexQuantity); Reallocate(iVertexQuantity); StreamRead(rkStream,m_afPointLinearSpeed,iVertexQuantity); StreamRead(rkStream,m_afPointAngularSpeed,iVertexQuantity); StreamRead(rkStream,m_akPointLinearAxis,iVertexQuantity); StreamRead(rkStream,m_akPointAngularAxis,iVertexQuantity); StreamRead(rkStream,m_fSystemSizeChange); if ( rkStream.GetVersion() < Version(1,4) ) { // The vertex quantity had been written to disk twice, once by // PointController and once by ParticleController. Read it and // discard since it was loaded above. int iDiscard; StreamRead(rkStream,iDiscard); } StreamRead(rkStream,m_afPointSizeChange,iVertexQuantity); }