RenderMeshProvider
ReferencesA RenderMeshProvider delivers custom render primitives (in the form of RenderMeshes). Derive a public class from this with a public constructor, and this primitive provider will be added to the RDK forming a collection of providers. Each RenderMeshProvider::HasCustomRenderMeshes will be called and if it returns true, a call to RenderMeshes 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 primitives 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 primitives for a given object, or objectId. Examples of IRenderMeshProviders are CurvePiping, EdgeSoftening, Displacement, Shutlining, Grasshopper's CustomPreview component.
Finalizer
Fields
Properties
The localized name of the provider for UI display.
A provider may optionally return a collection of non-object Ids that it will provide custom render primitives for. An example of this is Grasshopper, which which will typically return a collection of the Ids of each CustomPreview component.
Methods
Dispose
#Dispose method. Note that you should only ever call Dispose if you explicitly registered this RenderMeshProvider using RegisterProvider If this provider was created using automatic registration, the Dispose function will thrown an exception.
Runtime access to specific parameters on for a given objectId relating to this primitive provider.
Returns: The value of the parameter for the specified ObjectId. IConvertable.
Determine if custom render primitives will be supplied for a particular object.
public abstract bool HasCustomRenderMeshes()
mt,
The mesh type to provide meshes for
vp,
The viewport being rendered
doc,
The Rhino document associated with the objectId
objectId,
The objectId for which the primitives should be supplied.
ref Flags
flags,
See RenderMeshProvider.Flags. This is an in/out parameter: set RenderMeshProvider.Flags.Incomplete on return if the meshes supplied are provisional because asynchronous work has not finished.
plugin,
The requesting plug-in - typically the render plug-in requesting the primitives.
attrs
The display attributes currently being used - nullptr if this is production rendering.
Returns: True if RenderMeshes will return a set of primitives, otherwise false. RenderMeshes may still return an empty collection - in case of cancelation something similar.
Provides details on the progress of custom render meshes for a document or collection of objects
Returns a complete list of progress reports for all providers for either the document or a collection of objects
Register RenderMeshProvider without relying on the auto-plug-in registration.
Register RenderMeshProviders without relying on the auto-plug-in registration
Register RenderMeshProviders without relying on the auto-plug-in registration
Returns a complete set of custom render primitives for a given ObjectId.
public abstract RenderMeshes RenderMeshes()
mt,
The mesh type to provide meshes for
vp,
The viewport being rendered
doc,
The Rhino document associated with the objectId
objectId,
The objectId for which the primitives should be supplied.
ancestry,
The ancestry of the object - ie, block references referring to this definition. This is only used to handle ByParent attributes, and should not be used to transform geometry.
ref Flags
flags,
See RenderMeshProvider.Flags. This is an in/out parameter: set RenderMeshProvider.Flags.Incomplete on return if the meshes supplied are provisional because asynchronous work has not finished.
RenderMeshes
previousPrimitives,
Optionally a custom set of initial primitives. If this parameter is empty, the standard render primitives for the object will be used, or an empty set of primitives will be used where they are not available. This is typically used in meshing exporters, which produce specific meshes for the output rather than using the render primitives.
plugin,
The requesting plug-in - typically the render plug-in requesting the meshes.
attrs
The display attributes currently being used - nullptr if this is production rendering.