RenderPrimitive

References

Finalizer

~RenderPrimitive

#
~RenderPrimitive()

Properties

BoundingBox

#Since v5.7
public BoundingBox BoundingBox { get; }
The bounding box for this primitive.

InstanceTransform

#Since v5.7
public Transform InstanceTransform { get; }
Instance reference transform or Identity if not an instance reference.

PrimitiveType

#Since v5.7
public RenderPrimitiveType PrimitiveType { get; }
Call this before extracting meshes if you support render primitives to get the RenderPrimitiveType of this mesh then call the associated TryGetSphere(Sphere), TryGetPlane(PlaneSurface), TryGetCone(Cone, Plane), or TryGetBox(Box) method. Calling the Mesh() property will mesh the primitive and return a mesh always.

RenderMaterial

#Since v5.7
public RenderMaterial RenderMaterial { get; }
The RenderMaterial associated with this mesh or null if there is not one.

RhinoObject

#Since v5.7
public RhinoObject RhinoObject { get; }
The Rhino object associated with this render primitive.

Methods

Dispose

#Since v5.7
public void Dispose()

Dispose

#
protected void Dispose(bool isDisposing)
isDisposing (bool)

Mesh

#Since v5.7
public Mesh Mesh()
Returns the mesh associated with the object, this will mesh primitives and always return a mesh.

TryGetBox

#Since v5.7
public bool TryGetBox(out Box box)
Call this method to get a Box primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Box then the box parameter is set to Box.Empty.
box (out Box)Gets set to the box primitive for this object on success or Box.Empty on error.
Returns true if PrimitiveType is RenderPrimitiveType.Box and the box parameter was initialized otherwise returns false.

TryGetCone

#Since v5.7
public bool TryGetCone(out Cone cone, out Plane truncation)
Call this method to get a Cone primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Cone then the cone parameter is set to Cone.Unset and the truncation parameter is set to Plane.Unset.
cone (out Cone)Gets set to the cone primitive for this object on success or Cone.Unset on error.
truncation (out Plane)Gets set to the truncation plane for this object on success or Plane.Unset on error.
Returns true if PrimitiveType is RenderPrimitiveType.Cone and the cone and truncation parameters were initialized otherwise returns false.

TryGetPlane

#Since v5.7
public bool TryGetPlane(out PlaneSurface plane)
Call this method to get a Plane primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Plane then the plane parameter is set to null.
plane (out PlaneSurface)Gets set to the plane primitive for this object on success or null on error.
Returns true if PrimitiveType is RenderPrimitiveType.Plane and the plane parameter was initialized otherwise returns false.

TryGetSphere

#Since v5.7
public bool TryGetSphere(out Sphere sphere)
Call this method to get a sphere primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Sphere then the sphere parameter is set to Sphere.Unset.
sphere (out Sphere)Gets set to the primitive sphere for this object on success.
Returns true if PrimitiveType is RenderPrimitiveType.Sphere and the sphere parameter was initialized otherwise returns false.