internal XbimColour(IfcColourRgb rgbColour) { this.Red = (float)(double)rgbColour.Red; this.Green = (float)(double)rgbColour.Green; this.Blue = (float)(double)rgbColour.Blue; this.Alpha = 1; // this.Name = string.Format("{0},A={1},D={2},S={3},T={4},R={5},RGB={6}", rgbColour.Name, Alpha, DiffuseFactor, SpecularFactor, TransmissionFactor, ReflectionFactor, rgbColour.EntityLabel); }
public XbimColour(IfcColourRgb ifcColourRgb, double opacity = 1.0, double diffuseFactor = 1.0 , double specularFactor = 0.0, double transmissionFactor = 1.0, double reflectanceFactor = 0.0) : this(ifcColourRgb) { this.Alpha = (float)opacity; this.DiffuseFactor = (float)diffuseFactor; this.SpecularFactor = (float)specularFactor; this.TransmissionFactor = (float)transmissionFactor; this.ReflectionFactor = (float)reflectanceFactor; }
public virtual void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _diffuseTransmissionColour = (IfcColourRgb) value.EntityVal; break; case 1: _diffuseReflectionColour = (IfcColourRgb) value.EntityVal; break; case 2: _transmissionColour = (IfcColourRgb) value.EntityVal; break; case 3: _reflectanceColour = (IfcColourRgb) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public XbimTexture CreateTexture(IfcColourRgb colour) { DefinedObjectId = (int)colour.EntityLabel; ColourMap.Clear(); ColourMap.Add(new XbimColour(colour)); return this; }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: base.IfcParse(propIndex, value); break; case 4: _Position = (IfcAxis2Placement3D)value.EntityVal; break; case 5: _ColourAppearance = (IfcColourRgb)value.EntityVal; break; case 6: _ColourTemperature = value.RealVal; break; case 7: _LuminousFlux = value.RealVal; break; case 8: _LightEmissionSource = (IfcLightEmissionSourceEnum)Enum.Parse(typeof(IfcLightEmissionSourceEnum), value.EnumVal); break; case 9: _LightDistributionDataSource = (IfcLightDistributionDataSourceSelect)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _Name = value.StringVal; break; case 1: _LightColour = (IfcColourRgb)value.EntityVal; break; case 2: _AmbientIntensity = value.RealVal; break; case 3: _Intensity = value.RealVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public virtual void IfcParse(int propIndex, IPropertyValue value) { if (propIndex == 0) _surfaceColour = (IfcColourRgb) value.EntityVal; else this.HandleUnexpectedAttribute(propIndex, value); }
public XbimTexture CreateTexture(IfcColourRgb colour) { ColourMap.Clear(); ColourMap.Add(new XbimColour(colour)); return this; }