[DebuggerDisplay("{ValueAsObject()}", Name = "{Name}")] public abstract class Field
Generic data fields used to add publicly accessible properties to RenderContent.FieldDictionary. These should be created by calling a FieldDictaionary.Add() method on a Render content object. These are allocated after the RenderContent object's C++ object is created and added to the underlying C++ objects content dictionary, who ever allocates a field is responsible for deleting it so these objects clean up the C++ pointers when they are disposed of.

Constructors

Field

#
protected Field(RenderContent renderContent, nint pointer)
renderContent (RenderContent)
pointer (nint)

Field

#
protected Field(RenderContent renderContent, string name, string prompt, object initialValue, bool isTextured, bool treatAsLinear, int sectionId)
renderContent (RenderContent)
name (string)
prompt (string)
initialValue (object)
isTextured (bool)
treatAsLinear (bool)
sectionId (int)

Field

#
protected Field(RenderContent renderContent, string name, string prompt, object initialValue, bool isTextured, bool treatAsLinear)
renderContent (RenderContent)
name (string)
prompt (string)
initialValue (object)
isTextured (bool)
treatAsLinear (bool)

Field

#
protected Field(RenderContent renderContent, string name, string prompt, object initialValue, bool isTextured)
renderContent (RenderContent)
name (string)
prompt (string)
initialValue (object)
isTextured (bool)

Field

#
protected Field(RenderContent renderContent, string name)
renderContent (RenderContent)
name (string)

Properties

AutomaticRegisteredProperty

#Since v8.15
public bool AutomaticRegisteredProperty { get; set; }

IsHiddenInAutoUI

#Since v7.2
public bool IsHiddenInAutoUI { get; set; }
When fields are used by the automatic UI, they can be hidden from it by calling this method.

Key

#Since v5.1
obsoleteThe Rhino.Render.Fields.Field.Key property is obsolete, use Name instead.
Field name value string passed to the constructor

Name

#Since v6.0
public string Name { get; }
Field name value string passed to the constructor.

Tag

#Since v5.1
public object Tag { get; set; }
Gets or sets an object that contains data to associate with the field.
An object that contains information that is associated with the field.

TextureAmountMax

#Since v7.0
public double TextureAmountMax { get; set; }
Set Max value for Texture amount

TextureAmountMin

#Since v7.0
public double TextureAmountMin { get; set; }
Set Min value for Texture amount

UseTextureAmount

#Since v7.12
public bool UseTextureAmount { get; set; }
True if 'texture amount' is in use, otherwise false. The 'texture amount' is represented as a numeric stepper in the UI. If true, then the stepper is shown. If false, then the stepper is hidden.

UseTextureOn

#Since v7.12
public bool UseTextureOn { get; set; }
True if 'texture on' is in use, otherwise false. In the UI 'texture on' is represented as a checkbox. If true then the checbox is shown. If false then the checkbox is not shown.

Methods

CreateCppPointer

#
protected void CreateCppPointer(RenderContent content, string key, string prompt, object initialValue, bool isTextured, bool treatAsLinear)
content (RenderContent)
key (string)
prompt (string)
initialValue (object)
isTextured (bool)
treatAsLinear (bool)

GetValue<T>

#Since v6.12
public T GetValue<T>()
Parametrized version of GetValue calling appropriate ValueAs* methods.
Value of type T of the field

ValueAsBool

#
protected bool ValueAsBool()
Return field value as a bool.
Returns field value as a bool.

ValueAsByteArray

#
protected byte[] ValueAsByteArray()
Return field as a byte array.
Return field as a byte array.

ValueAsColor4f

#
protected Color4f ValueAsColor4f()
Return field as a Rhino.Display.Color4f color value.
Return field as a Rhino.Display.Color4f color value.

ValueAsDateTime

#
protected DateTime ValueAsDateTime()
Return field as a DateTime value.
Return field as a DateTime value.

ValueAsDouble

#
protected double ValueAsDouble()
Return field value as a double precision number.
Return the field value as a double precision number.

ValueAsFloat

#
protected float ValueAsFloat()
Return field value as floating point number.
Return the field value as an floating point number.

ValueAsGuid

#
protected Guid ValueAsGuid()
Return field value as Guid.
Return the field value as an Guid.

ValueAsInt

#
protected int ValueAsInt()
Return field value as integer.
Return the field value as an integer.

ValueAsObject

#Since v5.7
public abstract object ValueAsObject()

ValueAsPoint2d

#
protected Point2d ValueAsPoint2d()
Return field as a Rhino.Geometry.Point2d color value.
Return field as a Rhino.Geometry.Point2d color value.

ValueAsPoint3d

#
protected Point3d ValueAsPoint3d()
Return field as a Rhino.Geometry.Point3d color value.
Return field as a Rhino.Geometry.Point3d color value.

ValueAsPoint4d

#
protected Point4d ValueAsPoint4d()
Return field as a Rhino.Geometry.Point4d color value.
Return field as a Rhino.Geometry.Point4d color value.

ValueAsString

#
protected string ValueAsString()
Get field value as a string.
Returns the field value as a string if possible.

ValueAsTransform

#
protected Transform ValueAsTransform()
Return field as a Rhino.Geometry.Transform color value.
Return field as a Rhino.Geometry.Transform color value.

ValueAsVector2d

#
protected Vector2d ValueAsVector2d()
Return field as a Rhino.Geometry.Vector2d color value.
Return field as a Rhino.Geometry.Vector2d color value.

ValueAsVector3d

#
protected Vector3d ValueAsVector3d()
Return field as a Rhino.Geometry.Vector3d color value.
Return field as a Rhino.Geometry.Vector3d color value.