/// <summary> /// Serializes this SpotLight. /// </summary> /// <param name="output">Output to be written to</param> public override void Write(Content.ISavableWriter output) { base.Write(output); output.Write("LightType", (int)_lightType); output.Write("Direction", _direction); output.Write("Position", _position); output.Write("InnerAngle", _innerAngle); output.Write("OuterAngle", _outerAngle); }
/// <summary> /// Serializes the object and writes it to the output. /// </summary> /// <param name="output">Savable Output</param> public override void Write(Content.ISavableWriter output) { output.WriteEnum <BlendFunction>("AlphaBlendFunction", _impl.AlphaBlendFunction); output.WriteEnum <Blend>("AlphaSourceBlend", _impl.AlphaSourceBlend); output.WriteEnum <Blend>("AlphaDestinationBlend", _impl.AlphaDestinationBlend); output.WriteEnum <BlendFunction>("ColorBlendFunction", _impl.ColorBlendFunction); output.WriteEnum <Blend>("ColorSourceBlend", _impl.ColorSourceBlend); output.WriteEnum <Blend>("ColorDestinationBlend", _impl.ColorDestinationBlend); output.Write("BlendFactor", _impl.BlendFactor); output.Write("MultiSampleMask", _impl.MultiSampleMask); int numBlends = _impl.BlendEnableCount; int numMasks = _impl.ColorWriteChannelsCount; output.Write("BlendEnableCount", numBlends); for (int i = 0; i < numBlends; i++) { output.Write(string.Format("BlendEnable{0}", i.ToString()), _impl.GetBlendEnable(i)); } output.Write("ColorWriteChannelsCount", numMasks); for (int i = 0; i < numMasks; i++) { output.Write(string.Format("ColorWriteMask{0}", i.ToString()), (int)_impl.GetWriteChannels(i)); } }
/// <summary> /// Serializes the object and writes it to the output. /// </summary> /// <param name="output">Savable Output</param> public override void Write(Content.ISavableWriter output) { output.Write("DepthEnable", _impl.DepthEnable); output.Write("DepthWriteEnable", _impl.DepthWriteEnable); output.WriteEnum <ComparisonFunction>("DepthFunction", _impl.DepthFunction); output.Write("StencilEnable", _impl.StencilEnable); output.Write("ReferenceStencil", _impl.ReferenceStencil); output.WriteEnum <ComparisonFunction>("CounterClockwiseStencilFunction", _impl.CounterClockwiseStencilFunction); output.WriteEnum <StencilOperation>("CounterClockwiseStencilDepthFail", _impl.CounterClockwiseStencilDepthFail); output.WriteEnum <StencilOperation>("CounterClockwiseStencilFail", _impl.CounterClockwiseStencilFail); output.WriteEnum <StencilOperation>("CounterClockwiseStencilPass", _impl.CounterClockwiseStencilPass); output.WriteEnum <ComparisonFunction>("StencilFunction", _impl.StencilFunction); output.WriteEnum <StencilOperation>("StencilDepthFail", _impl.StencilDepthFail); output.WriteEnum <StencilOperation>("StencilFail", _impl.StencilFail); output.WriteEnum <StencilOperation>("StencilPass", _impl.StencilPass); output.Write("TwoSidedStencilEnable", _impl.TwoSidedStencilEnable); output.Write("StencilReadMask", _impl.StencilReadMask); output.Write("StencilWriteMask", _impl.StencilWriteMask); }
/// <summary> /// Serializes this PointLight. /// </summary> /// <param name="output">Output to be written to</param> public override void Write(Content.ISavableWriter output) { base.Write(output); output.Write("LightType", (int)_lightType); output.Write("Position", _position); }
/// <summary> /// Serializes this BoundingSphere. /// </summary> /// <param name="output">Output to write to</param> public override void Write(Content.ISavableWriter output) { base.Write(output); output.Write("Radius", m_radius); }