RenderPrimitive
ReferencesFinalizer
~RenderPrimitive
#~RenderPrimitive()
Properties
Instance reference transform or Identity if not an instance reference.
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.
The RenderMaterial associated with this mesh or null if there is not one.
The Rhino object associated with this render primitive.
Methods
public void Dispose()
public Mesh Mesh()
Returns the mesh associated with the object, this will mesh primitives and always return a mesh.
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.
Parameters:
| box (out Box) | Gets set to the box primitive for this object on success or Box.Empty on error. |
Returns: Returns true if PrimitiveType is RenderPrimitiveType.Box and the box parameter was initialized otherwise returns false.
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.
Parameters:
| 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: Returns true if PrimitiveType is RenderPrimitiveType.Cone and the cone and truncation parameters were initialized otherwise returns false.
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.
Parameters:
| plane (out PlaneSurface) | Gets set to the plane primitive for this object on success or null on error. |
Returns: Returns true if PrimitiveType is RenderPrimitiveType.Plane and the plane parameter was initialized otherwise returns false.
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.
Parameters:
| sphere (out Sphere) | Gets set to the primitive sphere for this object on success. |
Returns: Returns true if PrimitiveType is RenderPrimitiveType.Sphere and the sphere parameter was initialized otherwise returns false.