Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
VolumeMeshBufferManager< VolumeMesh > Class Template Reference

This class creates buffers that can be used to render open volume meshs. More...

`#include <ObjectTypes/VolumeMeshObject/VolumeMeshBufferManager.hh>`

## Classes
class | Plane

## Public Types
enum | PrimitiveMode { PM_NONE, PM_CELLS, PM_FACES, PM_FACES_ON_CELLS, PM_HALFFACES, PM_HALFFACES_ON_CELLS, PM_EDGES, PM_IRREGULAR_EDGES, PM_EDGES_ON_CELLS, PM_HALFEDGES, PM_VERTICES, PM_VERTICES_ON_CELLS }
enum | NormalMode { NM_NONE, NM_FACE, NM_HALFFACE, NM_VERTEX }
enum | ColorMode { CM_NO_COLORS, CM_CELL, CM_FACE, CM_HALFFACE, CM_EDGE, CM_HALFEDGE, CM_VERTEX, CM_PICK }
enum | TexCoordMode { TCM_NONE, TCM_SINGLE_2D }

## Public Member Functions
| VolumeMeshBufferManager (const VolumeMesh &mesh_, OpenVolumeMesh::StatusAttrib &statusAttrib_, OpenVolumeMesh::ColorAttrib< ACG::Vec4f > &colorAttrib_, OpenVolumeMesh::NormalAttrib< VolumeMesh > &normalAttrib_, OpenVolumeMesh::TexCoordAttrib< ACG::Vec2f > &texcoordAttrib_)
void | setScale (double _scale)
| Sets the scale used to shrink cells.
double | getScale () const
| Return the scale used to shrink cells.
unsigned char | getStride ()
| Returns the vertex stride.
unsigned char | getColorOffset ()
| Returns the color's offset within the buffer.
unsigned char | getNormalOffset ()
| Returns the normal's offset within the buffer.
unsigned char | getTexCoordOffset ()
| Returns the texcoord's offset within the buffer.
const ACG::VertexDeclaration * | getVertexDeclaration ()
| Returns a VertexDeclaration for the vertices stored in the buffer.
GLuint | getBuffer ()
| Returns the name of the buffer. More...
GLuint | getPickBuffer (ACG::GLState &_state, unsigned int _offset)
| Returns the name of the pick buffer. More...
void | invalidate ()
| Invalidates the buffer.
void | invalidateGeometry ()
| Invalidates geometry.
void | invalidateColors ()
| Invalidates colors.
void | invalidateNormals ()
| Invalidates normals.
void | invalidateTexCoords ()
| Invalidates texture coordinates.
void | free ()
| Deletes the buffers on the GPU. More...
unsigned int | getNumOfVertices ()
| Returns the number of vertices stored in the buffer.
void | setDefaultColor (ACG::Vec4f _defaultColor)
| Sets the default color. More...
void | setOptionsFromDrawMode (ACG::SceneGraph::DrawModes::DrawMode _drawMode)
| Configures the buffer manager's options from a DrawMode. More...
void | disableColors ()
| Disables colors.
void | enablePerCellColors ()
| Enables per cell colors.
void | enablePerFaceColors ()
| Enables per face colors.
void | enablePerHalffaceColors ()
| Enables per halfface colors.
void | enablePerEdgeColors ()
| Enables per edge colors.
void | enablePerHalfedgeColors ()
| Enables per halfedge colors.
void | enablePerVertexColors ()
| Enables per vertex colors.
void | enablePickColors ()
| Enables picking colors.
void | disableNormals ()
| Disables normals.
void | enablePerFaceNormals ()
| Enables per face normals.
void | enablePerHalffaceNormals ()
| Enables per halfface normals.
void | enablePerVertexNormals ()
| Enables per vertex normals.
void | disablePrimitives ()
| Disables primitives (nothing will be drawn)
void | enableCellPrimitives ()
| Enables cell primitives.
void | enableFacePrimitives ()
| Enables face primitives.
void | enableFaceOnCellPrimitives ()
| Enables face primitives which are drawn on the cells.
void | enableHalffacePrimitives ()
| Enables halfface primitves.
void | enableHalffaceOnCellPrimitives ()
| Enables halfface primitives which are drawn on the cells.
void | enableEdgePrimitives ()
| Enables edge primitves.
void | enableIrregularEdgePrimitives ()
| Enables edge primitives for irregular edges.
void | enableEdgeOnCellPrimitives ()
| Enables edge primitives which are drawn on the cells.
void | enableHalfedgePrimitives ()
| Enables per halfedge primitives.
void | enableVertexPrimitives ()
| Enables vertex primitives.
void | enableVertexOnCellPrimitives ()
| Enables vertex primitives that are drawn on the cells.
void | disableTextures ()
| Disables textures.
void | enableTextureSingle ()
| Enables textures.
bool | selectionOnly ()
| Checks whether only selected primitives should be added to the buffer.
void | setSelectionOnly (bool _selectionOnly)
| Set whether only selected primitves should be added to the buffer.
void | clearCutPlanes ()
| Removes all cut planes. More...
void | addCutPlane (const typename VolumeMeshBufferManager< VolumeMesh >::Plane &_p)
| Adds a cut plane. More...
void | addCutPlane (const ACG::Vec3d &_p, const ACG::Vec3d &_n, const ACG::Vec3d &_xsize, const ACG::Vec3d &_ysize)
| Adds a cut plane. More...
void | setBoundaryOnly (bool _boundaryOnly)
| Sets whether only the boundary primitves should be rendered.

