#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 oparation 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 visualze multiple properties at once, but is limited to the number of bits avaiable in the stencil buffer (usually 8).
Definition at line 84 of file ViewObjectMarker.hh.
Blending type for this marker.
Definition at line 92 of file ViewObjectMarker.hh.
| virtual bool ViewObjectMarker::blendForStencilRefBit | ( | GLuint | _refbit, | |
| GLenum & | _src, | |||
| GLenum & | _dst, | |||
| ACG::Vec4f & | _color | |||
| ) | [inline, virtual] |
Per reference bit blending values
| _refbit | stencil reference bit for blending | |
| _src | sfactor parameter for glBlendFunc function | |
| _dst | dfactor parameter for glBlendFunc function | |
| _color | color used for blending |
Definition at line 127 of file ViewObjectMarker.hh.
| virtual bool ViewObjectMarker::blendForStencilRefNumber | ( | GLuint | _reference, | |
| GLenum & | _src, | |||
| GLenum & | _dst, | |||
| ACG::Vec4f & | _color | |||
| ) | [inline, virtual] |
Per reference number blending values
| _reference | stencil reference for blending | |
| _src | sfactor parameter for glBlendFunc function | |
| _dst | dfactor parameter for glBlendFunc function | |
| _color | color used for blending |
Definition at line 118 of file ViewObjectMarker.hh.
| virtual bool ViewObjectMarker::stencilRefForObject | ( | BaseObjectData * | _obj, | |
| GLuint & | _reference | |||
| ) | [pure virtual] |
Get stencil reference for object
| _obj | Object | |
| _reference | stencil reference for object painting |