//----------------------------------------------------------------------------
void TerrainPage::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	TriMesh::Load(source);
	PX2_VERSION_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;

	int numJunglers = 0;
	source.Read(numJunglers);
	if (numJunglers > 0)
	{
		mJunglers.resize(numJunglers);
		source.ReadPointerVV(numJunglers, &mJunglers[0]);
	}

	PX2_END_DEBUG_STREAM_LOAD(TerrainPage, source);
}
Beispiel #2
0
//----------------------------------------------------------------------------
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 VisualTechnique::Load (InStream& source)
{
    WM5_BEGIN_DEBUG_STREAM_LOAD(source);

    Object::Load(source);

    int numPasses;
    source.Read(numPasses);
    mPasses.resize(numPasses);
    source.ReadPointerVV(numPasses, &mPasses[0]);

    WM5_END_DEBUG_STREAM_LOAD(VisualTechnique, source);
}
Beispiel #4
0
//----------------------------------------------------------------------------
void Material::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Object::Load(source);
	PX2_VERSION_LOAD(source);

	int numTechniques;
	source.Read(numTechniques);
	mTechniques.resize(numTechniques);
	source.ReadPointerVV(numTechniques, &mTechniques[0]);

	PX2_END_DEBUG_STREAM_LOAD(Material, source);
}
Beispiel #5
0
//----------------------------------------------------------------------------
void Node::Load (InStream& source)
{
    PX2_BEGIN_DEBUG_STREAM_LOAD(source);

    Movable::Load(source);

    int numChildren;
    source.Read(numChildren);
    if (numChildren > 0)
    {
        mChild.resize(numChildren);
        source.ReadPointerVV(numChildren, &mChild[0]);
    }

    PX2_END_DEBUG_STREAM_LOAD(Node, source);
}