コード例 #1
0
ファイル: Wm5CullState.cpp プロジェクト: Kiichi77/WildMagic
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #3
0
ファイル: Wm5DepthState.cpp プロジェクト: Kiichi77/WildMagic
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #5
0
ファイル: Wm5OffsetState.cpp プロジェクト: bhlzlx/WildMagic
//----------------------------------------------------------------------------
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);
}
コード例 #6
0
//----------------------------------------------------------------------------
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);
}
コード例 #7
0
ファイル: PX2Terrain.cpp プロジェクト: manyxu/Phoenix3D_2.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);
}
コード例 #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);
}
コード例 #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);
}
コード例 #10
0
ファイル: PX2Movable.cpp プロジェクト: ascetic85/Phoenix3d
//----------------------------------------------------------------------------
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);
}
コード例 #11
0
ファイル: PX2Actor.cpp プロジェクト: manyxu/Phoenix3D_2.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);
}
コード例 #12
0
ファイル: Wm5Spatial.cpp プロジェクト: Kiichi77/WildMagic
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #14
0
//----------------------------------------------------------------------------
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);
}
コード例 #15
0
ファイル: Wm5ShaderFloat.cpp プロジェクト: Kiichi77/WildMagic
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #17
0
ファイル: Wm5Polysegment.cpp プロジェクト: fishxz/omni-bot
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #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);
}
コード例 #20
0
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #22
0
ファイル: Wm5SurfacePatch.cpp プロジェクト: fishxz/omni-bot
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #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);
}
コード例 #25
0
ファイル: Wm5Controller.cpp プロジェクト: fishxz/omni-bot
//----------------------------------------------------------------------------
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);
}
コード例 #26
0
ファイル: Wm5StencilState.cpp プロジェクト: bhlzlx/WildMagic
//----------------------------------------------------------------------------
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);
}
コード例 #27
0
ファイル: Wm5Portal.cpp プロジェクト: rasslingcats/calico
//----------------------------------------------------------------------------
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);
}
コード例 #28
0
//----------------------------------------------------------------------------
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);
}
コード例 #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);
}
コード例 #30
0
ファイル: Wm5Shader.cpp プロジェクト: bhlzlx/WildMagic
//----------------------------------------------------------------------------
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);
}