ViewObjectMarker Class Reference

#include <OpenFlipper/BasePlugin/ViewObjectMarker.hh>

List of all members.

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)

Detailed Description

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.


Member Enumeration Documentation

Blending type for this marker.

Enumerator:
PerNumber 

Mark per returned reference.

PerBit 

Mark per returned reference bits.

Definition at line 92 of file ViewObjectMarker.hh.


Member Function Documentation

virtual bool ViewObjectMarker::blendForStencilRefBit ( GLuint  _refbit,
GLenum &  _src,
GLenum &  _dst,
ACG::Vec4f &  _color 
) [inline, virtual]

Per reference bit blending values

Parameters:
_refbit stencil reference bit for blending
_src sfactor parameter for glBlendFunc function
_dst dfactor parameter for glBlendFunc function
_color color used for blending
Returns:
should blending be berformed for this reference

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

Parameters:
_reference stencil reference for blending
_src sfactor parameter for glBlendFunc function
_dst dfactor parameter for glBlendFunc function
_color color used for blending
Returns:
should blending be berformed for this reference

Definition at line 118 of file ViewObjectMarker.hh.

virtual bool ViewObjectMarker::stencilRefForObject ( BaseObjectData _obj,
GLuint &  _reference 
) [pure virtual]

Get stencil reference for object

Parameters:
_obj Object
_reference stencil reference for object painting
Returns:
should the reference be used

The documentation for this class was generated from the following file:

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .