Rhino C++ API  8.14
Public Member Functions | Static Public Member Functions | List of all members
IRhRdkCustomRenderMeshes2 Class Referenceabstract

#include <IRhRdkCustomRenderMeshManager.h>

Inheritance diagram for IRhRdkCustomRenderMeshes2:
IRhRdkCustomRenderMeshes IRhRdkCustomRenderMeshes3

Public Member Functions

virtual ~IRhRdkCustomRenderMeshes2 ()
 
virtual void AddMeshInstance (ON_Mesh *pMesh, const CRhRdkMaterial *pMaterial, const ON_Xform &instance_transform)=0
 
virtual const CRhRdkObjectAncestryAncestry (void) const =0
 
virtual void ApplyTransformToAllMeshes (const ON_Xform &xform)=0
 
virtual bool AutoDeleteMaterialsOn (void) const =0
 
virtual bool AutoDeleteMeshesOn (void) const =0
 
virtual void Clear (void)=0
 
virtual const ON_MeshMeshInstance (int iIndex, ON_Xform &instance_transform) const =0
 
virtual const UUID & OriginalMaterialId (int iIndex) const =0
 
virtual void SetAncestry (const class CRhRdkObjectAncestry &pAncestry)=0
 
virtual void SetUseCache (bool bUseCache)=0
 
virtual bool UseCache (void) const =0
 
- Public Member Functions inherited from IRhRdkCustomRenderMeshes
virtual ~IRhRdkCustomRenderMeshes ()
 
virtual void Add (const ON_Cone &cone, const ON_Plane &truncation, const CRhRdkMaterial *pMaterial)=0
 
virtual void Add (const ON_PlaneSurface &plane, const CRhRdkMaterial *pMaterial)=0
 
virtual void Add (const ON_PlaneSurface &plane, const ON_Interval &cz, const CRhRdkMaterial *pMaterial)=0
 
virtual void Add (const ON_Sphere &sphere, const CRhRdkMaterial *pMaterial)=0
 
virtual void Add (ON_Mesh *pMesh, const CRhRdkMaterial *pMaterial)=0
 
virtual bool Box (int iIndex, ON_PlaneSurface &plane, ON_Interval &z_interval) const =0
 
virtual bool Cone (int iIndex, ON_Cone &cone, ON_Plane &truncation) const =0
 
virtual void ConvertMeshesToTriangles (void)=0
 
virtual int Count (void) const =0
 
virtual void * EVF (const wchar_t *, void *)=0
 
virtual const ON_XformGetInstanceTransform (void) const =0
 
virtual const CRhRdkMaterialMaterial (int iIndex) const =0
 
virtual const ON_MeshMesh (int iIndex) const =0
 
virtual const CRhinoObjectObject (void) const =0
 
virtual bool Plane (int iIndex, ON_PlaneSurface &plane) const =0
 
virtual RhRdkRenderMeshPrimitiveTypes PrimitiveType (int iIndex) const =0
 
virtual UUID ProviderId (void) const =0
 
virtual void SetAutoDeleteMaterialsOn (void)=0
 
virtual void SetAutoDeleteMeshesOn (void)=0
 
virtual void SetInstanceTransform (const ON_Xform &xformInstance)=0
 
virtual void SetProviderId (const UUID &uuidRMP)=0
 
virtual void SetUseObjectsMappingChannels (bool bSet)=0
 
virtual bool Sphere (int iIndex, ON_Sphere &sphere) const =0
 
virtual bool UseObjectsMappingChannels (void) const =0
 

Static Public Member Functions

static const IRhRdkCustomRenderMeshes2Promote (const IRhRdkCustomRenderMeshes *)
 
static IRhRdkCustomRenderMeshes2Promote (IRhRdkCustomRenderMeshes *)
 
- Static Public Member Functions inherited from IRhRdkCustomRenderMeshes
static void Delete (IRhRdkCustomRenderMeshes *)
 
static IRhRdkCustomRenderMeshesNew (const CRhinoObject *pObject)
 

Detailed Description

This interface is a collection of custom render meshes for a particular Rhino object. It extends IRhRdkCustomRenderMeshes and can be exposed from an IRhRdkCustomRenderMeshes pointer using IRhRdkCustomRenderMeshes2::Promote(). Do not up-cast; always use Promote. It is used by the custom render mesh provider platform.