## Private Types
typedef OpenVolumeMesh::VertexHandle | VertexHandle
typedef OpenVolumeMesh::EdgeHandle | EdgeHandle
typedef OpenVolumeMesh::HalfEdgeHandle | HalfEdgeHandle
typedef OpenVolumeMesh::FaceHandle | FaceHandle
typedef OpenVolumeMesh::HalfFaceHandle | HalfFaceHandle
typedef OpenVolumeMesh::CellHandle | CellHandle
typedef VolumeMesh::PointT | Vertex
typedef OpenVolumeMesh::OpenVolumeMeshEdge | Edge
typedef OpenVolumeMesh::OpenVolumeMeshFace | Face
typedef OpenVolumeMesh::OpenVolumeMeshCell | Cell

## Private Member Functions
bool | is_inside (const ACG::Vec3d &_p)
| Tests whether the given point is inside w.r.t. all cut planes. More...
bool | is_inside (const VertexHandle &_vh)
| Tests whether the given vertex is inside w.r.t. all cut planes. More...
bool | is_inside (const HalfEdgeHandle &_heh)
| Tests whether the given halfedge is inside w.r.t. all cut planes. More...
bool | is_inside (const EdgeHandle &_eh)
| Tests whether the given edge is inside w.r.t. all cut planes. More...
bool | is_inside (const HalfFaceHandle &_hfh)
| Tests whether the given halfface is inside w.r.t. all cut planes. More...
bool | is_inside (const FaceHandle &_fh)
| Tests whether the given face is inside w.r.t. all cut planes. More...
bool | is_inside (const CellHandle &_ch)
| Tests whether the given cell is inside w.r.t. all cut planes. More...
void | calculateCellInsideness ()
| Calculates for all cells whether they are inside w.r.t. all cut planes. More...
bool | optionsChanged ()
| Tests whether the options were changed since the last time building the buffer. More...
void | saveOptions ()
| State that the current buffer was built with the current options. More...
void | addFloatToBuffer (float _value, unsigned char *&_buffer)
| Adds a float to the buffer. More...
void | addUCharToBuffer (unsigned char _value, unsigned char *&_buffer)
| Adds an unsigned char to the buffer. More...
void | addPositionToBuffer (ACG::Vec3d _position, unsigned char *_buffer, unsigned int _offset)
| Adds a position to the buffer. More...
void | addColorToBuffer (ACG::Vec4uc _color, unsigned char *_buffer, unsigned int _offset)
| Adds a color to the buffer. More...
void | addColorToBuffer (ACG::Vec4f _color, unsigned char *_buffer, unsigned int _offset)
| Adds a color to the buffer. More...
void | addNormalToBuffer (ACG::Vec3d _normal, unsigned char *_buffer, unsigned int _offset)
| Adds a normal to the buffer. More...
void | addTexCoordToBuffer (ACG::Vec2f _texCoord, unsigned char *_buffer, unsigned int _offset)
| Adds a texture coordnate to the buffer. More...
void | calculateVertexDeclaration ()
| Constructs a VertexDeclaration, the size and the offsets for the vertices stored in the buffer. More...
void | buildVertexBuffer (unsigned char *_buffer)
| Adds all vertices to the buffer. More...
void | buildNormalBuffer (unsigned char *_buffer)
| Adds all normals to the buffer. More...
void | buildColorBuffer (unsigned char *_buffer)
| Adds all colors to the buffer. More...
void | buildTexCoordBuffer (unsigned char *_buffer)
| Adds texture coordinates to the buffer. More...
void | buildPickColorBuffer (ACG::GLState &_state, unsigned int _offset, unsigned char *_buffer)
| Adds all picking colors to the buffer. More...
ACG::Vec4f | getValenceColorCode (unsigned int _valence, bool _inner) const
| Returns a color code for irregular edges. More...
void | countNumOfVertices ()
| Counts the number of vertices that need to be stored in the buffer. More...
int | getNumOfIncidentCells (OpenVolumeMesh::FaceHandle _fh)
| Returns the number of cells that are incident to the given face and also inside w.r.t. all cut planes. More...
int | getNumOfIncidentCells (OpenVolumeMesh::EdgeHandle _eh)
| Returns the number of cells that are incident to the given edge and also inside w.r.t. all cut planes. More...
int | getNumOfIncidentCells (OpenVolumeMesh::VertexHandle _vh)
| Returns the number of cells that are incident to the given vertex and also inside w.r.t. all cut planes. More...
ACG::Vec3d | getCOG (OpenVolumeMesh::CellHandle _ch)
| Returns the center of gravity of the given cell. More...
void | calculateCOGs ()
| Calculates the center of gravity for all cells. More...
bool | positionsNeedRebuild ()
| Checks whether positions need to be rebuild. More...
bool | colorsNeedRebuild ()
| Checks whether colors need to be rebuild. More...
bool | texCoordsNeedRebuild ()
| Checks whether texture coordinates need to be rebuild. More...
bool | normalsNeedRebuild ()
| Checks whether normals need to be rebuild. More...

