Rhino C++ API  8.5
Classes
RhRdk::Realtime::ChangeQueue Class Reference

#include <RhRdk_RCE_Queue.h>

Classes

class  ClippingPlane
 
class  DynamicObject
 
class  GroundPlane
 
class  Light
 
class  MappingChannel
 
class  MappingChannels
 
class  Material
 
class  Mesh
 
class  MeshInstance
 
class  Skylight
 

Detailed Description

The ChangeQueue is a centralized mechanism for handling changes in a model.

All geometry is represented to clients as mesh data, and block instances are realized and handled properly, along with all material, environment and lighting capabilities.

Once a ChangeQueue is constructed the CreateWorld() function should be called once, on the main thread.

The ChangeQueue communicates through NotifyBeginUpdates, NotifyEndUpdates and NotifyDynamicUpdatesAreAvailable when changes to the model exist, including after the call to CreateWorld. Once updates are completede (NotifyEndUpdates) the client can call Flush(true) to receive all the collected changes. All changes are passed to the client through the several Apply* funtions the ChangeQueue class provides. The custom ChangeQueue implementation should implement those Apply* fnuctions that provide the data of interest.

Notes on double-sided material support.

When using customized display attributes that specify a custom back-face material, the CRhRdkMaterial that you will retrieve from 
MaterialFromId will be an internal display material with the type ID exported as uuidRealtimeDisplayMaterialType.  To support double sided materials
you will need to query this material for its two children, both of which will also be derived from CRhRdkMaterial.  The two child materials will be
in the child slots named "front" and "back".

To support only single sided materials (should your renderer not support double sided materials), simply call "FindChild("front")" on the display material.
Otherwise, use FindChild("front") and FindChild("back") to retrieve both.