Developer Documentation
|
#include <OpenFlipper/BasePlugin/ViewObjectMarker.hh>
Public Types | |
enum | Type { PerNumber, PerBit } |
Blending type for this marker. More... | |
Public Member Functions | |
virtual | ~ViewObjectMarker () |
Destructor. | |
virtual Type | type () |
virtual bool | stencilRefForObject (BaseObjectData *_obj, GLuint &_reference)=0 |
virtual bool | blendForStencilRefNumber (GLuint _reference, GLenum &_src, GLenum &_dst, ACG::Vec4f &_color) |
virtual bool | blendForStencilRefBit (GLuint _refbit, GLenum &_src, GLenum &_dst, ACG::Vec4f &_color) |
Abstract base class to mark objects with help of the stencil buffer
This system allows to blend the rendered object with a color, to visualize different object properties/states.
The ViewObjectMarker class can be activated for a examiner. The examiner will then call stencilRefForObject for each object. If stencilRefForObject returns "true" then the object _obj will be painted with the stencil buffer reference _reference (has to be != 0).
There are 2 operation modes
PerNumber: The examiner will call blendForStencilRefNumber for each of the returned references of stencilRefForObject to ask for the blend values.
PerBit: The examiner will call blendForStencilRefNumberBit for each of the bits in the returned references of stencilRefForObject to ask for the blend values.
PerBit handling allows to blend the object multiple times with different blend values, to visualize multiple properties at once, but is limited to the number of bits available in the stencil buffer (usually 8).
Definition at line 91 of file ViewObjectMarker.hh.
Blending type for this marker.
Enumerator | |
---|---|
PerNumber |
Mark per returned reference. |
PerBit |
Mark per returned reference bits. |
Definition at line 99 of file ViewObjectMarker.hh.
|
inlinevirtual |
Per reference bit blending values
_refbit | stencil reference bit for blending |
_src | sfactor parameter for ACG::GLState::blendFunc function |
_dst | dfactor parameter for ACG::GLState::blendFunc function |
_color | color used for blending |
Definition at line 134 of file ViewObjectMarker.hh.
|
inlinevirtual |
Per reference number blending values
_reference | stencil reference for blending |
_src | sfactor parameter for ACG::GLState::blendFunc function |
_dst | dfactor parameter for ACG::GLState::blendFunc function |
_color | color used for blending |
Reimplemented in SelectionObjectMarker, SelectionObjectMarker, DefaultObjectMarker, MoveObjectMarker, and SkeletonMarker.
Definition at line 125 of file ViewObjectMarker.hh.
|
pure virtual |
Get stencil reference for object
_obj | Object |
_reference | stencil reference for object painting |
Implemented in SelectionObjectMarker, SelectionObjectMarker, DefaultObjectMarker, MoveObjectMarker, and SkeletonMarker.