## Private Attributes
ACG::Vec4f | mDefaultColor
const VolumeMesh & | mMesh
OpenVolumeMesh::StatusAttrib & | mStatusAttrib
OpenVolumeMesh::ColorAttrib < ACG::Vec4f > & | mColorAttrib
OpenVolumeMesh::NormalAttrib < VolumeMesh > & | mNormalAttrib
OpenVolumeMesh::TexCoordAttrib < ACG::Vec2f > & | mTexcoordAttrib
int | mNumOfVertices
int | mCurrentNumOfVertices
unsigned int | mVertexSize
ACG::VertexDeclaration | mVertexDeclaration
int | mColorOffset
int | mNormalOffset
double | mScale
GLuint | mBuffer
unsigned int | mCurrentPickOffset
unsigned int | mGlobalPickOffset
bool | mInvalidated
bool | mGeometryChanged
bool | mNormalsChanged
bool | mColorsChanged
bool | mTexCoordsChanged
VolumeMeshDrawModesContainer | mDrawModes
PrimitiveMode | mPrimitiveMode
NormalMode | mNormalMode
ColorMode | mColorMode
bool | mSkipUnselected
bool | mShowIrregularInnerEdges
bool | mShowIrregularOuterValence2Edges
bool | mSkipRegularEdges
bool | mBoundaryOnly
PrimitiveMode | mCurrentPrimitiveMode
NormalMode | mCurrentNormalMode
ColorMode | mCurrentColorMode
bool | mCurrentSkipUnselected
bool | mCurrentShowIrregularInnerEdges
bool | mCurrentShowIrregularOuterValence2Edges
bool | mCurrentSkipRegularEdges
bool | mCurrentBoundaryOnly
unsigned char | mCurrentVertexSize
unsigned char | mCurrentNormalOffset
unsigned char | mCurrentColorOffset
std::vector< Plane > | cut_planes_
std::vector< ACG::Vec3d > | mCogs
bool | mCogsValid
std::vector< bool > | mCellInsideness
bool | mCellInsidenessValid
TexCoordMode | mTexCoordMode
TexCoordMode | mCurrentTexCoordMode
unsigned char | mTexCoordOffset
unsigned char | mCurrentTexCoordOffset

## Detailed Description

### template<class VolumeMesh>
class VolumeMeshBufferManager< VolumeMesh >

This class creates buffers that can be used to render open volume meshs.

Definition at line 69 of file VolumeMeshBufferManager.hh.

## Member Function Documentation

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::addColorToBuffer | ( | ACG::Vec4uc | _color,
|  | unsigned char * | _buffer,
|  | unsigned int | _offset
| ) |  |
| private

Adds a color to the buffer.

This method should be called after the size of a vertex and the color offset within a vertex was calculated using calculateVertexDeclaration()

