Search Results for

    Show / Hide Table of Contents

    Class XbimColour

    Represents a Colour in the model

    Inheritance
    System.Object
    XbimColour
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Xbim.Ifc
    Assembly: Xbim.Ifc.dll
    Syntax
    public class XbimColour

    Constructors

    | Improve this Doc View Source

    XbimColour()

    Default constructor

    Declaration
    public XbimColour()
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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)

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    XbimColour(IIfcSurfaceStyle)

    Declaration
    public XbimColour(IIfcSurfaceStyle style)
    Parameters
    Type Name Description
    IIfcSurfaceStyle style

    Fields

    | Improve this Doc View Source

    DefaultColour

    Declaration
    public static readonly XbimColour DefaultColour
    Field Value
    Type Description
    XbimColour
    | Improve this Doc View Source

    DiffuseFactor

    Declaration
    public readonly float DiffuseFactor
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    DiffuseTransmissionFactor

    Declaration
    public float DiffuseTransmissionFactor
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    ReflectionFactor

    Declaration
    public readonly float ReflectionFactor
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    SpecularFactor

    Declaration
    public readonly float SpecularFactor
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    TransmissionFactor

    Declaration
    public readonly float TransmissionFactor
    Field Value
    Type Description
    System.Single

    Properties

    | Improve this Doc View Source

    Alpha

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    IsTransparent

    True if the cuolour is not opaque

    Declaration
    public bool IsTransparent { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Name

    Gets or sets Colour Name, defaults to its parts

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    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 Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    FromString(String)

    Declaration
    public static XbimColour FromString(string source)
    Parameters
    Type Name Description
    System.String source
    Returns
    Type Description
    XbimColour
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    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.

    Overrides
    System.Object.ToString()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 xbim