Exemplo n.º 1
0
//----------------------------------------------------------------------------
void CullState::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteBool(Enabled);
    target.WriteBool(CCWOrder);

    WM5_END_DEBUG_STREAM_SAVE(CullState, target);
}
Exemplo n.º 2
0
//----------------------------------------------------------------------------
void DepthProperty::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);

	target.WriteBool(Enabled);
	target.WriteBool(Writable);
	target.WriteEnum(Compare);

	PX2_END_DEBUG_STREAM_SAVE(DepthProperty, target);
}
Exemplo n.º 3
0
//----------------------------------------------------------------------------
void DepthState::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteBool(Enabled);
    target.WriteBool(Writable);
    target.WriteEnum(Compare);

    WM5_END_DEBUG_STREAM_SAVE(DepthState, target);
}
Exemplo n.º 4
0
//----------------------------------------------------------------------------
void OffsetProperty::Save (OutStream& target) const
{
    PX2_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteBool(FillEnabled);
    target.WriteBool(LineEnabled);
    target.WriteBool(PointEnabled);
    target.Write(Scale);
    target.Write(Bias);

    PX2_END_DEBUG_STREAM_SAVE(OffsetProperty, target);
}
Exemplo n.º 5
0
//----------------------------------------------------------------------------
void OffsetState::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);

	target.WriteBool(FillEnabled);
	target.WriteBool(LineEnabled);
	target.WriteBool(PointEnabled);
	target.Write(Scale);
	target.Write(Bias);

	WM5_END_DEBUG_STREAM_SAVE(OffsetState, target);
}
//----------------------------------------------------------------------------
void BlendTransformController::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	TransformController::Save(target);

	target.WritePointer(mController0);
	target.WritePointer(mController1);
	target.Write(mWeight);
	target.WriteBool(mRSMatrices);
	target.WriteBool(mGeometricRotation);
	target.WriteBool(mGeometricScale);

	WM5_END_DEBUG_STREAM_SAVE(BlendTransformController, target);
}
Exemplo n.º 7
0
//----------------------------------------------------------------------------
void Terrain::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Node::Save(target);

	target.Write(mNumRows);
	target.Write(mNumCols);
	target.Write(mSize);
	target.Write(mMinElevation);
	target.Write(mMaxElevation);
	target.Write(mSpacing);

	for (int row = 0; row < mNumRows; ++row)
	{
		for (int col = 0; col < mNumCols; ++col)
		{
			target.WritePointer(mPages[row][col]);
		}
	}

	target.WriteBool(mIsUseSimpleMtl);
	target.WritePointer(mVFormatEdit);
	target.WritePointer(mVFormatSimple);
	target.WritePointer(mMtlEdit);
	target.WritePointer(mMtlSimple);
	target.WritePointer(mShine);
	target.Write(mJunglerFrequency);
	target.Write(mJunglerStrength);

	PX2_END_DEBUG_STREAM_SAVE(Terrain, target);
}
Exemplo n.º 8
0
//----------------------------------------------------------------------------
void CurveMesh::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Polysegment::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mNumFullVertices);
	target.Write(mNumSegments);
	target.Write(mLevel);
	target.WriteBool(mAllowDynamicChange);
	target.WritePointer(mOrigVBuffer);
	target.WritePointer(mOrigParams);
	target.WritePointerN(mNumSegments, mSegments);

	if (mCInfo)
	{
		for (int i = 0; i < mNumFullVertices; ++i)
		{
			target.WritePointer(mCInfo[i].Segment);
			target.Write(mCInfo[i].Param);
		}
	}

	PX2_END_DEBUG_STREAM_SAVE(CurveMesh, target);
}
Exemplo n.º 9
0
//----------------------------------------------------------------------------
void Object::Save(OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	// 写入Rtti 名称
	target.WriteString(GetRttiType().GetName());

	// 写入Rtti version
	target.Write(TYPE.GetVersion());

	// 写入ID
	target.WriteUniqueID(this);

	//是否有效
	target.WriteBool(mIsEnable);

	// 资源路径
	target.WriteString(mResourcePath);

	// 写入对象名称
	target.WriteString(mName);
	target.Write(mID);

	PX2_END_DEBUG_STREAM_SAVE(Object, target);
}
Exemplo n.º 10
0
//----------------------------------------------------------------------------
void Movable::Save (OutStream& target) const
{
    PX2_BEGIN_DEBUG_STREAM_SAVE(target);

    Controlledable::Save(target);

    target.WriteAggregate(LocalTransform);
    target.WriteAggregate(WorldTransform);
    target.WriteBool(WorldTransformIsCurrent);
    target.WriteAggregate(WorldBound);
    target.WriteBool(WorldBoundIsCurrent);
    target.WriteEnum(Culling);

	// mParent不被保存,它会在Node::Link中调用Node::SetChild被设置。

    PX2_END_DEBUG_STREAM_SAVE(Movable, target);
}
Exemplo n.º 11
0
//----------------------------------------------------------------------------
void Actor::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Netable::Save(target);

	target.WriteAggregate(mScale);
	target.WriteAggregate(mRotation);
	target.WriteAggregate(mPosition);
	target.WriteBool(mVisible);
	target.Write(mTransAlpha);
	target.WritePointer(mMovable);
	target.WritePointer(mHelpMovable);
	target.WriteBool(mShowHelpMovable);

	PX2_END_DEBUG_STREAM_SAVE(Actor, target);
}
Exemplo n.º 12
0
//----------------------------------------------------------------------------
void Spatial::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    ControlledObject::Save(target);

    target.WriteAggregate(LocalTransform);
    target.WriteAggregate(WorldTransform);
    target.WriteBool(WorldTransformIsCurrent);
    target.WriteAggregate(WorldBound);
    target.WriteBool(WorldBoundIsCurrent);
    target.WriteEnum(Culling);

    // mParent is not saved.  On load, it will be set in Node::Link when the
    // child pointers of the Node are resolved by Node::SetChild.

    WM5_END_DEBUG_STREAM_SAVE(Spatial, target);
}
Exemplo n.º 13
0
//----------------------------------------------------------------------------
void LODTerrain::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Terrain::Save(target);

	target.Write(mPixelTolerance);
	target.WriteBool(mIsCloseAssumption);

	PX2_END_DEBUG_STREAM_SAVE(LODTerrain, target);
}
//----------------------------------------------------------------------------
void InterpCurveTranslateController::Save (OutStream& target) const
{
    PX2_BEGIN_DEBUG_STREAM_SAVE(target);

    InterpCurveFloat3Controller::Save(target);
    PX2_VERSION_SAVE(target);

    target.WriteBool(mIsWorld);

    PX2_END_DEBUG_STREAM_SAVE(InterpCurveTranslateController, target);
}
Exemplo n.º 15
0
//----------------------------------------------------------------------------
void ShaderFloat::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteW(mNumElements, mData);
    target.WriteBool(mAllowUpdater);

    WM5_END_DEBUG_STREAM_SAVE(ShaderFloat, target);
}
Exemplo n.º 16
0
//----------------------------------------------------------------------------
void RenderTarget::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mNumTargets);
	target.Write(mWidth);
	target.Write(mHeight);
	target.Write(mHasMipmaps);
	target.WriteBool(mHasDepthStencil);
	target.WriteBool(mIsOnlyDepth16NoStencil);

	target.WritePointerN(mNumTargets, mColorTextures);
	target.WritePointer(mDepthStencilTexture);
	target.WriteBool(mHasMipmaps);

	PX2_END_DEBUG_STREAM_SAVE(RenderTarget, target);
}
Exemplo n.º 17
0
//----------------------------------------------------------------------------
void Polysegment::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Visual::Save(target);

    target.Write(mNumSegments);
    target.WriteBool(mContiguous);

    WM5_END_DEBUG_STREAM_SAVE(Polysegment, target);
}
Exemplo n.º 18
0
//----------------------------------------------------------------------------
void LightConstant::Save(OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	ShaderFloat::Save(target);
	PX2_VERSION_SAVE(target);

	target.WritePointer(mLight);
	target.WriteBool(mIsDefualtDir);

	PX2_END_DEBUG_STREAM_SAVE(LightConstant, target);
}
Exemplo n.º 19
0
//----------------------------------------------------------------------------
void RenderTarget::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WritePointerW(mNumTargets, mColorTextures);
    target.WritePointer(mDepthStencilTexture);
    target.WriteBool(mHasMipmaps);

    WM5_END_DEBUG_STREAM_SAVE(RenderTarget, target);
}
//----------------------------------------------------------------------------
void ProjectorMatrixConstant::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	ShaderFloat::Save(target);
	PX2_VERSION_SAVE(target);

	target.WritePointer(mProjector);
	target.WriteBool(mBiased);

	PX2_END_DEBUG_STREAM_SAVE(ProjectorMatrixConstant, target);
}
Exemplo n.º 21
0
//----------------------------------------------------------------------------
void TerrainActor::Save(OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Actor::Save(target);
	PX2_VERSION_SAVE(target);

	target.WriteBool(mIsUseLOD);
	target.WritePointer(mRawTerrain); 
	target.WritePointer(mLODTerrain);

	PX2_END_DEBUG_STREAM_SAVE(TerrainActor, target);
}
Exemplo n.º 22
0
//----------------------------------------------------------------------------
void SurfacePatch::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.Write(mUMin);
    target.Write(mUMax);
    target.Write(mVMin);
    target.Write(mVMax);
    target.WriteBool(mRectangular);

    WM5_END_DEBUG_STREAM_SAVE(SurfacePatch, target);
}
Exemplo n.º 23
0
//----------------------------------------------------------------------------
void UIInputText::Save(OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	UIText::Save(target);
	PX2_VERSION_SAVE(target);

	target.WriteBool(mIsPassword);
	target.WriteString(mRealText);

	target.Write(mFixedWidth);

	PX2_END_DEBUG_STREAM_SAVE(UIInputText, target);
}
Exemplo n.º 24
0
//----------------------------------------------------------------------------
void UIGridFrame::Save(OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	UIFrame::Save(target);
	PX2_VERSION_SAVE(target);

	target.WriteBool(mIsBagFrameNeedUpdate);
	target.WriteEnum(mAlignItemType);
	target.WriteAggregate(mItemSize);
	target.WriteAggregate(mAlignItemNum);

	PX2_END_DEBUG_STREAM_SAVE(UIGridFrame, target);
}
Exemplo n.º 25
0
//----------------------------------------------------------------------------
void Controller::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteEnum(Repeat);
    target.Write(MinTime);
    target.Write(MaxTime);
    target.Write(Phase);
    target.Write(Frequency);
    target.WriteBool(Active);
    target.WritePointer(mObject);

    WM5_END_DEBUG_STREAM_SAVE(Controller, target);
}
Exemplo n.º 26
0
//----------------------------------------------------------------------------
void StencilState::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);

	target.WriteBool(Enabled);
	target.WriteEnum(Compare);
	target.Write(Reference);
	target.Write(Mask);
	target.Write(WriteMask);
	target.WriteEnum(OnFail);
	target.WriteEnum(OnZFail);
	target.WriteEnum(OnZPass);

	WM5_END_DEBUG_STREAM_SAVE(StencilState, target);
}
Exemplo n.º 27
0
//----------------------------------------------------------------------------
void Portal::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteW(mNumVertices, mModelVertices);
    target.WriteAggregate(mModelPlane);
    target.WriteBool(Open);
    target.WritePointer(AdjacentRegion);

    // World vertices are computed form model vertices in the update call,
    // so no need to save them.  The world plane is also computed in the
    // update call, so no need to save it.

    WM5_END_DEBUG_STREAM_SAVE(Portal, target);
}
//----------------------------------------------------------------------------
void TriggerActor::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Actor::Save(target);
	PX2_VERSION_SAVE(target);

	target.WriteBool(mEnable);
	target.WriteEnum(mAreaType);
	target.Write(mBox.Min[0]);
	target.Write(mBox.Min[1]);
	target.Write(mBox.Min[2]);
	target.Write(mBox.Max[0]);
	target.Write(mBox.Max[1]);
	target.Write(mBox.Max[2]);
	target.WriteAggregate<Vector3f>(mSphere.Center);
	target.Write(mSphere.Radius);

	PX2_END_DEBUG_STREAM_SAVE(TriggerActor, target);
}
Exemplo n.º 29
0
//----------------------------------------------------------------------------
void MaterialInstance::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);
	PX2_VERSION_SAVE(target);

	target.WriteBool(mIsShareMtl);

	target.WriteString(mMaterialFilename);
	target.WriteString(mInstanceTechName);

	target.WritePointer(mMaterial);
	target.Write(mTechniqueIndex);

	target.WritePointerW(mNumPasses, mVertexParameters);
	target.WritePointerN(mNumPasses, mPixelParameters);

	PX2_END_DEBUG_STREAM_SAVE(MaterialInstance, target);
}
Exemplo n.º 30
0
//----------------------------------------------------------------------------
void Shader::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);

	target.WriteStringW(mNumInputs, mInputName);
	target.WriteEnumN(mNumInputs, mInputType);
	target.WriteEnumN(mNumInputs, mInputSemantic);
	target.WriteStringW(mNumOutputs, mOutputName);
	target.WriteEnumN(mNumOutputs, mOutputType);
	target.WriteEnumN(mNumOutputs, mOutputSemantic);
	target.WriteStringW(mNumConstants, mConstantName);
	target.WriteN(mNumConstants, mNumRegistersUsed);
	target.WriteStringW(mNumSamplers, mSamplerName);
	target.WriteEnumN(mNumSamplers, mSamplerType);
	target.WriteEnumN(mNumSamplers, mFilter);
	target.WriteEnumN(mNumSamplers, mCoordinate[0]);
	target.WriteEnumN(mNumSamplers, mCoordinate[1]);
	target.WriteEnumN(mNumSamplers, mCoordinate[2]);
	target.WriteN(mNumSamplers, mLodBias);
	target.WriteN(mNumSamplers, mAnisotropy);
	target.WriteAggregateN(mNumSamplers, mBorderColor);

	// On load, test this against MAX_PROFILES just in case a user increases
	// MAX_PROFILES and tries to load old data sets.
	target.Write((int)MAX_PROFILES);
	target.WriteBool(mProfileOwner);
	if (mProfileOwner)
	{
		for (int i = 0; i < MAX_PROFILES; ++i)
		{
			target.WriteN(mNumConstants, mBaseRegister[i]);
			target.WriteN(mNumSamplers, mTextureUnit[i]);
			target.WriteString(*mProgram[i]);
		}
	}

	WM5_END_DEBUG_STREAM_SAVE(Shader, target);
}