Parameters

  _color | The color that should be inserted
  _buffer | A pointer to the start of the buffer
  _offset | The offset (in number of vertices) to the place the color should be inserted

Definition at line 179 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::addColorToBuffer | ( | ACG::Vec4f | _color,
|  | unsigned char * | _buffer,
|  | unsigned int | _offset
| ) |  |
| private

Adds a color to the buffer.

The color is added as unsigned character between 0 and 255 for _color between 0.0f and 1.0f

This method should be called after the size of a vertex and the color offset within a vertex was calculated using calculateVertexDeclaration()

Parameters

  _color | The color that should be inserted
  _buffer | A pointer to the start of the buffer
  _offset | The offset (in number of vertices) to the place the color should inserted

Definition at line 201 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh>

void VolumeMeshBufferManager< VolumeMesh >::addCutPlane | ( | const typename VolumeMeshBufferManager< VolumeMesh >::Plane & | _p | ) |

Adds a cut plane.

After adding the cut plane the buffer is invalidated so it is rebuild the next time someone wants to use it.

Parameters

  _p | The plane that is added.

Definition at line 439 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh>

void VolumeMeshBufferManager< VolumeMesh >::addCutPlane | ( | const ACG::Vec3d & | _p,
|  | const ACG::Vec3d & | _n,
|  | const ACG::Vec3d & | _xsize,
|  | const ACG::Vec3d & | _ysize
| ) |  |

Adds a cut plane.

After adding the cut plane the buffer is invalidated so it is rebuild the next time someone wants to use it.

Parameters

  _p | The position of the plane.
  _n | The normal of the plane.
  _xsize | The x-direction of the plane scaled by 1.0/width
  _ysize | The y-direction of the plane scaled by 1.0/height

Definition at line 457 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::addFloatToBuffer | ( | float | _value,
|  | unsigned char *& | _buffer
| ) |  |
| private

Adds a float to the buffer.

The given value will be inserted at the location the pointer points to. After execution the pointer will point to the element after the inserted one.

Parameters

  _value | The value that should be inserted
  _buffer | A pointer to the place the value should be inserted to

Definition at line 121 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::addNormalToBuffer | ( | ACG::Vec3d | _normal,
|  | unsigned char * | _buffer,
|  | unsigned int | _offset
| ) |  |
| private

Adds a normal to the buffer.

This method should be called after the size of a vertex and the normal offset within a vertex was calculated using calculateVertexDeclaration()

Parameters

  _normal | The normal that should be inserted
  _buffer | A pointer to the start of the buffer
  _offset | The offset (in number of vertices) to the place the normal should inserted

Definition at line 221 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::addPositionToBuffer | ( | ACG::Vec3d | _position,
|  | unsigned char * | _buffer,
|  | unsigned int | _offset
| ) |  |
| private

Adds a position to the buffer.

This method should be called after the size of a vertex was calculated using calculateVertexDeclaration()

Parameters

  _position | The position that should be inserted
  _buffer | A pointer to the start of the buffer
  _offset | The offset (in number of vertices) to the place the position should be inserted

Definition at line 160 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::addTexCoordToBuffer | ( | ACG::Vec2f | _texCoord,
|  | unsigned char * | _buffer,
|  | unsigned int | _offset
| ) |  |
| private

Adds a texture coordnate to the buffer.

This method should be called after the size of a vertex and the normal offset within a vertex was calculated using calculateVertexDeclaration()

Parameters

  _texCoord | The texture coordinate that should be inserted
  _buffer | A pointer to the start of the buffer
  _offset | The offset (in number of vertices) to the place the texture coordinate should inserted

Definition at line 240 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::addUCharToBuffer | ( | unsigned char | _value,
|  | unsigned char *& | _buffer
| ) |  |
| private

Adds an unsigned char to the buffer.

The given value will be inserted at the location the pointer points to. After execution the pointer will point to the element after the inserted one.

Parameters

  _value | The value that should be inserted
  _buffer | A pointer to the place the value should be inserted to

Definition at line 143 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::buildColorBuffer | ( | unsigned char * | _buffer | ) |
| private

Adds all colors to the buffer.

Parameters

  _buffer | Pointer to the start of the buffer

Definition at line 1398 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::buildNormalBuffer | ( | unsigned char * | _buffer | ) |
| private

Adds all normals to the buffer.

Parameters

  _buffer | Pointer to the start of the buffer

