#include <IRhRdkCustomRenderMeshManager.h>
|
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 const CRhRdkObjectAncestry * | Ancestry (void) const =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_Xform & | GetInstanceTransform (void) const =0 |
|
virtual const CRhRdkMaterial * | Material (int iIndex) const =0 |
|
virtual const ON_Mesh * | Mesh (int iIndex) const =0 |
|
virtual const CRhinoObject * | Object (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 |
|
This interface is a collection of custom render meshes for a particular Rhino object. It is used by the custom render mesh provider platform.
- See also
- IRhRdkCustomRenderMeshProvider.
◆ ~IRhRdkCustomRenderMeshes()
virtual IRhRdkCustomRenderMeshes::~IRhRdkCustomRenderMeshes |
( |
| ) |
|
|
inlinevirtual |
◆ Add() [1/5]
Add primitive (possibly truncated) cone and material.
- Parameters
-
cone | is the cone to add as defined in ON_Cone. |
truncation | is the plane used to cut the cone (the non-apex end is kept). Should be equal to cone.plane if not truncated. |
pMaterial | is the material to add. Can be NULL if not needed. If SetAutoDeleteMaterialsOn has been called prior to calling Add, the material will be copied. |
Implemented in CRhRdkCustomRenderMeshes.
◆ Add() [2/5]
Add primitive finite plane and material.
- Parameters
-
plane | is the plane to add. |
pMaterial | is the material to add. Can be NULL if not needed. If SetAutoDeleteMaterialsOn has been called prior to calling Add, the material will be copied. |
Implemented in CRhRdkCustomRenderMeshes.
◆ Add() [3/5]
Add primitive box and material.
- Parameters
-
plane | is the plane of the box to add. |
cz | is the z-interval of the box. |
pMaterial | is the material to add. Can be NULL if not needed. If SetAutoDeleteMaterialsOn has been called prior to calling Add, the material will be copied. |
Implemented in CRhRdkCustomRenderMeshes.
◆ Add() [4/5]
Add primitive sphere and material.
- Parameters
-
sphere | is the sphere to add. |
pMaterial | is the material to add. Can be NULL if not needed. If SetAutoDeleteMaterialsOn has been called prior to calling Add, the material will be copied. |
Implemented in CRhRdkCustomRenderMeshes.
◆ Add() [5/5]
Add mesh and material.
- Parameters
-
pMesh | is the mesh to add. |
pMaterial | is the material to add. Can be NULL if not needed. If SetAutoDeleteMaterialsOn has been called prior to calling Add, the material will be copied. |
Implemented in CRhRdkCustomRenderMeshes.
◆ Ancestry()
◆ Box()
Get a box by its index.
- Parameters
-
iIndex | is the geometry index which must be >= 0 and < Count(). |
plane | is the base of the box geometry if the function returns true. |
z_interval | is the height of the box geometry if the function returns true. |
- Returns
- true if the geometry at the index is a box. false if not, or iIndex is out of range.
Implemented in CRhRdkCustomRenderMeshes.
◆ Cone()
virtual bool IRhRdkCustomRenderMeshes::Cone |
( |
int |
iIndex, |
|
|
ON_Cone & |
cone, |
|
|
ON_Plane & |
truncation |
|
) |
| const |
|
pure virtual |
Get a truncated cone by its index.
- Parameters
-
iIndex | is the geometry index which must be >= 0 and < Count(). |
cone | is the untruncated conical geometry if the function returns true. |
truncation | is the planar truncation of the cone if the function returns true. |
- Returns
- true if the geometry at the index is a cone. false if not, or iIndex is out of range.
Implemented in CRhRdkCustomRenderMeshes.
◆ ConvertMeshesToTriangles()
virtual void IRhRdkCustomRenderMeshes::ConvertMeshesToTriangles |
( |
void |
| ) |
|
|
pure virtual |
◆ Count()
virtual int IRhRdkCustomRenderMeshes::Count |
( |
void |
| ) |
const |
|
pure virtual |
◆ Delete()
◆ EVF()
virtual void* IRhRdkCustomRenderMeshes::EVF |
( |
const wchar_t * |
, |
|
|
void * |
|
|
) |
| |
|
pure virtual |
Emergency virtual function for future expansion. "AddMesh" - new implementation of AddMesh that also supoprts instancing. pv = struct { ON_Mesh*; const CRhRdkMaterial*; ON_Xform*; }
Implemented in CRhRdkCustomRenderMeshes.
◆ GetInstanceTransform()
virtual const ON_Xform& IRhRdkCustomRenderMeshes::GetInstanceTransform |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- The transformation that the meshes have undergone from their original location in instance space. i.e., The mesh should not be transformed by this, but other transformable data (such as primitive mapping types) should have this applied before using them.
Implemented in CRhRdkCustomRenderMeshes.
◆ Material()
virtual const CRhRdkMaterial* IRhRdkCustomRenderMeshes::Material |
( |
int |
iIndex | ) |
const |
|
pure virtual |
Get a material by its index.
- Parameters
-
iIndex | is the material index which must be >= 0 and < Count(). |
- Returns
- A pointer to the material or NULL if iIndex is out of range.
Implemented in CRhRdkCustomRenderMeshes.
◆ Mesh()
virtual const ON_Mesh* IRhRdkCustomRenderMeshes::Mesh |
( |
int |
iIndex | ) |
const |
|
pure virtual |
Get a mesh by its index.
- Parameters
-
iIndex | is the mesh index which must be >= 0 and < Count(). |
- 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.
Implemented in CRhRdkCustomRenderMeshes.
◆ New()
◆ Object()
virtual const CRhinoObject* IRhRdkCustomRenderMeshes::Object |
( |
void |
| ) |
const |
|
pure virtual |
◆ Plane()
virtual bool IRhRdkCustomRenderMeshes::Plane |
( |
int |
iIndex, |
|
|
ON_PlaneSurface & |
plane |
|
) |
| const |
|
pure virtual |
Get a plane by its index.
- Parameters
-
iIndex | is the geometry index which must be >= 0 and < Count(). |
plane | is the plane geometry if the function returns true. |
- Returns
- true if the geometry at the index is a plane. false if not, or iIndex is out of range.
Implemented in CRhRdkCustomRenderMeshes.
◆ PrimitiveType()
◆ ProviderId()
virtual UUID IRhRdkCustomRenderMeshes::ProviderId |
( |
void |
| ) |
const |
|
pure virtual |
◆ SetAutoDeleteMaterialsOn()
virtual void IRhRdkCustomRenderMeshes::SetAutoDeleteMaterialsOn |
( |
void |
| ) |
|
|
pure virtual |
The provider should call this to make the object automatically delete all materials when they are no longer needed. If called, it must be called before calling Add().
Implemented in CRhRdkCustomRenderMeshes.
◆ SetAutoDeleteMeshesOn()
virtual void IRhRdkCustomRenderMeshes::SetAutoDeleteMeshesOn |
( |
void |
| ) |
|
|
pure virtual |
The provider should call this to make the object automatically delete all meshes when they are no longer needed. If called, it must be called before calling Add().
Implemented in CRhRdkCustomRenderMeshes.
◆ SetInstanceTransform()
virtual void IRhRdkCustomRenderMeshes::SetInstanceTransform |
( |
const ON_Xform & |
xformInstance | ) |
|
|
pure virtual |
◆ SetProviderId()
virtual void IRhRdkCustomRenderMeshes::SetProviderId |
( |
const UUID & |
uuidRMP | ) |
|
|
pure virtual |
◆ SetUseObjectsMappingChannels()
virtual void IRhRdkCustomRenderMeshes::SetUseObjectsMappingChannels |
( |
bool |
bSet | ) |
|
|
pure virtual |
The provider calls this with true if the texture mapping will be taken from the Rhino object. Otherwise it calls this with false. Then the texture mapping will use the TCs on the mesh only.
Implemented in CRhRdkCustomRenderMeshes.
◆ Sphere()
virtual bool IRhRdkCustomRenderMeshes::Sphere |
( |
int |
iIndex, |
|
|
ON_Sphere & |
sphere |
|
) |
| const |
|
pure virtual |
Get a sphere by its index.
- Parameters
-
iIndex | is the geometry index which must be >= 0 and < Count(). |
sphere | is the spherical geometry if the function returns true. |
- Returns
- true if the geometry at the index is a sphere. false if not, or iIndex is out of range.
Implemented in CRhRdkCustomRenderMeshes.
◆ UseObjectsMappingChannels()
virtual bool IRhRdkCustomRenderMeshes::UseObjectsMappingChannels |
( |
void |
| ) |
const |
|
pure virtual |
- Returns
- true if the texture mapping will be taken from the Rhino object. Otherwise the texture mapping will use the TCs on the mesh only.
Implemented in CRhRdkCustomRenderMeshes.