Class XbimColour
Represents a Colour in the model
Inheritance
Inherited Members
Namespace: Xbim.Ifc
Assembly: Xbim.Ifc.dll
Syntax
public class XbimColour
Constructors
| Improve this Doc View SourceXbimColour()
Default constructor
Declaration
public XbimColour()
XbimColour(Single, Single, Single, Single, Single, Single, Single, Single, Single)
Declaration
public XbimColour(float red, float green, float blue, float alpha = 1F, float diffuseFactor = 1F, float transmissionFactor = 1F, float diffuseTransmissionFactor = 1F, float reflectionFactor = 0F, float specularFactor = 0F)
Parameters
Type | Name | Description |
---|---|---|
System.Single | red | |
System.Single | green | |
System.Single | blue | |
System.Single | alpha | |
System.Single | diffuseFactor | |
System.Single | transmissionFactor | |
System.Single | diffuseTransmissionFactor | |
System.Single | reflectionFactor | |
System.Single | specularFactor |
XbimColour(String, Double, Double, Double, Double)
Declaration
public XbimColour(string name, double red, double green, double blue, double alpha = 1)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Material Name |
System.Double | red | Red Value in range 0.0 to 1.0 |
System.Double | green | Green Value in range 0.0 to 1.0 |
System.Double | blue | Blue Value in range 0.0 to 1.0 |
System.Double | alpha | Alpha Value in range 0.0 to 1.0 |
XbimColour(String, Single, Single, Single, Single)
Constructor for Material
Declaration
public XbimColour(string name, float red, float green, float blue, float alpha = 1F)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Material Name |
System.Single | red | Red component Value (range 0 to 1.0 inclusive) |
System.Single | green | Green Value (range 0 to 1.0 inclusive) |
System.Single | blue | Blue Value (range 0 to 1.0 inclusive) |
System.Single | alpha | Alpha Value (range 0 to 1.0 inclusive) |
XbimColour(IIfcColourRgb, Double, Double, Double, Double, Double)
Declaration
public XbimColour(IIfcColourRgb ifcColourRgb, double opacity = 1, double diffuseFactor = 1, double specularFactor = 0, double transmissionFactor = 1, double reflectanceFactor = 0)
Parameters
Type | Name | Description |
---|---|---|
IIfcColourRgb | ifcColourRgb | |
System.Double | opacity | |
System.Double | diffuseFactor | |
System.Double | specularFactor | |
System.Double | transmissionFactor | |
System.Double | reflectanceFactor |
XbimColour(IIfcSurfaceStyle)
Declaration
public XbimColour(IIfcSurfaceStyle style)
Parameters
Type | Name | Description |
---|---|---|
IIfcSurfaceStyle | style |
Fields
| Improve this Doc View SourceDefaultColour
Declaration
public static readonly XbimColour DefaultColour
Field Value
Type | Description |
---|---|
XbimColour |
DiffuseFactor
Declaration
public readonly float DiffuseFactor
Field Value
Type | Description |
---|---|
System.Single |
DiffuseTransmissionFactor
Declaration
public float DiffuseTransmissionFactor
Field Value
Type | Description |
---|---|
System.Single |
ReflectionFactor
Declaration
public readonly float ReflectionFactor
Field Value
Type | Description |
---|---|
System.Single |
SpecularFactor
Declaration
public readonly float SpecularFactor
Field Value
Type | Description |
---|---|
System.Single |
TransmissionFactor
Declaration
public readonly float TransmissionFactor
Field Value
Type | Description |
---|---|
System.Single |
Properties
| Improve this Doc View SourceAlpha
Gets or sets transparency component Value in range from 0.0 to 1.0. A value of 0.0 is completely transparent. A value of 1.0 makes the colour fully opaque
Declaration
public float Alpha { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Blue
Gets or sets Blue component Value in range from 0.0 to 1.0
Declaration
public float Blue { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Green
Gets or sets Green component Value in range from 0.0 to 1.0
Declaration
public float Green { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
IsTransparent
True if the cuolour is not opaque
Declaration
public bool IsTransparent { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Gets or sets Colour Name, defaults to its parts
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Red
Gets or sets Red component Value in range from 0.0 to 1.0
Declaration
public float Red { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
| Improve this Doc View SourceEquals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
FromHSV(String, Double, Double, Double)
Creates a colour from Hue, Saturation and Value
Declaration
public static XbimColour FromHSV(string name, double hue, double saturation, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Color name |
System.Double | hue | range 0..360 |
System.Double | saturation | range 0..1 |
System.Double | value | range 0..1 |
Returns
Type | Description |
---|---|
XbimColour |
FromString(String)
Declaration
public static XbimColour FromString(string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
XbimColour |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ToString()
Returns a System.String that represents the value of this instance, ignoring the name.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance; it can be used for persistence across invariante cultures if the name is not needed. |