Click or drag to resize

GrasshopperDisplayMaterial Class

Inheritance Hierarchy
SystemObject
  Rhino.DisplayGrasshopperDisplayMaterial

Namespace:  Rhino.Display
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public class GrasshopperDisplayMaterial

The GrasshopperDisplayMaterial type exposes the following members.

Constructors
  NameDescription
Public methodGrasshopperDisplayMaterial
Constructs a default material with an opaque white diffuse colour.
Public methodGrasshopperDisplayMaterial(Color)
Constructs a material with a specific diffuse colour.
Top
Properties
  NameDescription
Public propertyDesaturation
Gets or sets how far the shaded colour is blended towards greyscale, as a fraction from 0 to 1: 0 leaves the colour untouched, 1 is fully greyscale, and values in between blend linearly. Default: 0.
Public propertyDiffuse
Gets or sets the diffuse colour — the colour reached in the brightest areas of the shading. The alpha channel is opacity, following the usual Color convention: A=255 is fully opaque and A=0 fully transparent. Note this differs from Diffuse, which ignores alpha. Default: opaque white.
Public propertyShadeFalseColor
Gets or sets whether a mesh's vertex colours are shaded. Has no effect on a mesh that has no vertex colours. Default: false.
Public propertyStippling
Gets or sets whether an 8x8 Bayer stipple (dither) mask is applied. Default: false.
Public propertyStipplingAmount
Gets or sets how much of the stipple pattern is turned off, as a fraction from 0 to 1 (used only when Stippling is true). Default: 0.
Public propertyStripeContrast
Gets or sets the stripe contrast (used only when Striping is true). The effective range is 0..0.9; higher values are clamped, and 0 means no visible striping. Default: 1.0.
Public propertyStripeWidth
Gets or sets the width of one stripe band in screen-space pixels (used only when Striping is true). Stripes run along the screen diagonal and the light/dark pattern repeats every 2 × StripeWidth pixels; values below 1 are treated as 1. This is a pixel-space overlay — it does not scale with zoom or model units. Default: 0.
Public propertyStriping
Gets or sets whether the G2 striping overlay is applied. Default: false.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
The G2 shader produces a gradient-shaded look from a compact set of inputs rather than from the full lighting model of a DisplayMaterial: a diffuse colour, plus optional striping, stippling and dark-area desaturation. Unlike DisplayMaterial this is a plain settings object with no unmanaged resources, so it does not need to be disposed.
See Also