Definition at line 1260 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::buildPickColorBuffer | ( | ACG::GLState & | _state,
|  | unsigned int | _offset,
|  | unsigned char * | _buffer
| ) |  |
| private

Adds all picking colors to the buffer.

Parameters

  _state | The current state which provides the picking colors.
  _offset | An offset that is added to the primitive's idx when asking for a picking color. This is necessary when different types of primitives are picked simultaneously. The number of other primives
  _buffer | Pointer to the start of the buffer

Definition at line 1724 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::buildTexCoordBuffer | ( | unsigned char * | _buffer | ) |
| private

Adds texture coordinates to the buffer.

Parameters

  _buffer | Pointer to the start of the buffer

Definition at line 1662 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::buildVertexBuffer | ( | unsigned char * | _buffer | ) |
| private

Adds all vertices to the buffer.

Parameters

  _buffer | Pointer to the start of the buffer

Definition at line 1046 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::calculateCellInsideness | ( |  | ) |
| private

Calculates for all cells whether they are inside w.r.t. all cut planes.

The insideness is stored so it can be reused until the geometry or cut planes change to improve performance.

Definition at line 600 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::calculateCOGs | ( |  | ) |
| private

Calculates the center of gravity for all cells.

The centers of gravity are stored in the property mCogProperty points to. Make sure this points to a correct property before calling this method.

Definition at line 951 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::calculateVertexDeclaration | ( |  | ) |
| private

Constructs a VertexDeclaration, the size and the offsets for the vertices stored in the buffer.

Depending on the current options this method calculates an appropriate VertexDeclaration which can be used for rendering. Also it calculates the vertex stride and the offsets for colors and normals.

Definition at line 256 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::clearCutPlanes | ( |  | ) |

Removes all cut planes.

After removing the cut planes the buffer is invalidated so it is rebuild the next time someone wants to use it.

Definition at line 424 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::colorsNeedRebuild | ( |  | ) |
| private

Checks whether colors need to be rebuild.

Returns
  True iff colors need to be rebuild

Definition at line 997 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::countNumOfVertices | ( |  | ) |
| private

Counts the number of vertices that need to be stored in the buffer.

The number of vertices is stored in mNumOfVertices

Definition at line 702 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::free | ( |  | ) |

Deletes the buffers on the GPU.

This also invalidates the buffer

Definition at line 2037 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

GLuint VolumeMeshBufferManager< VolumeMesh >::getBuffer | ( |  | ) |

Returns the name of the buffer.

This method also builds the buffer when necessary.

Returns
  The name of the buffer

Definition at line 1840 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

ACG::Vec3d VolumeMeshBufferManager< VolumeMesh >::getCOG | ( | OpenVolumeMesh::CellHandle | _ch | ) |
| private

Returns the center of gravity of the given cell.

Parameters

  _ch | A handle of the cell of interest

Returns
  The cell's center of gravity

Definition at line 935 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

int VolumeMeshBufferManager< VolumeMesh >::getNumOfIncidentCells | ( | OpenVolumeMesh::FaceHandle | _fh | ) |
| private

Returns the number of cells that are incident to the given face and also inside w.r.t. all cut planes.

Parameters

  _fh | A Handle of the face of interest

Returns
  Number of incident cells that are inside.

Definition at line 876 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

int VolumeMeshBufferManager< VolumeMesh >::getNumOfIncidentCells | ( | OpenVolumeMesh::EdgeHandle | _eh | ) |
| private

Returns the number of cells that are incident to the given edge and also inside w.r.t. all cut planes.

Parameters

  _eh | A handle of the edge of interest

Returns
  Number of incident cells that are inside.

Definition at line 898 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

int VolumeMeshBufferManager< VolumeMesh >::getNumOfIncidentCells | ( | OpenVolumeMesh::VertexHandle | _vh | ) |
| private

Returns the number of cells that are incident to the given vertex and also inside w.r.t. all cut planes.

Parameters

  _vh | A handle of the vertex of interest

Returns
  Number of incident cells that are inside.

Definition at line 917 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

GLuint VolumeMeshBufferManager< VolumeMesh >::getPickBuffer | ( | ACG::GLState & | _state,
|  | unsigned int | _offset
| ) |  |

Returns the name of the pick buffer.

Parameters

  _state | The state that provides the picking colors
  _offset | The offset for the picking colors

Returns
  The name of the pick buffer

Definition at line 1912 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

ACG::Vec4f VolumeMeshBufferManager< VolumeMesh >::getValenceColorCode | ( | unsigned int | _valence,
|  | bool | _inner
| ) |  | const
| private

