|
| CRhinoDisplayConduit (CSupportChannels channel_mask) |
|
| CRhinoDisplayConduit (CSupportChannels channel_mask, bool enable) |
|
virtual | ~CRhinoDisplayConduit () |
|
bool | Bind (const CRhinoDisplayPipeline &pipeline) |
| Binding methods... More...
|
|
bool | Bind (const CRhinoView &view) |
| See: bool CRhinoDisplayConduit::Bind(const CRhinoDisplayPipeline& pipeline);. More...
|
|
bool | Bind (const CRhinoViewport &viewport) |
| See: bool CRhinoDisplayConduit::Bind(const CRhinoDisplayPipeline& pipeline);. More...
|
|
bool | Bind (const ON_Viewport &viewport) |
| See: bool CRhinoDisplayConduit::Bind(const CRhinoDisplayPipeline& pipeline);. More...
|
|
int | BindingCount () const |
|
bool | BindingsExist () const |
|
bool | ChannelSupported (UINT channel) const |
| Attributes... More...
|
|
bool | ConstantBinding () const |
|
void | Disable () |
|
class CRhinoDoc * | Document () const |
|
unsigned int | DocumentSerialNumber () const |
|
void | Enable () |
|
void | Enable (unsigned int docSerialNumber) |
|
void | EnableConstantBinding (bool enable=true) |
|
virtual bool | ExecConduit (CRhinoDisplayPipeline &pipeline, UINT channel, bool &terminate)=0 |
| Operations... More...
|
|
unsigned int | GetGeometryFilter () const |
|
ON_UuidList | GetObjectFilter () const |
|
void | GetSelectedFilter (bool &on, bool &checkSubObjects) const |
|
bool | InterestedInObject (const CRhinoObject *) const |
|
bool | IsBound (const CRhinoDisplayPipeline &pipeline, bool ignore_state=false) const |
|
bool | IsBound (const CRhinoView &view, bool ignore_state=false) const |
| See: CRhinoDisplayConduit::IsBound( const CRhinoDisplayPipeline& pipeline, bool ignore_state = false) const;. More...
|
|
bool | IsBound (const CRhinoViewport &viewport, bool ignore_state=false) const |
| See: CRhinoDisplayConduit::IsBound( const CRhinoDisplayPipeline& pipeline, bool ignore_state = false) const;. More...
|
|
bool | IsBound (const ON_Viewport &viewport, bool ignore_state=false) const |
| See: CRhinoDisplayConduit::IsBound( const CRhinoDisplayPipeline& pipeline, bool ignore_state = false) const;. More...
|
|
bool | IsEnabled () const |
|
bool | IsEnabled (unsigned int docSerialNumber) const |
|
virtual void | NotifyConduit (EConduitNotifiers notification_event, CRhinoDisplayPipeline &pipeline) |
| Notifications... More...
|
|
class CRhinoPageView * | PageView () const |
|
unsigned int | PageViewSerialNumber () const |
|
bool | ReplaceBinding (const CRhinoDisplayPipeline &old_pipeline, const CRhinoDisplayPipeline &new_pipeline) |
|
bool | ReplaceBinding (const CRhinoView &old_view, const CRhinoView &new_view) |
| See: bool CRhinoDisplayConduit::ReplaceBinding(const CRhinoDisplayPipeline& old_pipeline, const CRhinoDisplayPipeline& new_pipeline);. More...
|
|
bool | ReplaceBinding (const CRhinoViewport &old_viewport, const CRhinoViewport &new_viewport) |
| See: bool CRhinoDisplayConduit::ReplaceBinding(const CRhinoDisplayPipeline& old_pipeline, const CRhinoDisplayPipeline& new_pipeline);. More...
|
|
bool | ReplaceBinding (const ON_Viewport &old_viewport, const ON_Viewport &new_viewport) |
| See: bool CRhinoDisplayConduit::ReplaceBinding(const CRhinoDisplayPipeline& old_pipeline, const CRhinoDisplayPipeline& new_pipeline);. More...
|
|
void | SetGeometryFilter (unsigned int geometry_filter) |
|
void | SetObjectFilter (const ON_SimpleArray< ON_UUID > &objectIds) |
|
void | SetObjectFilter (ON_UUID objectId) |
|
void | SetSelectedFilter (bool on, bool checkSubObjects) |
|
bool | ToggleBinding (const CRhinoDisplayPipeline &pipeline) |
|
bool | ToggleBinding (const CRhinoView &view) |
| See: bool CRhinoDisplayConduit::ToggleBinding(const CRhinoDisplayPipeline& pipeline);. More...
|
|
bool | ToggleBinding (const CRhinoViewport &viewport) |
| See: bool CRhinoDisplayConduit::ToggleBinding(const CRhinoDisplayPipeline& pipeline);. More...
|
|
bool | ToggleBinding (const ON_Viewport &viewport) |
| See: bool CRhinoDisplayConduit::ToggleBinding(const CRhinoDisplayPipeline& pipeline);. More...
|
|
bool | Unbind (const CRhinoDisplayPipeline &pipeline) |
|
bool | Unbind (const CRhinoView &view) |
| See: bool CRhinoDisplayConduit::Unbind(const CRhinoDisplayPipeline& pipeline);. More...
|
|
bool | Unbind (const CRhinoViewport &viewport) |
| See: bool CRhinoDisplayConduit::Unbind(const CRhinoDisplayPipeline& pipeline);. More...
|
|
bool | Unbind (const ON_Viewport &viewport) |
| See: bool CRhinoDisplayConduit::Unbind(const CRhinoDisplayPipeline& pipeline);. More...
|
|
void | UnbindAll () |
|
class CRhinoView * | View () const |
|
class CRhinoViewport * | Viewport () const |
|
unsigned int | ViewportSerialNumber () const |
|
unsigned int | ViewSerialNumber () const |
|
Display conduits provide support for adding custom display functionality during drawing inside of a display pipeline/viewport.
A subclass of a conduit specifies what channels or "phases" of drawing that it wants to be involved in.
Conduits may be "bound" to specific display pipelines or viewports which means that they will only operate with the objects they are bound to. If a binding is not defined, the conduit will operate in all display pipelines.
CRhinoDisplayConduit::CRhinoDisplayConduit |
( |
CSupportChannels |
channel_mask, |
|
|
bool |
enable |
|
) |
| |
Parameters: channel_mask: [in] Set of CSupportChannels that this conduit is interested in. enable: [in] Should the conduit initially be enabled? Remarks: Do not use SC_POSTPROCESSFRAMEBUFFER unless you absolutely need to. The display pipeline will check to see if it has any conduits that require this phase of drawing and will only perform a postprocess if one exists. Post processing of the frame buffer requires multiple dib copies at the end of drawing a frame and will cause a constant performance hit on display speed.
Since most of the time a conduit needs to only implement 1 to 2 channels at at time, it is also recommended that you do NOT use SC_ALL_CHANNELS to construct your conduit...This will make your counduit (and the pipeline) very inefficient. Example: If you had a conduit subclass that wanted to pay attention to object drawing and foreground drawing, you would set up the constructor as follows
CMyDisplayConduit::CMyDisplayConduit() : CRhinoDisplayConduit( CSupportChannels::SC_DRAWOBJECT | CSupportChannels::SC_DRAWFOREGROUND ) { ...set up some other class variables } ON_DEPRECATED - removing deprecation for the time being so we can find and clean up other outstanding warnings
void CRhinoDisplayConduit::EnableConstantBinding |
( |
bool |
enable = true | ) |
|
Description: When a conduit runs inside of a pipeline, it is said to be "bound" to that pipeline. By default all conduits are bound to all existing pipelines and any newly created ones...This is known as "constant binding"...If a conduit is only supposed to run/execute inside a specific pipeline/viewport (or set of viewports) then constant binding must be disabled, and the conduit must then be manually "bound" to a specific pipeline/viewport. See comments on all of "Bind()" methods.
Note: You can still bind conduits to specific pipelines/viewports, but the conduit will have to manually check for bindings inside of "ExecConduit()" using the "IsBound()" methods. By disabling constant binding and manually binding your conduit, will force your conduit to only run in specific pipelines/viewports (ie. no checks are necessary, they're handled by the pipeline).
Parameters: enable: [in] Set to false to disable constant binding, true to enable it.
virtual bool CRhinoDisplayConduit::ExecConduit |
( |
CRhinoDisplayPipeline & |
pipeline, |
|
|
UINT |
channel, |
|
|
bool & |
terminate |
|
) |
| |
|
pure virtual |
Operations...
Description: Conduits should/could be thought of as small pieces of code that get "executed" inside of Rhino's pipeline...and by specifying which "channel" your conduit executes in, allows you to determine where and when your code runs.
This function is called for every CSupportChannel that this conduit has been constructed with during the process of drawing a single frame. ExecConduit is not called when the conduit is disabled.
Parameters: pipeline: [in] the pipeline that is currently executing and calling this conduit. This is the pipeline you should be calling "Draw" functions on if you want to perform any custom drawing. channel: [in] This function can be called multiple times by a pipeline while drawing a single frame. The channel parameter specifies what part of CSupportChannels is currently being executed terminate: [out] Set this to true if you don't want other conduits to perform operations in the current channel after this function returns. Typically you will leave this parameter alone and allow other enabled conduits to perform their custom drawing code. Returns: True if the function completed successfully. If this function returns false, something bad occurred and drawing of the current frame stops.
Implemented in CRhinoGumballDisplayConduit.
bool CRhinoDisplayConduit::InterestedInObject |
( |
const CRhinoObject * |
| ) |
const |
Description: Determines if the passed in object's "type" matches the currently set geometry filter. This is more or less a helper function used when processing object-based channels.
Returns: true - if passed in object's type matches against the current geometry filter. false - if passed in object's type does NOT match against the currently geometry filter.
Note: If the current geometry filter is set to ON::any_object OR 0, this routine will always return true, and no conditions or comparisons are checked or made.
void CRhinoDisplayConduit::SetGeometryFilter |
( |
unsigned int |
geometry_filter | ) |
|
Description: The geometry type filter controls which types of geometry (points, curves, surfaces, meshes, etc.) will be processed in any "object based" channels (see SC_OBJECT_BASED_CHANNEL)
Parameters: geometry_filter - [in] an unsigned int made by or-ing ( | ) values from the ON::object_type enum. However, If you pass 0, then this is interpreted as "no geometry filter", which means ALL geometry will be processed and is equivalent to passing the value ON::any_object.
Note: The default geometry filter for all conduits is ON::any_object. If you want your conduit to only process specific types of objects, then you must set the geometry filter for your conduit accordingly. Using ON::object_type might seem like overkill for this purpose (since not all types are technically "drawn" as objects within the channels), however, this is more consistent with how filtering works in other classes.
For example: If you have a conduit that executes in the SC_DRAWOBJECT channel, but you're only interested in processing "Light" objects, then you would set your conduit's geometry filter like so:
myConduit.SetGeometryFilter( ON::light_type );
...a good place to set this would be either in your conduit's constructor or just before you enable your conduit, depending on how you've decided to use this feature.
void CRhinoDisplayConduit::SetSelectedFilter |
( |
bool |
on, |
|
|
bool |
checkSubObjects |
|
) |
| |
Description: For the per-object drawing channels, allow a filter to only work with selected objects. Enabling the selected filter will cause the InterestedInObject function to return false for unselected objects
Parameters: on - [in] true limits the conduit to selected objects checkSubObjects - [in] if true and on=true, then the conduit will be called for objects that have some subset of the object selected, like some edges of a surface.