public override void Save(IAetherWriter writer) { base.Save(writer); writer.WriteFloat("InnerAngle", InnerAngle); writer.WriteFloat("OuterAngle", OuterAngle); writer.WriteVector3("Direction", Direction); }
public virtual void Save(IAetherWriter writer) { writer.WriteVector3("Position", Position); writer.WriteVector3("LightSourceColor", LightSourceColor); writer.WriteFloat("Intensity", Intensity); writer.WriteFloat("MaximumRadius", MaximumRadius); }
private void SaveSamplerStates(IAetherWriter writer, SamplerState[] samplerStates) { int samplerStateCount = samplerStates.Length; for (int i = 0; i < samplerStateCount; i++) { if (samplerStates[i] == null) { samplerStateCount = i; break; } } writer.WriteInt32("SamplerStateCount", samplerStateCount); for (int i = 0; i < samplerStateCount; i++) { SamplerState samplerState = samplerStates[i]; writer.WriteString("Name", samplerState.Name); writer.WriteInt64("AddressU", (int)samplerState.AddressU); writer.WriteInt64("AddressV", (int)samplerState.AddressV); writer.WriteInt64("AddressW", (int)samplerState.AddressW); writer.WriteInt64("Filter", (int)samplerState.Filter); writer.WriteInt64("MaxAnisotropy", samplerState.MaxAnisotropy); writer.WriteInt64("MaxMipLevel", samplerState.MaxMipLevel); writer.WriteFloat("MipMapLevelOfDetailBias", samplerState.MipMapLevelOfDetailBias); } }
private void WriteDirectionalLight(IAetherWriter writer, string name, DirectionalLightData directionalLight) { writer.WriteVector3(name + "DiffuseColor", directionalLight.DiffuseColor); writer.WriteVector3(name + "SpecularColor", directionalLight.SpecularColor); writer.WriteVector3(name + "Direction", directionalLight.Direction); writer.WriteBoolean(name + "Enabled", directionalLight.Enabled); }
public virtual void Save(IAetherWriter writer) { writer.WriteInt64("PrimitiveType", (int)PrimitiveType); SaveBlendState(writer, this.BlendState); SaveDepthStencilState(writer, this.DepthStencilState); SaveRasterizerState(writer, this.RasterizerState); SaveSamplerStates(writer, this.SamplerStates); }
public override void Save(IAetherWriter writer) { base.Save(writer); writer.WriteVector3("DiffuseColor", DiffuseColor); writer.WriteFloat("Alpha", Alpha); writer.WriteInt64("ReferenceAlpha", ReferenceAlpha); writer.WriteBoolean("VertexColorEnabled", VertexColorEnabled); }
public void Save(IAetherWriter writer) { writer.WriteInt32("Version", 1); writer.WriteVector3("Position", this._position); writer.WriteQuaternion("Rotation", _rotation); writer.WriteVector3("Scale", _scale); writer.WriteParticle("Material", (IAether)Material); }
public virtual void Save(IAetherWriter writer) { writer.WriteVector3("Position", _position); writer.WriteVector3("LookAt", _lookAt); writer.WriteVector3("Up", _up); writer.WriteFloat("NearPlane", _nearPlane); writer.WriteFloat("FarPlane", _farPlane); }
public override void Save(IAetherWriter writer) { writer.WriteInt32("Version", 1); base.Save(writer); // TODO: add IAetherWriter.WriteParticles(string, new ISet<T>) writer.WriteParticles("VisibleParticles", new List <IPhotonNode>(_visibleParticles)); }
public virtual void Save(IAetherWriter writer) { writer.Write("EngineData", (IAetherSerialization)EngineData); //write particles writer.WriteParticles("Particles", particles); //write managers writer.WriteParticleManagers("Managers", Managers); }
public override void Save(IAetherWriter writer) { base.Save(writer); //write root if (Root is IAetherSerialization) { writer.Write("Root", (IAetherSerialization)Root); } }
private void SaveRasterizerState(IAetherWriter writer, RasterizerState rasterizerState) { writer.WriteString("Name", rasterizerState.Name); writer.WriteInt64("CullMode", (int)rasterizerState.CullMode); writer.WriteFloat("DepthBias", rasterizerState.DepthBias); writer.WriteInt64("FillMode", (int)rasterizerState.FillMode); writer.WriteBoolean("MultiSampleAntiAlias", rasterizerState.MultiSampleAntiAlias); writer.WriteBoolean("ScissorTestEnable", rasterizerState.ScissorTestEnable); writer.WriteFloat("SlopeScaleDepthBias", rasterizerState.SlopeScaleDepthBias); }
public override void Save(IAetherWriter writer) { base.Save(writer); writer.WriteVector3("DiffuseColor", DiffuseColor); writer.WriteVector3("AmbientLightColor", AmbientLightColor); writer.WriteVector3("EmissiveColor", EmissiveColor); WriteDirectionalLight(writer, "DirectionalLight0", DirectionalLight0); WriteDirectionalLight(writer, "DirectionalLight1", DirectionalLight1); WriteDirectionalLight(writer, "DirectionalLight2", DirectionalLight2); writer.WriteFloat("Alpha", Alpha); writer.WriteInt64("LightingEnabled", WeightsPerVertex); }
public override void Save(IAetherWriter writer) { base.Save(writer); writer.WriteVector3("DiffuseColor", DiffuseColor); writer.WriteVector3("AmbientLightColor", AmbientLightColor); writer.WriteVector3("EmissiveColor", EmissiveColor); WriteDirectionalLight(writer, "DirectionalLight0", DirectionalLight0); WriteDirectionalLight(writer, "DirectionalLight1", DirectionalLight1); WriteDirectionalLight(writer, "DirectionalLight2", DirectionalLight2); writer.WriteFloat("Alpha", Alpha); writer.WriteFloat("EnvironmentMapAmount", EnvironmentMapAmount); writer.WriteVector3("EnvironmentMapSpecular", EnvironmentMapSpecular); writer.WriteFloat("FresnelFactor", FresnelFactor); }
public override void Save(IAetherWriter writer) { base.Save(writer); writer.WriteVector3("DiffuseColor", DiffuseColor); writer.WriteVector3("AmbientLightColor", AmbientLightColor); writer.WriteVector3("EmissiveColor", EmissiveColor); WriteDirectionalLight(writer, "DirectionalLight0", DirectionalLight0); WriteDirectionalLight(writer, "DirectionalLight1", DirectionalLight1); WriteDirectionalLight(writer, "DirectionalLight2", DirectionalLight2); writer.WriteFloat("Alpha", Alpha); writer.WriteBoolean("TextureEnabled", TextureEnabled); writer.WriteBoolean("VertexColorEnabled", VertexColorEnabled); writer.WriteBoolean("LightingEnabled", LightingEnabled); }
private void SaveBlendState(IAetherWriter writer, BlendState blendState) { writer.WriteString("Name", blendState.Name); writer.WriteString("BlendStateName", blendState.Name); writer.WriteInt64("AlphaBlendFunction", (int)blendState.AlphaBlendFunction); writer.WriteInt64("AlphaDestinationBlend", (int)blendState.AlphaDestinationBlend); writer.WriteInt64("AlphaSourceBlend", (int)blendState.AlphaSourceBlend); writer.WriteColor("BlendFactor", blendState.BlendFactor); writer.WriteInt64("ColorBlendFunction", (int)blendState.ColorBlendFunction); writer.WriteInt64("ColorDestinationBlend", (int)blendState.ColorDestinationBlend); writer.WriteInt64("ColorSourceBlend", (int)blendState.ColorSourceBlend); writer.WriteInt64("ColorWriteChannels", (int)blendState.ColorWriteChannels); writer.WriteInt64("ColorWriteChannels1", (int)blendState.ColorWriteChannels1); writer.WriteInt64("ColorWriteChannels2", (int)blendState.ColorWriteChannels2); writer.WriteInt64("ColorWriteChannels3", (int)blendState.ColorWriteChannels3); writer.WriteInt64("MultiSampleMask", (int)blendState.MultiSampleMask); }
private void SaveDepthStencilState(IAetherWriter writer, DepthStencilState depthStencilState) { writer.WriteString("Name", depthStencilState.Name); writer.WriteInt64("CounterClockwiseStencilDepthBufferFail", (int)depthStencilState.CounterClockwiseStencilDepthBufferFail); writer.WriteInt64("CounterClockwiseStencilFail", (int)depthStencilState.CounterClockwiseStencilFail); writer.WriteInt64("CounterClockwiseStencilFunction", (int)depthStencilState.CounterClockwiseStencilFunction); writer.WriteInt64("CounterClockwiseStencilPass", (int)depthStencilState.CounterClockwiseStencilPass); writer.WriteBoolean("DepthBufferEnable", depthStencilState.DepthBufferEnable); writer.WriteInt64("DepthBufferFunction", (int)depthStencilState.DepthBufferFunction); writer.WriteBoolean("DepthBufferWriteEnable", depthStencilState.DepthBufferWriteEnable); writer.WriteInt64("ReferenceStencil", depthStencilState.ReferenceStencil); writer.WriteInt64("StencilDepthBufferFail", (int)depthStencilState.StencilDepthBufferFail); writer.WriteBoolean("StencilEnable", depthStencilState.StencilEnable); writer.WriteInt64("StencilFail", (int)depthStencilState.StencilFail); writer.WriteInt64("StencilFunction", (int)depthStencilState.StencilFunction); writer.WriteInt64("StencilMask", depthStencilState.StencilMask); writer.WriteInt64("StencilPass", (int)depthStencilState.StencilPass); writer.WriteInt64("StencilWriteMask", depthStencilState.StencilWriteMask); writer.WriteBoolean("TwoSidedStencilMode", depthStencilState.TwoSidedStencilMode); }
public virtual void Save(IAetherWriter writer) { writer.WriteInt32("Version", 1); writer.WriteParticles("Particles", this); }
public void Save(IAetherWriter writer) { writer.WriteUInt64("UniqueIdCounter", UniqueIdCounter); writer.Write("NextUniqueId", NextUniqueID); writer.WriteDouble("TotalTime", TotalTime); }
public virtual void Save(IAetherWriter writer) { //write particles writer.WriteParticles("Particles", particles); }
public override void Save(IAetherWriter writer) { writer.WriteInt32("Version", 1); base.Save(writer); }
public override void Save(IAetherWriter writer) { base.Save(writer); writer.WriteFloat("FieldOfView", _fieldOfView); }
public void Save(IAetherWriter writer) { writer.WriteGuid(uid); }