예제 #1
0
//----------------------------------------------------------------------------
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);
}
예제 #2
0
//----------------------------------------------------------------------------
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);
}
예제 #3
0
//----------------------------------------------------------------------------
void Light::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Object::Load(source);

	source.ReadEnum(mType);
	source.ReadAggregate(Ambient);
	source.ReadAggregate(Diffuse);
	source.ReadAggregate(Specular);
	source.Read(Constant);
	source.Read(Linear);
	source.Read(Quadratic);
	source.Read(Intensity);
	source.Read(Angle);
	source.Read(CosAngle);
	source.Read(SinAngle);
	source.Read(Exponent);
	source.ReadAggregate(Position);
	source.ReadAggregate(DVector);
	source.ReadAggregate(UVector);
	source.ReadAggregate(RVector);

	PX2_END_DEBUG_STREAM_LOAD(Light, source);
}
예제 #4
0
//----------------------------------------------------------------------------
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);
}
예제 #5
0
//----------------------------------------------------------------------------
void BspNode::Load (InStream& source)
{
    WM5_BEGIN_DEBUG_STREAM_LOAD(source);

    Node::Load(source);

    source.ReadAggregate(ModelPlane);
    source.ReadAggregate(mWorldPlane);

    WM5_END_DEBUG_STREAM_LOAD(BspNode, source);
}
예제 #6
0
//----------------------------------------------------------------------------
void Shine::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Object::Load(source);

	source.ReadAggregate(Emissive);
	source.ReadAggregate(Ambient);
	source.ReadAggregate(Diffuse);
	source.ReadAggregate(Specular);

	PX2_END_DEBUG_STREAM_LOAD(Shine, source);
}
예제 #7
0
//----------------------------------------------------------------------------
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 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);
}
예제 #9
0
//----------------------------------------------------------------------------
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);
}
예제 #10
0
//----------------------------------------------------------------------------
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);
}
예제 #11
0
//----------------------------------------------------------------------------
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 InputPushTransformController::Load(InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	PushTransformController::Load(source);
	PX2_VERSION_LOAD(source);

	source.ReadAggregate(mLockDir);
	source.Read(mPushTriggerSpeed);

	PX2_END_DEBUG_STREAM_LOAD(InputPushTransformController, source);
}
//----------------------------------------------------------------------------
void PushTransformController::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Controller::Load(source);
	PX2_VERSION_LOAD(source);

	source.ReadEnum(mTransType);
	source.Read(mMaxVelocity);
	source.Read(mFriction);
	source.ReadAggregate(mVelocity);

	PX2_END_DEBUG_STREAM_LOAD(PushTransformController, source);
}
예제 #14
0
//----------------------------------------------------------------------------
void DlodNode::Load (InStream& source)
{
    PX2_BEGIN_DEBUG_STREAM_LOAD(source);

    SwitchNode::Load(source);

    source.ReadAggregate(mModelLodCenter);
    source.ReadRR(mNumLevelsOfDetail, mModelMinDist);
    source.ReadVR(mNumLevelsOfDetail, mModelMaxDist);
    source.ReadVR(mNumLevelsOfDetail, mWorldMinDist);
    source.ReadVR(mNumLevelsOfDetail, mWorldMaxDist);

    PX2_END_DEBUG_STREAM_LOAD(DlodNode, source);
}
예제 #15
0
//----------------------------------------------------------------------------
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);
}
예제 #16
0
//----------------------------------------------------------------------------
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);
}
예제 #17
0
//----------------------------------------------------------------------------
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 InterpCurveSpeedController::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	InterpCurveFloat3Controller::Load(source);
	PX2_VERSION_LOAD(source);

	source.Read(mMaxLength);

	if (1 == GetReadedVersion())
	{
		source.ReadAggregate(mInitPos);
	}

	PX2_END_DEBUG_STREAM_LOAD(InterpCurveSpeedController, source);
}
//----------------------------------------------------------------------------
void BoxSurface::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Node::Load(source);
	PX2_VERSION_LOAD(source);

	int numUCtrlPoints, numVCtrlPoints, numWCtrlPoints;
	int uDegree, vDegree, wDegree;
	source.Read(numUCtrlPoints);
	source.Read(numVCtrlPoints);
	source.Read(numWCtrlPoints);
	source.Read(uDegree);
	source.Read(vDegree);
	source.Read(wDegree);
	mVolume = new0 BSplineVolumef(numUCtrlPoints, numVCtrlPoints,
		numWCtrlPoints, uDegree, vDegree, wDegree);
	for (int u = 0; u < numUCtrlPoints; ++u)
	{
		for (int v = 0; v < numVCtrlPoints; ++v)
		{
			for (int w = 0; w < numWCtrlPoints; ++w)
			{
				Vector3f ctrl;
				source.ReadAggregate(ctrl);
				mVolume->SetControlPoint(u, v, w, ctrl);
			}
		}
	}

	source.Read(mNumUSamples);
	source.Read(mNumVSamples);
	source.Read(mNumWSamples);
	source.ReadBool(mDoSort);

	PX2_END_DEBUG_STREAM_LOAD(BoxSurface, source);
}
//----------------------------------------------------------------------------
void RawTerrainPage::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	TerrainPage::Load(source);
	PX2_VERSION_LOAD(source);

	int readedVersion = GetReadedVersion();

	if (0 == readedVersion)
	{
		source.ReadPointer(mMtlInst);

		source.ReadPointer(mTextureDefault);
		mTextureDefaultFilename = mTextureDefault->GetResourcePath();

		source.ReadPointer(mTexture0);
		mTexture0Filename = mTexture0->GetResourcePath();

		source.ReadPointer(mTextureAlphaVersion0);

		source.ReadPointer(mTexture1);
		mTexture1Filename = mTexture1->GetResourcePath();

		source.ReadPointer(mTexture2);
		mTexture2Filename = mTexture2->GetResourcePath();

		source.ReadPointer(mTexture3);
		mTexture3Filename = mTexture3->GetResourcePath();

		source.ReadPointer(mTexture4);
		mTexture4Filename = mTexture4->GetResourcePath();

		source.ReadAggregate(mUV01);
		source.ReadAggregate(mUV23);
		source.ReadAggregate(mUV4);
		source.ReadPointer(mUV01Float);
		source.ReadPointer(mUV23Float);
		source.ReadPointer(mUV4Float);
	}
	else if (1 == readedVersion)
	{
		source.ReadPointer(mMtlInst);

		source.ReadString(mTextureDefaultFilename);
		source.ReadString(mTexture0Filename);

		source.ReadPointer(mTextureAlpha);

		source.ReadString(mTexture1Filename);
		source.ReadString(mTexture2Filename);
		source.ReadString(mTexture3Filename);
		source.ReadString(mTexture4Filename);

		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);
}