public x3dFillProperties() { Filled = true; HatchColor = new SFColor(1, 1, 1); Hatched = true; HatchStyle = 1; }
public x3dLocalFog() { Color=new SFColor(1, 1, 1); Enabled=true; FogType="LINEAR";// ["LINEAR"|"EXPONENTIAL"] VisibilityRange=0; }
public void GreenComponent() { var a = new SFColor(); a.Green = 1.0f; Assert.AreEqual(a.Green, 1.0f); try { a.Green = 1.1f; Assert.Fail(); } catch (ArgumentOutOfRangeException) { } try { a.Green = -0.001f; Assert.Fail(); } catch (ArgumentOutOfRangeException) { } }
public x3dFillProperties() { Filled=true; HatchColor=new SFColor(1, 1, 1); Hatched=true; HatchStyle=1; }
public x3dLocalFog() { Color = new SFColor(1, 1, 1); Enabled = true; FogType = "LINEAR";// ["LINEAR"|"EXPONENTIAL"] VisibilityRange = 0; }
public x3dMultiTexture() { Alpha = 1; Color = new SFColor(1, 1, 1); Function = new List <string>(); Mode = new List <string>(); Source = new List <string>(); Texture = new List <X3DTextureNode>(); }
public x3dMaterial() { AmbientIntensity = 0.2; DiffuseColor = new SFColor(0.8, 0.8, 0.8); EmissiveColor = new SFColor(0, 0, 0); Shininess = 0.2; SpecularColor = new SFColor(0, 0, 0); Transparency = 0; }
public void visit(MFColor field) { field.clearValues(); ParseMField((subcontext) => { var child = new SFColor(); this.visit(child); field.AppendValue(child); }); }
public x3dDirectionalLight() { AmbientIntensity=0; Color=new SFColor(1, 1, 1); Direction=new SFVec3f(0, 0, -1); Global=false; Intensity=1; On=true; }
public x3dDirectionalLight() { AmbientIntensity = 0; Color = new SFColor(1, 1, 1); Direction = new SFVec3f(0, 0, -1); Global = false; Intensity = 1; On = true; }
public x3dMaterial() { AmbientIntensity=0.2; DiffuseColor=new SFColor(0.8, 0.8, 0.8); EmissiveColor=new SFColor(0, 0, 0); Shininess=0.2; SpecularColor=new SFColor(0, 0, 0); Transparency=0; }
public x3dPointLight() { AmbientIntensity=0; Attenuation=new SFVec3f(1, 0, 0); Color=new SFColor(1, 1, 1); Global=true; Intensity=1; Location=new SFVec3f(0, 0, 0); On=true; Radius=100; }
public x3dPointLight() { AmbientIntensity = 0; Attenuation = new SFVec3f(1, 0, 0); Color = new SFColor(1, 1, 1); Global = true; Intensity = 1; Location = new SFVec3f(0, 0, 0); On = true; Radius = 100; }
public void Constructor() { var a = new SFColor(); var b = new SFColor(1.0f, 1.0f, 1.0f); Assert.AreEqual(a.Red, 0.0f); Assert.AreEqual(a.Green, 0.0f); Assert.AreEqual(a.Blue, 0.0f); Assert.AreEqual(b.Red, 1.0f); Assert.AreEqual(b.Green, 1.0f); Assert.AreEqual(b.Blue, 1.0f); }
public x3dSpotLight() { AmbientIntensity=0; Attenuation=new SFVec3f(1, 0, 0); BeamWidth=Math.PI/4; Color=new SFColor(1, 1, 1); CutOffAngle=Math.PI/2; Direction=new SFVec3f(0, 0, -1); Global=true; Intensity=1; Location=new SFVec3f(0, 0, 0); On=true; Radius=100; }
public x3dSpotLight() { AmbientIntensity = 0; Attenuation = new SFVec3f(1, 0, 0); BeamWidth = Math.PI / 4; Color = new SFColor(1, 1, 1); CutOffAngle = Math.PI / 2; Direction = new SFVec3f(0, 0, -1); Global = true; Intensity = 1; Location = new SFVec3f(0, 0, 0); On = true; Radius = 100; }
public x3dTwoSidedMaterial() { AmbientIntensity = 0.2; BackAmbientIntensity = 0.2; BackDiffuseColor = new SFColor(0.8, 0.8, 0.8); BackEmissiveColor = new SFColor(0, 0, 0); BackShininess = 0.2; BackSpecularColor = new SFColor(0, 0, 0); BackTransparency = 0; DiffuseColor = new SFColor(0.8, 0.8, 0.8); EmissiveColor = new SFColor(0, 0, 0); Shininess = 0.2; SeparateBackColor = false; SpecularColor = new SFColor(0, 0, 0); Transparency = 0; }
public x3dTwoSidedMaterial() { AmbientIntensity=0.2; BackAmbientIntensity=0.2; BackDiffuseColor=new SFColor(0.8, 0.8, 0.8); BackEmissiveColor=new SFColor(0, 0, 0); BackShininess=0.2; BackSpecularColor=new SFColor(0, 0, 0); BackTransparency=0; DiffuseColor=new SFColor(0.8, 0.8, 0.8); EmissiveColor=new SFColor(0, 0, 0); Shininess=0.2; SeparateBackColor=false; SpecularColor=new SFColor(0, 0, 0); Transparency=0; }
internal SFColor ParseSFColorValue() { // float float float try { SFColor ret = new SFColor(); ret.Red = ParseDoubleValue(); ret.Green = ParseDoubleValue(); ret.Blue = ParseDoubleValue(); return(ret); } catch (UserCancellationException) { throw; } catch (Exception ex) { ErrorParsingField(VRMLReaderError.SFColorInvalid, ex); } return(null); }
public void visit(SFColor field) { field.Red = context.ReadFloat(); field.Green = context.ReadFloat(); field.Blue = context.ReadFloat(); }
public void Visit(SFColor field) { throw new NotImplementedException(); }
public x3dFog() { Color = new SFColor(1, 1, 1); FogType = "LINEAR"; VisibilityRange = 0; }
internal SFColor ParseSFColorValue() { // float float float try { SFColor ret=new SFColor(); ret.Red=ParseDoubleValue(); ret.Green=ParseDoubleValue(); ret.Blue=ParseDoubleValue(); return ret; } catch(UserCancellationException) { throw; } catch(Exception ex) { ErrorParsingField(VRMLReaderError.SFColorInvalid, ex); } return null; }
public void Visit(SFColor field) { field.R = m_context.ReadFloat(); field.G = m_context.ReadFloat(); field.B = m_context.ReadFloat(); }
private static void AreEqual(SFColor expected, SFColor actual, string path) { Assert.AreEqual(expected.Red, actual.Red, $"{path}/Red"); Assert.AreEqual(expected.Green, actual.Green, $"{path}/Green"); Assert.AreEqual(expected.Blue, actual.Blue, $"{path}/Blue"); }
public x3dFog() { Color=new SFColor(1, 1, 1); FogType="LINEAR"; VisibilityRange=0; }
private PreciseColor TestConvColor(SFColor color) { return new PreciseColor(color.red, color.green, color.blue); }