Developer Documentation
VolumeMeshBufferManager< VolumeMesh > Class Template Reference

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

#include <Type-OpenVolumeMesh/ObjectTypes/VolumeMeshObject/VolumeMeshBufferManager.hh>

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::VertexDeclarationgetVertexDeclaration ()
 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 ACG::Geometry::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
 
using Plane = ACG::Geometry::Plane
 

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.
 
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 should_render (const VertexHandle &_vh)
 
bool should_render (const HalfEdgeHandle &_heh)
 
bool should_render (const EdgeHandle &_eh)
 
bool should_render (const HalfFaceHandle &_hfh)
 
bool should_render (const FaceHandle &_fh)
 
bool should_render (const CellHandle &_ch)
 
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.
 
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::StatusAttribmStatusAttrib
 
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< ACG::Geometry::Planecut_planes_
 
std::vector< ACG::Vec3dmCogs
 
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 61 of file VolumeMeshBufferManager.hh.

Member Function Documentation

◆ addColorToBuffer() [1/2]

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
_colorThe color that should be inserted
_bufferA pointer to the start of the buffer
_offsetThe offset (in number of vertices) to the place the color should be inserted

Definition at line 172 of file VolumeMeshBufferManagerT_impl.hh.

◆ addColorToBuffer() [2/2]

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
_colorThe color that should be inserted
_bufferA pointer to the start of the buffer
_offsetThe offset (in number of vertices) to the place the color should inserted

Definition at line 194 of file VolumeMeshBufferManagerT_impl.hh.

◆ addCutPlane() [1/2]

