Rhino C++ API  8.14
Classes | Typedefs
RhRdk::CustomRenderMeshes Namespace Reference

The CustomRenderMeshes namespace includes everything needed to use the new custom render primitives subsystem starting with Rhino 8. This replaces the deprecated code in IRhRdkCustomRenderMeshManager.h More...

Classes

class  IManager
 The interface to the RDK's custom render mesh manager. Do not derive from this class - you can access this functionality using RhRdkCustomRenderMeshManager2 Call the functions on this class to access the custom render meshes to be supplied for any given ObjectId (see ObjectId above). You should call HasCustomMeshes before CustomMeshes to ensure the most efficient access - if HasCustomMeshes returns false, you can assume there are no custom render meshes. This class provides low level access to the custom render meshes - to just get the complete render meshes for an object, prefer IRhRdkSdkRenderMeshIterator / CRhRdkSdkRender::NewRenderMeshIterator, or RhRdk::Realtime2::ChangeQueue. Use these functions if you are a renderer developer who wants to access the custom render meshes provided by IMeshProvider. Note that this will include the built - in displacement edge softening, thickening, shut-lining and curve piping tools, as well as Grasshopper's CustomPreview component (which uses the NonObjectIds method of providing meshes associated with entities that are not actual objects in the document) More...
 
class  IRenderMeshes
 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...
 
class  IRenderMeshProvider
 An IMeshProvider delivers custom render meshes (in the form of IRenderMeshes). Typically the class will also derive from CRhRdkExtension and be registered with the RDK using RhRdkAddExtension, forming a collection of providers which the IManager will cycle through to produce the final render mesh. Each IMeshProvider::HasCustomMeshes will be called and if it returns true, a call to CustomMeshes will be made. It is up to the provider to cache its own primitives - the IRenderMeshes::ProviderTracking class is provided for that. A provider may optionally return a collection of non-object Ids that it will provide custom render meshes for. An example of this is Grasshopper, which which will typically return a collection of the Ids of each CustomPreview component. Override this class if you are a plug-in developer intending to supply a custom set of meshes for a given object, or objectId. Examples of IMeshProviders are CurvePiping, EdgeSoftening, Displacement, Shutlining, Grasshopper's CustomPreview component. More...
 

Typedefs

using MeshProviderId = ON_UUID
 Each plug-in mesh provider as a unique MeshProviderId identifier. The built in identifiers are listed in RhRdkUuids.h More...
 
using ObjectId = ON_UUID
 An ObjectId is either the UUID of a source object for which the standard render primitives are being replaced, or a non-object id which identifies another entity supplying custom renderer primitives and which should be rendered into the model as if it were an object. An example of a non-object id is a Grasshopper component ID. A renderer will query the IManager for a list of non-object ids and call Primitves with each to get the complete set of meshes for the model (in addition to calling Primitives for each object in the scene) More...
 

Detailed Description

The CustomRenderMeshes namespace includes everything needed to use the new custom render primitives subsystem starting with Rhino 8. This replaces the deprecated code in IRhRdkCustomRenderMeshManager.h

Typedef Documentation

◆ MeshProviderId

Each plug-in mesh provider as a unique MeshProviderId identifier. The built in identifiers are listed in RhRdkUuids.h

◆ ObjectId

An ObjectId is either the UUID of a source object for which the standard render primitives are being replaced, or a non-object id which identifies another entity supplying custom renderer primitives and which should be rendered into the model as if it were an object. An example of a non-object id is a Grasshopper component ID. A renderer will query the IManager for a list of non-object ids and call Primitves with each to get the complete set of meshes for the model (in addition to calling Primitives for each object in the scene)