Returns a color code for irregular edges.

Parameters

  _valence | Number of incident cells
  _inner | False if the edge is a boundary edge, True if not

Returns
  The appropraite color

Definition at line 680 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::is_inside | ( | const ACG::Vec3d & | _p | ) |
| private

Tests whether the given point is inside w.r.t. all cut planes.

Parameters

  _p | The position to be tested.

Returns
  True iff the point is inside.

Definition at line 470 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::is_inside | ( | const VertexHandle & | _vh | ) |
| private

Tests whether the given vertex is inside w.r.t. all cut planes.

A vertex is considered inside iff its positions is inside.

Parameters

  _vh | A Handle to the vertex that should be tested.

Returns
  True iff the vertex is inside.

Definition at line 497 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::is_inside | ( | const HalfEdgeHandle & | _heh | ) |
| private

Tests whether the given halfedge is inside w.r.t. all cut planes.

A halfedge is considered inside iff both from- and to-vertex are inside.

Parameters

  _heh | A Handle to the halfedge that should be tested.

Returns
  True iff the halfadge is inside.

Definition at line 513 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::is_inside | ( | const EdgeHandle & | _eh | ) |
| private

Tests whether the given edge is inside w.r.t. all cut planes.

An edge is considered inside iff both from- and to-vertex are inside.

Parameters

  _eh | A Handle to the edge that should be tested.

Returns
  True iff the edge is inside.

Definition at line 530 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::is_inside | ( | const HalfFaceHandle & | _hfh | ) |
| private

Tests whether the given halfface is inside w.r.t. all cut planes.

A halfface is considered inside iff all its incident vertices are inside.

Parameters

  _hfh | A Handle to the halfface that should be tested.

Returns
  True iff the halfface is inside.

Definition at line 547 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::is_inside | ( | const FaceHandle & | _fh | ) |
| private

Tests whether the given face is inside w.r.t. all cut planes.

A face is considered inside iff all its incident vertices are inside.

Parameters

  _fh | A Handle to the face that should be tested.

Returns
  True iff the face is inside.

Definition at line 566 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::is_inside | ( | const CellHandle & | _ch | ) |
| private

Tests whether the given cell is inside w.r.t. all cut planes.

A cell is considered inside iff the positions of all its incident vertices moved towards the cell's center of gravity depending on the current scaling parameter are inside.

Parameters

  _ch | A Handle to the cell that should be tested.

Returns
  True iff the cell is inside.

Definition at line 584 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::normalsNeedRebuild | ( |  | ) |
| private

Checks whether normals need to be rebuild.

Returns
  True iff normals need to be rebuild

Definition at line 1030 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::optionsChanged | ( |  | ) |
| private

Tests whether the options were changed since the last time building the buffer.

For this method to work saveOptions() should be called immidiately after building the buffer

Returns
  True if options have changed, False if not

Definition at line 636 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::positionsNeedRebuild | ( |  | ) |
| private

Checks whether positions need to be rebuild.

Returns
  True iff positions need to be rebuild

Definition at line 983 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::saveOptions | ( |  | ) |
| private

State that the current buffer was built with the current options.

This method should be called immidiately after building the buffer

Definition at line 654 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::setDefaultColor | ( | ACG::Vec4f | _defaultColor | ) |

Sets the default color.

The default color is only used for regular edges when drawn together with irregular edges.

Parameters

  _defaultColor | The default color

Definition at line 318 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

void VolumeMeshBufferManager< VolumeMesh >::setOptionsFromDrawMode | ( | ACG::SceneGraph::DrawModes::DrawMode | _drawMode | ) |

Configures the buffer manager's options from a DrawMode.

This method extracts from the given draw mode which primitve mode, color mode and normal mode should be used and which irregular edges should be shown.

Parameters

  _drawMode | The DrawMode for which the options should be set

Definition at line 336 of file VolumeMeshBufferManagerT.cc.

template<class VolumeMesh >

bool VolumeMeshBufferManager< VolumeMesh >::texCoordsNeedRebuild | ( |  | ) |
| private

Checks whether texture coordinates need to be rebuild.

Returns
  True iff colors need to be rebuild

Definition at line 1015 of file VolumeMeshBufferManagerT.cc.

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

- ObjectTypes/VolumeMeshObject/VolumeMeshBufferManager.hh
- ObjectTypes/VolumeMeshObject/VolumeMeshBufferManagerT.cc