See also
IRhRdkCustomRenderMeshProvider.

Constructor & Destructor Documentation

◆ ~IRhRdkCustomRenderMeshes2()

virtual IRhRdkCustomRenderMeshes2::~IRhRdkCustomRenderMeshes2 ( )
inlinevirtual

Member Function Documentation

◆ AddMeshInstance()

virtual void IRhRdkCustomRenderMeshes2::AddMeshInstance ( ON_Mesh pMesh,
const CRhRdkMaterial pMaterial,
const ON_Xform instance_transform 
)
pure virtual

Adds a mesh/transform to the collection.

Parameters
pMeshpointer to the mesh. Note that you can add the same mesh over and over with different transforms. If SetAutoDeleteMeshesOn has been called prior to calling Add, the mesh will be copied.
pMaterialis the material to add. Can be NULL if not needed. If SetAutoDeleteMaterialsOn() has been called prior to calling Add(), the material will be copied.
instance_transformis the transformation of this mesh.

◆ Ancestry()

virtual const CRhRdkObjectAncestry* IRhRdkCustomRenderMeshes2::Ancestry ( void  ) const
pure virtual

Gets the ancenstry of meshes in the collection.

Implements IRhRdkCustomRenderMeshes.

◆ ApplyTransformToAllMeshes()

virtual void IRhRdkCustomRenderMeshes2::ApplyTransformToAllMeshes ( const ON_Xform xform)
pure virtual

Transform all of the meshes in the collection.

Parameters
xformis the transformation to apply.

◆ AutoDeleteMaterialsOn()

virtual bool IRhRdkCustomRenderMeshes2::AutoDeleteMaterialsOn ( void  ) const
pure virtual

Gets the ownership of materials in the collection.

◆ AutoDeleteMeshesOn()

virtual bool IRhRdkCustomRenderMeshes2::AutoDeleteMeshesOn ( void  ) const
pure virtual

Gets the ownership of meshes in the collection.

◆ Clear()

virtual void IRhRdkCustomRenderMeshes2::Clear ( void  )
pure virtual

Clear the collection of custom render meshes.

◆ MeshInstance()

virtual const ON_Mesh* IRhRdkCustomRenderMeshes2::MeshInstance ( int  iIndex,
ON_Xform instance_transform 
) const
pure virtual

Get a mesh by its index with support for instanced, transformed meshes.

Parameters
iIndexis the mesh index which must be >= 0 and < Count().
instance_transformis the instance transform if this mesh has one. Otherwise this will be identity.
Returns
A pointer to the mesh or NULL if iIndex is out of range.
Note
This always returns a mesh even if this is a primitive type other than mesh; i.e., a suitable mesh is created on the fly.

◆ OriginalMaterialId()

virtual const UUID& IRhRdkCustomRenderMeshes2::OriginalMaterialId ( int  iIndex) const
pure virtual

Gets the instance id of the material for this index. Since materials are generally copied, they will have different instance ids to the ones in the document.

◆ Promote() [1/2]

static const IRhRdkCustomRenderMeshes2* IRhRdkCustomRenderMeshes2::Promote ( const IRhRdkCustomRenderMeshes )
static

Return a IRhRdkCustomRenderMeshes2 interface pointer for a given IRhRdkCustomRenderMeshes interface pointer if one exists.

◆ Promote() [2/2]

static IRhRdkCustomRenderMeshes2* IRhRdkCustomRenderMeshes2::Promote ( IRhRdkCustomRenderMeshes )
static

Return a IRhRdkCustomRenderMeshes2 interface pointer for a given IRhRdkCustomRenderMeshes interface pointer if one exists.

◆ SetAncestry()

virtual void IRhRdkCustomRenderMeshes2::SetAncestry ( const class CRhRdkObjectAncestry pAncestry)
pure virtual

Sets the ancenstry of meshes in the collection. This is used to identify which instance chain the meshes refer to.

◆ SetUseCache()

virtual void IRhRdkCustomRenderMeshes2::SetUseCache ( bool  bUseCache)
pure virtual

Sets cache usages for the collection.

◆ UseCache()

virtual bool IRhRdkCustomRenderMeshes2::UseCache ( void  ) const
pure virtual

Gets cache usages for the collection.