RhinoObjectRenderMeshes Method |
Returns a set of custom render primitives for this object.
Some providers - Displacement in particular - compute their meshes
asynchronously. Until that work finishes, this method returns the object's
ordinary render mesh instead of the custom one and reports that by setting
Incomplete in flags.
That mesh is valid geometry but does not yet reflect the provider, so a caller
that measures it will see the object as it was beforehand. Test for the flag
rather than trusting the first result.
Namespace:
Rhino.DocObjects
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 8.0
Syntaxpublic RenderMeshes RenderMeshes(
MeshType mt,
ViewportInfo vp,
List<InstanceObject> ancestry,
ref RenderMeshProviderFlags flags,
PlugIn plugin,
DisplayPipelineAttributes attrs
)
Public Function RenderMeshes (
mt As MeshType,
vp As ViewportInfo,
ancestry As List(Of InstanceObject),
ByRef flags As RenderMeshProviderFlags,
plugin As PlugIn,
attrs As DisplayPipelineAttributes
) As RenderMeshes
Parameters
- mt
- Type: Rhino.GeometryMeshType
The mesh type requested (render or analysis). - vp
- Type: Rhino.DocObjectsViewportInfo
The viewport being rendered - ancestry
- Type: System.Collections.GenericListInstanceObject
The ancestry tree - only used for by-parent object properties assignments. - flags
- Type: Rhino.Render.CustomRenderMeshesRenderMeshProviderFlags
On input, the options to apply; on return, the same value with any status flags
added. Reset it before each call rather than passing the returned value back in.
To wait for an asynchronous provider, call again while
Incomplete remains set, calling
Wait in between: the provider needs the main thread's
message queue pumped before it can publish its result, so a retry loop that
does not pump will never see the flag clear.
- plugin
- Type: Rhino.PlugInsPlugIn
The requesting plug-in (typically the calling plugin) - attrs
- Type: Rhino.DisplayDisplayPipelineAttributes
Display attributes for the caller - null if this is a full rendering.
Return Value
Type:
RenderMeshes
A set of custom render primitives for this object, or the object's ordinary render
mesh if an asynchronous provider has not finished - see
flags.
Null if the object is not in a document.
See Also