Developer Documentation

Public Types | Public Member Functions | List of all members
ViewObjectMarker Class Referenceabstract

`#include <OpenFlipper/BasePlugin/ViewObjectMarker.hh>`

Inheritance diagram for ViewObjectMarker:

## 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 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 82 of file ViewObjectMarker.hh.

## Member Enumeration Documentation

## ◆ Type

enum ViewObjectMarker::Type

Blending type for this marker.

Enumerator
PerNumber | Mark per returned reference.
PerBit | Mark per returned reference bits.

Definition at line 90 of file ViewObjectMarker.hh.

## Member Function Documentation

## ◆ blendForStencilRefBit()

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 ACG::GLState::blendFunc function
  _dst | dfactor parameter for ACG::GLState::blendFunc function
  _color | color used for blending

Returns
  should blending be performed for this reference

Definition at line 125 of file ViewObjectMarker.hh.

## ◆ blendForStencilRefNumber()

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 ACG::GLState::blendFunc function
  _dst | dfactor parameter for ACG::GLState::blendFunc function
  _color | color used for blending

Returns
  should blending be berformed for this reference

Reimplemented in SelectionObjectMarker, SelectionObjectMarker, DefaultObjectMarker, MoveObjectMarker, and SkeletonMarker.

Definition at line 116 of file ViewObjectMarker.hh.

## ◆ stencilRefForObject()

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

Implemented in SelectionObjectMarker, SelectionObjectMarker, DefaultObjectMarker, MoveObjectMarker, and SkeletonMarker.

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

- OpenFlipper/common/ViewObjectMarker.hh