template<class VolumeMesh >
void VolumeMeshBufferManager< VolumeMesh >::addCutPlane ( const ACG::Geometry::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
_pThe plane that is added.

Definition at line 434 of file VolumeMeshBufferManagerT_impl.hh.

◆ addCutPlane() [2/2]

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
_pThe position of the plane.
_nThe normal of the plane.
_xsizeThe x-direction of the plane scaled by 1.0/width
_ysizeThe y-direction of the plane scaled by 1.0/height

Definition at line 452 of file VolumeMeshBufferManagerT_impl.hh.

◆ addFloatToBuffer()

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
_valueThe value that should be inserted
_bufferA pointer to the place the value should be inserted to

Definition at line 114 of file VolumeMeshBufferManagerT_impl.hh.

◆ addNormalToBuffer()

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
_normalThe normal that should be inserted
_bufferA pointer to the start of the buffer
_offsetThe offset (in number of vertices) to the place the normal should inserted

Definition at line 214 of file VolumeMeshBufferManagerT_impl.hh.

◆ addPositionToBuffer()

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
_positionThe position that should be inserted
_bufferA pointer to the start of the buffer
_offsetThe offset (in number of vertices) to the place the position should be inserted

Definition at line 153 of file VolumeMeshBufferManagerT_impl.hh.

◆ addTexCoordToBuffer()

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
_texCoordThe texture coordinate that should be inserted
_bufferA pointer to the start of the buffer
_offsetThe offset (in number of vertices) to the place the texture coordinate should inserted

Definition at line 233 of file VolumeMeshBufferManagerT_impl.hh.

◆ addUCharToBuffer()

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
_valueThe value that should be inserted
_bufferA pointer to the place the value should be inserted to

Definition at line 136 of file VolumeMeshBufferManagerT_impl.hh.

◆ buildColorBuffer()

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

Adds all colors to the buffer.

Parameters
_bufferPointer to the start of the buffer

Definition at line 1446 of file VolumeMeshBufferManagerT_impl.hh.

◆ buildNormalBuffer()

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

Adds all normals to the buffer.

Parameters
_bufferPointer to the start of the buffer

Definition at line 1308 of file VolumeMeshBufferManagerT_impl.hh.

◆ buildPickColorBuffer()

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
_stateThe current state which provides the picking colors.
_offsetAn 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
_bufferPointer to the start of the buffer

Definition at line 1772 of file VolumeMeshBufferManagerT_impl.hh.

◆ buildTexCoordBuffer()

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

Adds texture coordinates to the buffer.

Parameters
_bufferPointer to the start of the buffer

Definition at line 1710 of file VolumeMeshBufferManagerT_impl.hh.

◆ buildVertexBuffer()

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

Adds all vertices to the buffer.

Parameters
_bufferPointer to the start of the buffer

Definition at line 1094 of file VolumeMeshBufferManagerT_impl.hh.

◆ calculateCellInsideness()

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 646 of file VolumeMeshBufferManagerT_impl.hh.

◆ calculateCOGs()

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 999 of file VolumeMeshBufferManagerT_impl.hh.

◆ calculateVertexDeclaration()

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 249 of file VolumeMeshBufferManagerT_impl.hh.

◆ clearCutPlanes()

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 419 of file VolumeMeshBufferManagerT_impl.hh.

◆ colorsNeedRebuild()

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 1045 of file VolumeMeshBufferManagerT_impl.hh.

◆ countNumOfVertices()

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 748 of file VolumeMeshBufferManagerT_impl.hh.

◆ free()

template<class VolumeMesh >
void VolumeMeshBufferManager< VolumeMesh >::free ( )

Deletes the buffers on the GPU.

This also invalidates the buffer

Definition at line 2085 of file VolumeMeshBufferManagerT_impl.hh.

◆ getBuffer()

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 1888 of file VolumeMeshBufferManagerT_impl.hh.

◆ getCOG()

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

Returns the center of gravity of the given cell.

Parameters
_chA handle of the cell of interest
Returns
The cell's center of gravity

Definition at line 983 of file VolumeMeshBufferManagerT_impl.hh.

◆ getNumOfIncidentCells() [1/2]

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.

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

Parameters
_fhA Handle of the face of interest
Returns
Number of incident cells that are inside.
Parameters
_ehA handle of the edge of interest
Returns
Number of incident cells that are inside.

Definition at line 924 of file VolumeMeshBufferManagerT_impl.hh.

◆ getNumOfIncidentCells() [2/2]

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
_vhA handle of the vertex of interest
Returns
Number of incident cells that are inside.

Definition at line 965 of file VolumeMeshBufferManagerT_impl.hh.

◆ getPickBuffer()

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

Returns the name of the pick buffer.

Parameters
_stateThe state that provides the picking colors
_offsetThe offset for the picking colors
Returns
The name of the pick buffer

Definition at line 1960 of file VolumeMeshBufferManagerT_impl.hh.

◆ getValenceColorCode()

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

Returns a color code for irregular edges.

Parameters
_valenceNumber of incident cells
_innerFalse if the edge is a boundary edge, True if not
Returns
The appropraite color

Definition at line 726 of file VolumeMeshBufferManagerT_impl.hh.

◆ is_inside() [1/6]

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
_pThe position to be tested.
Returns
True iff the point is inside.

Definition at line 465 of file VolumeMeshBufferManagerT_impl.hh.

◆ is_inside() [2/6]

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
_vhA Handle to the vertex that should be tested.
Returns
True iff the vertex is inside.

Definition at line 492 of file VolumeMeshBufferManagerT_impl.hh.

◆ is_inside() [3/6]

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
_hehA Handle to the halfedge that should be tested.
Returns
True iff the halfadge is inside.

Definition at line 508 of file VolumeMeshBufferManagerT_impl.hh.

◆ is_inside() [4/6]

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.

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

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

Parameters
_ehA Handle to the edge that should be tested.
Returns
True iff the edge is inside.

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

Parameters
_fhA Handle to the face that should be tested.
Returns
True iff the face is inside.

Definition at line 525 of file VolumeMeshBufferManagerT_impl.hh.

◆ is_inside() [5/6]

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
_hfhA Handle to the halfface that should be tested.
Returns
True iff the halfface is inside.

Definition at line 542 of file VolumeMeshBufferManagerT_impl.hh.

◆ is_inside() [6/6]

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
_chA Handle to the cell that should be tested.
Returns
True iff the cell is inside.

Definition at line 579 of file VolumeMeshBufferManagerT_impl.hh.

◆ normalsNeedRebuild()

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 1078 of file VolumeMeshBufferManagerT_impl.hh.

◆ optionsChanged()

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 682 of file VolumeMeshBufferManagerT_impl.hh.

◆ positionsNeedRebuild()

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 1031 of file VolumeMeshBufferManagerT_impl.hh.

◆ saveOptions()

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 700 of file VolumeMeshBufferManagerT_impl.hh.

◆ setDefaultColor()

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
_defaultColorThe default color

Definition at line 311 of file VolumeMeshBufferManagerT_impl.hh.

◆ setOptionsFromDrawMode()

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
_drawModeThe DrawMode for which the options should be set

Definition at line 329 of file VolumeMeshBufferManagerT_impl.hh.

◆ texCoordsNeedRebuild()

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 1063 of file VolumeMeshBufferManagerT_impl.hh.


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