Represents a implementation of the Rhino material

Constructors

GH_Material

#
public GH_Material()

GH_Material

#
public GH_Material(Color diffuse)
Create a new material based on a colour. The colour is used to control Diffuse, Emission and Transparency. Ambient, Specular and Shine are always default.
diffuse (Color)The diffuse colour of the material.

GH_Material

#
public GH_Material(DisplayMaterial material)
Create a new Material.
material (DisplayMaterial)Material to use (an internal copy will be made).

GH_Material

#
public GH_Material(GH_Material other)
Copy another GH_Material instance.
other (GH_Material)Material to mimic.

GH_Material

#
public GH_Material(Guid rdkId)
Create a new Material from an RDK material ID.
rdkId (Guid)ID of RDK material.

GH_Material

#
public GH_Material(RenderMaterial material)
Create a new Material.
material (RenderMaterial)Material to use (an internal copy will be made).

GH_Material

#
public GH_Material(string rdkXml)
Create a new Material from an RDK xml string.
rdkXml (string)Xml of RDK material.

Fields

m_value

protected T m_value
inherited fromGH_Goo<T>

Properties

IsValid

#
public override bool IsValid { get; }

IsValidWhyNot

#
public override string IsValidWhyNot { get; }
Gets a string describing the state of "invalidness". If the instance is valid, then this property should return Nothing or String.Empty.

RdkMaterialId

#
public Guid RdkMaterialId { get; set; }
Gets or sets the RDK material ID this material is associated with.

RdkMaterialRmtl

#
public string RdkMaterialRmtl { get; set; }
Gets or sets the RDK material RMTL file path.

RdkMaterialXml

#
public string RdkMaterialXml { get; set; }
Gets or sets the RDK material Xml string.

Type

#
public GH_Material.MaterialType Type { get; }
Gets the implied type based on what fields have been assigned.

TypeDescription

#
public override string TypeDescription { get; }

TypeName

#
public override string TypeName { get; }

Value

public virtual T Value { get; set; }
Gets or sets the internal data.
inherited fromGH_Goo<T>

Methods

CastFrom

#
public override bool CastFrom(object source)
source (object)

CastTo<T>

#
public override bool CastTo<T>(ref T target)
target (ref T)
GH_Goo<T>.CastTo

CreateRhinoMaterial

#
public static Material CreateRhinoMaterial(Color colour)
Creates a standard Rhino material from a colour.
colour (Color)Base colour for material.

CreateStandardMaterial

#
public static DisplayMaterial CreateStandardMaterial(Color colour)
Creates a standard Grasshopper material from a colour.
colour (Color)Base colour for material.

Duplicate

#
public override IGH_Goo Duplicate()
Duplicate this material.
An exact duplicate of this material.

DuplicateMaterial

#
public GH_Material DuplicateMaterial()
Duplicate this material.
An exact duplicate of this material.

EmitProxy

#
public override IGH_GooProxy EmitProxy()

MaterialBestGuess

#
public RenderMaterial MaterialBestGuess()
Gets the best guess RenderMaterial for this shader.
Material which best describes this shader.

Read

#
public override bool Read(GH_IReader reader)
reader (GH_IReader)
GH_Goo<T>.Read

ScriptVariable

#
public override object ScriptVariable()

ToString

#
public override string ToString()

Write

#
public override bool Write(GH_IWriter writer)
writer (GH_IWriter)
GH_Goo<T>.Write