Rhino C++ API
8.11
|
IRenderMeshes is a collection of geometry instances for a given ObjectId typically returned by the Custom Render Mesh system. It provides STL compatible iterators. As each set of primitives is returned by the PrimitiveProviders in turn, the running hash is updated with new information about the mesh modifications that have been made along the way. More...
#include <IRhRdkCustomRenderMeshes.h>
Classes | |
struct | ConstantIterator |
STL style constant iterator for iterating over the render primitives collection. More... | |
class | IInstance |
The core of the custom render mesh delivery system - and instance defines a single mesh or other primitive (sphere, plane, box or cone). Each instance has a shared mesh/primitive and a transform, along with a material, mapping channels (at the mesh and instance level). More... | |
class | IMappingChannel |
Replacement for ON_MappingChannel that actually carries the ON_TextureMapping around with it instead of storing it in a document table - meaning that it can be passed off to non-document threads and still access the data correctly. More... | |
struct | Iterator |
STL style iterator for iterating over the render primitives collection. More... | |
class | ProviderTracking |
A handy helper class for implementing caching in MeshProviders. The ProviderTracking class is a collection of per-document ITracker objects. Embed a ProviderTracking object in your MeshProvider to implement a simple cache. More... | |
Public Types | |
using | ConstantReverseIterator = std::reverse_iterator< ConstantIterator > |
using | MappingChannels = std::vector< std::shared_ptr< IMappingChannel > > |
Defines a collection of mapping channels that will be carried around by instances or meshes. More... | |
using | ReverseIterator = std::reverse_iterator< Iterator > |
Public Member Functions | |
virtual | ~IRenderMeshes () |
virtual void | AddInstance (std::shared_ptr< IInstance > instance)=0 |
Adds a new instance to the render primitives collection. More... | |
virtual ConstantIterator | begin () const =0 |
virtual Iterator | begin ()=0 |
virtual ON_BoundingBox | BoundingBox (void) const =0 |
The bounding box for this IRenderMeshes, always in world space. More... | |
virtual ConstantIterator | cbegin () const =0 |
virtual ConstantIterator | cend () const =0 |
virtual ConstantReverseIterator | crbegin () const =0 |
virtual ConstantReverseIterator | crend () const =0 |
virtual CRhinoDoc * | Document (void) const =0 |
Each IRenderMeshes is associated with a specific document. More... | |
virtual ConstantIterator | end () const =0 |
virtual Iterator | end ()=0 |
virtual void * | EVF (const wchar_t *, void *)=0 |
Emergency virtual function for future expansion More... | |
virtual ON__UINT32 | Hash (void) const =0 |
The running hash for this set of render primitives. Usually calculated by a set of parameters in the MeshProvider and based on an initial hash delivered by the first set of primitives. More... | |
virtual size_t | InstanceCount () const =0 |
The number of instance objects in this collection. More... | |
virtual std::shared_ptr< IRenderMeshes > | MakeCopy (void) const =0 |
Create a copy of the render meshes that can be modified without risk of modifying the cached/document meshes. More... | |
virtual ObjectId | ObjectId (void) const =0 |
The ObjectId with which this IRenderMeshes object is associated. More... | |
virtual const MeshProviderId & | ProviderId (void) const =0 |
The MeshProvider that created this collection - if this is the first in the stack, typically this will be ON_nil_uuid. More... | |
virtual ReverseIterator | rbegin ()=0 |
virtual ReverseIterator | rend ()=0 |
void | SetHash (ON__UINT32) |
Sets the running hash for this set of render primitives. Usually calculated by a set of parameters in the MeshProvider and based on an initial hash delivered by the first set of primitives. Note - implemented using EVF(L"SetHash", ON__UINT32*) More... | |
virtual void | Transform (const ON_Xform &)=0 |
Transform this set of render primitives. More... | |
Static Public Member Functions | |
static std::shared_ptr< IRenderMeshes > | New (const CRhinoDoc &doc, const ObjectId &objectId, const MeshProviderId &providerId, ON__UINT32 runningHash) |
Create a new render primitives collection. More... | |
static ON__UINT32 | ObjectHash (const CRhinoObject &) |
The function used to create the initial hash from the object when creating the initial set of primitives. More... | |
Public Attributes | |
friend | ConstantIterator |
friend | ConstantReverseIterator |
friend | Iterator |
friend | ReverseIterator |
IRenderMeshes is a collection of geometry instances for a given ObjectId typically returned by the Custom Render Mesh system. It provides STL compatible iterators. As each set of primitives is returned by the PrimitiveProviders in turn, the running hash is updated with new information about the mesh modifications that have been made along the way.
using RhRdk::CustomRenderMeshes::IRenderMeshes::ConstantReverseIterator = std::reverse_iterator<ConstantIterator> |
using RhRdk::CustomRenderMeshes::IRenderMeshes::MappingChannels = std::vector<std::shared_ptr<IMappingChannel> > |
Defines a collection of mapping channels that will be carried around by instances or meshes.
using RhRdk::CustomRenderMeshes::IRenderMeshes::ReverseIterator = std::reverse_iterator<Iterator> |
|
inlinevirtual |
|
pure virtual |
Adds a new instance to the render primitives collection.
instance | The instance to be added. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
The bounding box for this IRenderMeshes, always in world space.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Each IRenderMeshes is associated with a specific document.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Emergency virtual function for future expansion
wszFunc | The named function |
pv | Private data |
|
pure virtual |
The running hash for this set of render primitives. Usually calculated by a set of parameters in the MeshProvider and based on an initial hash delivered by the first set of primitives.
|
pure virtual |
The number of instance objects in this collection.
|
pure virtual |
Create a copy of the render meshes that can be modified without risk of modifying the cached/document meshes.
|
static |
Create a new render primitives collection.
doc | The Rhino document with which this collection will be associated. |
objectId | The ObjectId that this collection is for. |
providerId | The MeshProvider that created this collection - if this is the first in the stack, typically this will be ON_nil_uuid. |
runningHash | The running hash of this collection - each MeshProvider will update the hash with its own modification hash. |
|
static |
The function used to create the initial hash from the object when creating the initial set of primitives.
|
pure virtual |
The ObjectId with which this IRenderMeshes object is associated.
|
pure virtual |
The MeshProvider that created this collection - if this is the first in the stack, typically this will be ON_nil_uuid.
|
pure virtual |
|
pure virtual |
void RhRdk::CustomRenderMeshes::IRenderMeshes::SetHash | ( | ON__UINT32 | ) |
Sets the running hash for this set of render primitives. Usually calculated by a set of parameters in the MeshProvider and based on an initial hash delivered by the first set of primitives. Note - implemented using EVF(L"SetHash", ON__UINT32*)
|
pure virtual |
Transform this set of render primitives.