Developer Documentation
ACG::DrawMeshT< Mesh > Class Template Reference

Mesh Drawing Class. More...

#include <OpenFlipper/libs_required/ACG/GL/DrawMesh.hh>

Inheritance diagram for ACG::DrawMeshT< Mesh >:
ACG::DrawMeshBase

Classes

struct  Subset
 
struct  VertexProperty
 

Public Types

enum  PropertySource { PROPERTY_SOURCE_VERTEX = 0 , PROPERTY_SOURCE_HALFEDGE , PROPERTY_SOURCE_FACE }
 

Public Member Functions

 DrawMeshT (Mesh &_mesh)
 
void disableColors ()
 
void usePerVertexColors ()
 
void usePerFaceColors ()
 
void setFlatShading ()
 
void setSmoothShading ()
 
void usePerVertexTexcoords ()
 
void usePerHalfedgeTexcoords ()
 
void usePerVertexNormals ()
 
void usePerHalfedgeNormals ()
 
void bindBuffers ()
 eventually rebuilds buffers used for rendering and binds index and vertex buffer More...
 
GLuint getVBO ()
 get opengl vertex buffer id More...
 
GLuint getIBO ()
 get opengl index buffer id More...
 
GLuint getHEVBO ()
 getHEVBO get VBO which stores Halfedges with offset More...
 
VertexDeclarationgetVertexDeclaration ()
 get vertex declaration of the current vbo layout More...
 
unsigned int mapVertexToVBOIndex (unsigned int _v)
 map from vertex index of the original mesh point buffer to the corresponding vertex index inside the VBO. More...
 
void bindBuffersToRenderObject (RenderObject *_obj)
 eventually rebuilds buffers used for rendering and binds index and vertex buffer More...
 
void unbindBuffers ()
 disables vertex, normal, texcoord and color pointers in OpenGL More...
 
void draw (std::map< int, GLuint > *_textureMap, bool _nonindexed=false)
 binds index and vertex buffer and executes draw calls More...
 
void addTriRenderObjects (IRenderer *_renderer, const RenderObject *_baseObj, std::map< int, GLuint > *_textureMap, bool _nonindexed=false)
 adds RenderObjects to a deferred draw call renderer More...
 
void drawLines ()
 render the mesh in wireframe mode More...
 
void addLineRenderObjects (IRenderer *_renderer, const RenderObject *_baseObj)
 render the mesh in wireframe mode, deferred draw call More...
 
void drawVertices ()
 render vertices only More...
 
void addPointRenderObjects (IRenderer *_renderer, const RenderObject *_baseObj)
 render vertices only, deferred draw call More...
 
unsigned int getMemoryUsage (bool _printReport=false)
 measures the size in bytes of allocated memory. eventually prints a report to std::cout More...
 
void updateTopology ()
 request an update for the mesh topology More...
 
void updateGeometry ()
 request an update for the mesh vertices More...
 
void updateTextures ()
 request an update for the textures More...
 
void updateFull ()
 request a full rebuild of the mesh More...
 
unsigned int getNumTextures ()
 returns the number of used textured of this mesh More...
 
void setTextureIndexPropertyName (std::string _indexPropertyName)
 set the name of the property used for texture index specification More...
 
const std::string & getTextureIndexPropertyName () const
 get the name of the texture index property More...
 
void setPerFaceTextureCoordinatePropertyName (std::string _perFaceTextureCoordinatePropertyName)
 set the name of the property used for texture coordinate More...
 
int perFaceTextureCoordinateAvailable ()
 Check if per Face Texture coordinates are available. More...
 
int perFaceTextureIndexAvailable ()
 Check if texture indices are available. More...
 
void addVertexElement (const std::string &_propertyName, PropertySource _source=PROPERTY_SOURCE_VERTEX)
 Add custom elements to the vertex layout. More...
 
bool scanVertexShaderForInput (const std::string &_vertexShaderFile)
 Scan vertex layout from vertex shader. More...
 
void updatePickingVertices (ACG::GLState &_state, uint _offset=0)
 
ACG::Vec4ucpickVertexColorBuffer ()
 get a pointer to the per vertex picking color buffer More...
 
ACG::Vec3fpickVertexBuffer ()
 get a pointer to the per vertex picking vertex buffer More...
 
void drawPickingVertices_opt (const GLMatrixf &_mvp, size_t _pickOffset)
 Optimized rendering of vertex picking ids with a shader. More...
 
bool supportsPickingVertices_opt ()
 Check if optimized vertex picking is supported. More...
 
void updatePickingVertices_opt (ACG::GLState &_state)
 Update color picking array for the shader implementation. More...
 
TextureBufferpickVertexMap_opt ()
 
void updatePickingEdges (ACG::GLState &_state, uint _offset=0)
 Update color picking array for edges. More...
 
ACG::Vec4ucpickEdgeColorBuffer ()
 get a pointer to the per edge picking color buffer More...
 
void drawPickingEdges_opt (const GLMatrixf &_mvp, size_t _pickOffset)
 Optimized rendering of edge picking ids with a shader. More...
 
bool supportsPickingEdges_opt ()
 Check if optimized face picking is supported. More...
 
void updatePickingEdges_opt (ACG::GLState &_state)
 Update color picking array for the shader implementation. More...
 
void updatePickingFaces (ACG::GLState &_state)
 Update color picking array for faces. More...
 
ACG::Vec4ucpickFaceColorBuffer ()
 get a pointer to the per face picking color buffer More...
 
ACG::Vec3fpickFaceVertexBuffer ()
 get a pointer to the per vertex picking color buffer More...
 
void drawPickingFaces_opt (const GLMatrixf &_mvp, size_t _pickOffset)
 Optimized rendering of face picking ids with a shader. More...
 
bool supportsPickingFaces_opt ()
 Check if optimized face picking is supported. More...
 
void updatePickingFaces_opt (ACG::GLState &_state)
 Update color picking array for the shader implementation. More...
 
TextureBufferpickFaceTriangleMap_opt ()
 
void updatePickingAny (ACG::GLState &_state)
 Call this function to update the color picking array. More...
 
ACG::Vec4ucpickAnyFaceColorBuffer ()
 get a pointer to the any picking color buffer More...
 
ACG::Vec4ucpickAnyEdgeColorBuffer ()
 get a pointer to the any picking color buffer More...
 
ACG::Vec4ucpickAnyVertexColorBuffer ()
 get a pointer to the any picking color buffer More...
 
void drawPickingAny_opt (const GLMatrixf &_mvp, size_t _pickOffset)
 Optimized rendering of any picking ids with a shader. More...
 
bool supportsPickingAny_opt ()
 Check if optimized any picking is supported. More...
 
void updatePickingAny_opt (ACG::GLState &_state)
 Update color picking array for the shader implementation. More...
 
void dumpObj (const char *_filename) const
 dump current vertex/index buffer to wavefront obj More...
 
void invalidateFullVBO ()
 the mesh has been changed More...
 
void updateFullVBO ()
 update the full mesh vbo More...
 
void invalidatePerEdgeBuffers ()
 Update of the buffers. More...
 
void updatePerEdgeBuffers ()
 Update all per edge drawing buffers. More...
 
void updatePerEdgeBuffersNew ()
 Update the combined position + color buffer for edge rendering. More...
 
ACG::Vec3fperEdgeVertexBuffer ()
 get a pointer to the per edge vertex buffer More...
 
ACG::Vec4fperEdgeColorBuffer ()
 get a pointer to the per edge color buffer More...
 
void invalidatePerHalfedgeBuffers ()
 Update of the buffers. More...
 
template<typename Mesh::Normal(DrawMeshT::*)(typename Mesh::FaceHandle) NormalLookup>
void updatePerHalfedgeBuffers ()
 Update all per edge drawing buffer n The updated buffers are: per edge vertex buffer ( 2 vertices per edge ) More...
 
ACG::Vec3fperHalfedgeVertexBuffer ()
 get a pointer to the per edge vertex buffer More...
 
ACG::Vec4fperHalfedgeColorBuffer ()
 get a pointer to the per edge color buffer More...
 
void updateEdgeHalfedgeVertexDeclarations ()
 updates per edge and halfedge vertex declarations More...
 
const VertexDeclarationgetEdgeColoredVertexDeclaration () const
 getter for vertex declarations More...
 
const VertexDeclarationgetHalfedgeVertexDeclaration () const
 getter for vertex declarations More...
 
const VertexDeclarationgetHalfedgeColoredVertexDeclaration () const
 getter for vertex declarations More...
 
- Public Member Functions inherited from ACG::DrawMeshBase
size_t getNumTris () const
 
size_t getNumVerts () const
 
MeshCompilergetMeshCompiler ()
 get mesh compiler used to create the draw mesh More...
 
unsigned int getNumSubsets () const
 
GLenum getIndexType () const
 get index type of index buffer More...
 
GLuint pickVertexIBO_opt ()
 get an index buffer mapping from openmesh vertices to drawmesh vbo vertices More...
 

Private Types

enum  REBUILD_TYPE {
  REBUILD_NONE = 0 , REBUILD_FULL = 1 , REBUILD_GEOMETRY = 2 , REBUILD_TOPOLOGY = 4 ,
  REBUILD_TEXTURES = 8
}
 

Private Member Functions

void rebuild ()
 draw_mesh updater More...
 
void readVertex (size_t _vertex, const typename Mesh::VertexHandle &_vh, const typename Mesh::HalfedgeHandle &_hh, const typename Mesh::FaceHandle &_fh)
 reads a vertex from mesh_ and write it to vertex buffer More...
 
unsigned int getVertexColor (const typename Mesh::VertexHandle &_vh)
 return a vertex color from mesh More...
 
unsigned int getFaceColor (const typename Mesh::FaceHandle &_fh)
 return a face color from mesh More...
 
void updateGPUBuffers ()
 eventually update vertex and index buffers More...
 
void createVBO ()
 stores the vertex buffer on the gpu More...
 
void createIBO ()
 stores the index buffer on the gpu More...
 
void createVertexDeclaration ()
 creates all vertex declarations needed for deferred draw call renderer More...
 
unsigned int countTris (unsigned int *_pOutMaxPolyVerts=0, unsigned int *_pOutNumIndices=0)
 Number of triangles after triangulation of the mesh. More...
 
int getTextureIDofTri (unsigned int _tri)
 get the texture index of a triangle More...
 
int getTextureIDofFace (unsigned int _face)
 get the texture index of a face More...
 
const void * getMeshPropertyType (OpenMesh::BaseProperty *_prop, GLuint *_outType, unsigned int *_outSize) const
 get the data type of a mesh property More...
 
template<class T >
const void * testMeshPropertyTypeT (const OpenMesh::BaseProperty *_prop, unsigned int *_outSize) const
 test mesh property for type T More...
 
void writeVertexElement (void *_dstBuf, size_t _vertex, size_t _stride, size_t _elementOffset, size_t _elementSize, const void *_elementData)
 
void writePosition (size_t _vertex, const ACG::Vec3d &_p)
 
void writeNormal (size_t _vertex, const ACG::Vec3d &_n)
 
void writeTexcoord (size_t _vertex, const ACG::Vec2f &_uv)
 
void writeColor (size_t _vertex, unsigned int _color)
 
void writeVertexProperty (size_t _vertex, const VertexElement *_elementDesc, const ACG::Vec4f &_propf)
 
void writeVertexProperty (size_t _vertex, const VertexElement *_elementDesc, const ACG::Vec4d &_propd)
 
void readVertexFromVBO (unsigned int _vertex, void *_dst)
 Read one vertex from the rendering vbo. More...
 
template<typename Mesh::Normal(DrawMeshT::*)(typename Mesh::FaceHandle) NormalLookup>
Mesh::Point halfedge_point (const typename Mesh::HalfedgeHandle _heh)
 compute halfedge point compute visualization point for halfedge (shifted to interior of face) More...
 
Mesh::Normal cachedNormalLookup (typename Mesh::FaceHandle fh)
 
Mesh::Normal computedTriMeshNormal (typename Mesh::FaceHandle fh)
 
Mesh::Normal computedNormal (typename Mesh::FaceHandle fh)
 
Mesh::HalfedgeHandle mapToHalfedgeHandle (size_t _vertexId)
 

Private Attributes

std::vector< ACG::Vec3fpickVertBuf_
 The vertex buffer used for vertex picking. More...
 
std::vector< ACG::Vec4ucpickVertColBuf_
 The color buffer used for vertex picking. More...
 
TextureBuffer pickVertexMapTBO_
 
GLSL::ProgrampickVertexShader_
 
int pickVertexMethod_
 
std::vector< ACG::Vec4ucpickEdgeBuf_
 
GLSL::ProgrampickEdgeShader_
 
std::vector< ACG::Vec3fpickFaceVertexBuf_
 
std::vector< ACG::Vec4ucpickFaceColBuf_
 
TextureBuffer pickFaceTriToFaceMapTBO_
 
GLSL::ProgrampickFaceShader_
 optimized face picking shader More...
 
std::vector< ACG::Vec4ucpickAnyFaceColBuf_
 
std::vector< ACG::Vec4ucpickAnyEdgeColBuf_
 
std::vector< ACG::Vec4ucpickAnyVertexColBuf_
 
Meshmesh_
 OpenMesh object to be rendered. More...
 
unsigned int * indices_
 final index buffer used for rendering More...
 
unsigned int rebuild_
 hint on what to rebuild More...
 
size_t prevNumFaces_
 
size_t prevNumVerts_
 
int colorMode_
 Color Mode: 0: none, 1: per vertex, else: per face. More...
 
int curVBOColorMode_
 Color Mode of vbo. More...
 
int flatMode_
 flat / smooth shade mode toggle More...
 
int bVBOinFlatMode_
 normals in VBO currently in flat / smooth mode More...
 
int textureMode_
 per vertex / halfedge texture mode toggle: 0: per vertex, 1: per halfedge More...
 
int bVBOinHalfedgeTexMode_
 texcoords in VBO currently in per vertex / halfedge mode toggle More...
 
int halfedgeNormalMode_
 per vertex / halfedge normals mode toggle: 0: per vertex, 1: per halfedge More...
 
int bVBOinHalfedgeNormalMode_
 normals in VBO currently in per vertex / halfedge mode toggle More...
 
unsigned int * invVertexMap_
 
const size_t offsetPos_
 fixed vertex elements: More...
 
const size_t offsetNormal_
 
const size_t offsetTexc_
 
const size_t offsetColor_
 
std::vector< VertexPropertyadditionalElements_
 additional optional elements More...
 
std::string textureIndexPropertyName_
 Property for the per face texture index. More...
 
std::string perFaceTextureCoordinatePropertyName_
 Property for the per face texture coordinates. More...
 
GeometryBuffer vboFull_
 
bool updateFullVBO_
 
GeometryBuffer vboEdges_
 
int updatePerEdgeBuffers_
 
std::vector< ACG::Vec3fperEdgeVertexBuf_
 
std::vector< ACG::Vec4fperEdgeColorBuf_
 
std::vector< float > perEdgeBuf_
 
int updatePerHalfedgeBuffers_
 
std::vector< ACG::Vec3fperHalfedgeVertexBuf_
 
std::vector< ACG::Vec4fperHalfedgeColorBuf_
 

Additional Inherited Members

- Protected Member Functions inherited from ACG::DrawMeshBase
void deleteIbo ()
 
void bindVbo ()
 
void bindIbo ()
 
void bindLineIbo ()
 
void bindHEVbo ()
 
void unbindHEVbo ()
 
void bindPickVertexIbo ()
 
void createIndexBuffer ()
 
void fillLineBuffer (size_t n_edges, void *data)
 
void fillHEVBO (size_t numberOfElements_, size_t sizeOfElements_, void *data_)
 
void fillVertexBuffer ()
 
void fillInvVertexMap (size_t n_vertices, void *data)
 
- Protected Attributes inherited from ACG::DrawMeshBase
GLuint vbo_
 
GLuint ibo_
 
size_t numTris_
 
size_t numVerts_
 
MeshCompilermeshComp_
 
GLuint lineIBO_
 index buffer used in Wireframe / Hiddenline mode More...
 
GLuint heVBO_
 vbo for halfedge rendering, as they are offset More...
 
GLint prevVBO_
 
GLenum indexType_
 support for 2 and 4 byte unsigned integers More...
 
std::vector< char > vertices_
 
VertexDeclarationvertexDecl_
 vertex buffer layout declaration with per vertex colors More...
 
VertexDeclarationvertexDeclEdgeCol_
 vertex buffer layout declaration with per edge colors, legacy path More...
 
VertexDeclaration vertexDeclEdgeNew_
 vertex buffer layout declaration with per edge colors More...
 
VertexDeclarationvertexDeclHalfedgeCol_
 vertex buffer layout declaration with per halfedge colors More...
 
VertexDeclarationvertexDeclHalfedgePos_
 vertex buffer layout declaration with halfedge positions only More...
 
GLuint pickVertexIBO_
 map from openmesh vertex to vbo vertex id More...
 

Detailed Description

template<class Mesh>
class ACG::DrawMeshT< Mesh >

Mesh Drawing Class.

This class creates a new mesh for efficient rendering based on an OpenMesh object. DrawMesh also supports optimized picking and toggling between vertex/halfedge/face normals and vertex/halfedge texcoords.

It is not recommended to use this class if the input mesh does not implement an OpenMesh kernel. Instead, MeshCompiler can be used directly to build the vertex and index buffer.

Definition at line 171 of file DrawMesh.hh.

Member Enumeration Documentation

◆ PropertySource

template<class Mesh >
enum ACG::DrawMeshT::PropertySource

Definition at line 350 of file DrawMesh.hh.

◆ REBUILD_TYPE

template<class Mesh >
enum ACG::DrawMeshT::REBUILD_TYPE
private

Definition at line 182 of file DrawMesh.hh.

Constructor & Destructor Documentation

◆ DrawMeshT()

template<class Mesh >
ACG::DrawMeshT< Mesh >::DrawMeshT ( Mesh _mesh)
explicit

Definition at line 75 of file DrawMeshT_impl.hh.

◆ ~DrawMeshT()

template<class Mesh >
ACG::DrawMeshT< Mesh >::~DrawMeshT ( void  )
virtual

Definition at line 1160 of file DrawMeshT_impl.hh.

Member Function Documentation

◆ addLineRenderObjects()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::addLineRenderObjects ( IRenderer _renderer,
const RenderObject _baseObj 
)

render the mesh in wireframe mode, deferred draw call

Definition at line 1501 of file DrawMeshT_impl.hh.

◆ addPointRenderObjects()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::addPointRenderObjects ( IRenderer _renderer,
const RenderObject _baseObj 
)

render vertices only, deferred draw call

Definition at line 1526 of file DrawMeshT_impl.hh.

◆ addTriRenderObjects()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::addTriRenderObjects ( IRenderer _renderer,
const RenderObject _baseObj,
std::map< int, GLuint > *  _textureMap,
bool  _nonindexed = false 
)

adds RenderObjects to a deferred draw call renderer

Parameters
_rendererrenderobjects are added to this renderer
_baseObjaddress of the base renderobject with information about shader generation, gl states, matrices ..
_textureMapmaps from internally texture-id to OpenGL texture id
_nonindexeduse non-indexed vbo instead of optimized indexed vbo (should be avoided if possible) may be null to disable textured rendering

Definition at line 1413 of file DrawMeshT_impl.hh.

◆ addVertexElement()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::addVertexElement ( const std::string &  _propertyName,
PropertySource  _source = PROPERTY_SOURCE_VERTEX 
)

Add custom elements to the vertex layout.

Parameters
_propertyNamename id of property in OpenMesh
_sourcesource of property, ie per vertex, per face or per halfedge

Definition at line 2571 of file DrawMeshT_impl.hh.

◆ bindBuffers()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::bindBuffers

eventually rebuilds buffers used for rendering and binds index and vertex buffer

Definition at line 1302 of file DrawMeshT_impl.hh.

◆ bindBuffersToRenderObject()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::bindBuffersToRenderObject ( RenderObject _obj)

eventually rebuilds buffers used for rendering and binds index and vertex buffer

Definition at line 1332 of file DrawMeshT_impl.hh.

◆ cachedNormalLookup()

template<class Mesh >
Mesh::Normal ACG::DrawMeshT< Mesh >::cachedNormalLookup ( typename Mesh::FaceHandle  fh)
inlineprivate

Definition at line 1084 of file DrawMesh.hh.

◆ computedNormal()

template<class Mesh >
Mesh::Normal ACG::DrawMeshT< Mesh >::computedNormal ( typename Mesh::FaceHandle  fh)
inlineprivate

Definition at line 1098 of file DrawMesh.hh.

◆ computedTriMeshNormal()

template<class Mesh >
Mesh::Normal ACG::DrawMeshT< Mesh >::computedTriMeshNormal ( typename Mesh::FaceHandle  fh)
inlineprivate

Definition at line 1089 of file DrawMesh.hh.

◆ countTris()

template<class Mesh >
unsigned int ACG::DrawMeshT< Mesh >::countTris ( unsigned int *  _pOutMaxPolyVerts = 0,
unsigned int *  _pOutNumIndices = 0 
)
private

Number of triangles after triangulation of the mesh.

returns the number of tris after triangulation of this mesh if needed, also returns the highest number of vertices of a face

Parameters
_pOutMaxPolyVertsmax face size
_pOutNumIndicestotal number of indices
Returns
number of triangles

Definition at line 1542 of file DrawMeshT_impl.hh.

◆ createIBO()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::createIBO
private

stores the index buffer on the gpu

Definition at line 1107 of file DrawMeshT_impl.hh.

◆ createVBO()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::createVBO
private

stores the vertex buffer on the gpu

Definition at line 900 of file DrawMeshT_impl.hh.

◆ createVertexDeclaration()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::createVertexDeclaration
private

creates all vertex declarations needed for deferred draw call renderer

Definition at line 2408 of file DrawMeshT_impl.hh.

◆ disableColors()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::disableColors ( )
inline

Definition at line 190 of file DrawMesh.hh.

◆ draw()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::draw ( std::map< int, GLuint > *  _textureMap,
bool  _nonindexed = false 
)

binds index and vertex buffer and executes draw calls

Parameters
_textureMapmaps from internally texture-id to OpenGL texture id, may be null to disable textured rendering
_nonindexeduse unoptimized non-indexed vbo for rendering, not as efficient in terms of memory usage and performance as an indexed draw call.

Definition at line 1360 of file DrawMeshT_impl.hh.

◆ drawLines()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::drawLines

render the mesh in wireframe mode

Definition at line 1485 of file DrawMeshT_impl.hh.

◆ drawPickingAny_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::drawPickingAny_opt ( const GLMatrixf _mvp,
size_t  _pickOffset 
)

Optimized rendering of any picking ids with a shader.

Parameters
_mvpmodel view projection transformation
_pickOffsetbase picking id of the first element

Definition at line 2294 of file DrawMeshT_impl.hh.

◆ drawPickingEdges_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::drawPickingEdges_opt ( const GLMatrixf _mvp,
size_t  _pickOffset 
)

Optimized rendering of edge picking ids with a shader.

Parameters
_mvpmodel view projection transformation
_pickOffsetbase picking id of the first edge

Definition at line 2000 of file DrawMeshT_impl.hh.

◆ drawPickingFaces_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::drawPickingFaces_opt ( const GLMatrixf _mvp,
size_t  _pickOffset 
)

Optimized rendering of face picking ids with a shader.

Parameters
_mvpmodel view projection transformation
_pickOffsetbase picking id of the first face

Definition at line 2132 of file DrawMeshT_impl.hh.

◆ drawPickingVertices_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::drawPickingVertices_opt ( const GLMatrixf _mvp,
size_t  _pickOffset 
)

Optimized rendering of vertex picking ids with a shader.

Parameters
_mvpmodel view projection transformation
_pickOffsetbase picking id of the first vertex

Definition at line 1682 of file DrawMeshT_impl.hh.

◆ drawVertices()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::drawVertices

render vertices only

Definition at line 1514 of file DrawMeshT_impl.hh.

◆ dumpObj()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::dumpObj ( const char *  _filename) const

dump current vertex/index buffer to wavefront obj

Parameters
_filenamefile name of obj file

Definition at line 2715 of file DrawMeshT_impl.hh.

◆ getEdgeColoredVertexDeclaration()

template<class Mesh >
const VertexDeclaration * ACG::DrawMeshT< Mesh >::getEdgeColoredVertexDeclaration ( ) const
inline

getter for vertex declarations

Definition at line 1051 of file DrawMesh.hh.

◆ getFaceColor()

template<class Mesh >
unsigned int ACG::DrawMeshT< Mesh >::getFaceColor ( const typename Mesh::FaceHandle _fh)
private

return a face color from mesh

Parameters
_fhmesh face handle

Definition at line 856 of file DrawMeshT_impl.hh.

◆ getHalfedgeColoredVertexDeclaration()

template<class Mesh >
const VertexDeclaration * ACG::DrawMeshT< Mesh >::getHalfedgeColoredVertexDeclaration ( ) const
inline

getter for vertex declarations

Definition at line 1059 of file DrawMesh.hh.

◆ getHalfedgeVertexDeclaration()

template<class Mesh >
const VertexDeclaration * ACG::DrawMeshT< Mesh >::getHalfedgeVertexDeclaration ( ) const
inline

getter for vertex declarations

Definition at line 1055 of file DrawMesh.hh.

◆ getHEVBO()

template<class Mesh >
GLuint ACG::DrawMeshT< Mesh >::getHEVBO ( )
inline

getHEVBO get VBO which stores Halfedges with offset

Returns
GLuint the VBO

Definition at line 218 of file DrawMesh.hh.

◆ getIBO()

template<class Mesh >
GLuint ACG::DrawMeshT< Mesh >::getIBO

get opengl index buffer id

Definition at line 1281 of file DrawMeshT_impl.hh.

◆ getMemoryUsage()

template<class Mesh >
unsigned int ACG::DrawMeshT< Mesh >::getMemoryUsage ( bool  _printReport = false)

measures the size in bytes of allocated memory. eventually prints a report to std::cout

Definition at line 1169 of file DrawMeshT_impl.hh.

◆ getMeshPropertyType()

template<class Mesh >
const void * ACG::DrawMeshT< Mesh >::getMeshPropertyType ( OpenMesh::BaseProperty _prop,
GLuint *  _outType,
unsigned int *  _outSize 
) const
private

get the data type of a mesh property

Parameters
_propmesh property
_outType[out] data type i.e. GL_FLOAT, GL_DOUBLE
_outSize[out] number of atoms in range 1..4
Returns
address of property data

Definition at line 162 of file DrawMeshT_impl.hh.

◆ getNumTextures()

template<class Mesh >
unsigned int ACG::DrawMeshT< Mesh >::getNumTextures

returns the number of used textured of this mesh

Returns
Number of different textures used in the mesh

Definition at line 2362 of file DrawMeshT_impl.hh.

◆ getTextureIDofFace()

template<class Mesh >
int ACG::DrawMeshT< Mesh >::getTextureIDofFace ( unsigned int  _face)
private

get the texture index of a face

Parameters
_faceFace index
Returns
Face Texture id of face

Definition at line 878 of file DrawMeshT_impl.hh.

◆ getTextureIDofTri()

template<class Mesh >
int ACG::DrawMeshT< Mesh >::getTextureIDofTri ( unsigned int  _tri)
private

get the texture index of a triangle

Parameters
_triTriangle index (-1 if not available)
Returns
Texture index of a triangle

Definition at line 892 of file DrawMeshT_impl.hh.

◆ getTextureIndexPropertyName()

template<class Mesh >
const std::string & ACG::DrawMeshT< Mesh >::getTextureIndexPropertyName ( ) const
inline

get the name of the texture index property

Returns
name of the texture index property

Definition at line 320 of file DrawMesh.hh.

◆ getVBO()

template<class Mesh >
GLuint ACG::DrawMeshT< Mesh >::getVBO

get opengl vertex buffer id

Definition at line 1274 of file DrawMeshT_impl.hh.

◆ getVertexColor()

template<class Mesh >
unsigned int ACG::DrawMeshT< Mesh >::getVertexColor ( const typename Mesh::VertexHandle _vh)
private

return a vertex color from mesh

Parameters
_vhmesh vertex handle

Definition at line 834 of file DrawMeshT_impl.hh.

◆ getVertexDeclaration()

template<class Mesh >
VertexDeclaration * ACG::DrawMeshT< Mesh >::getVertexDeclaration

get vertex declaration of the current vbo layout

Definition at line 2484 of file DrawMeshT_impl.hh.

◆ halfedge_point()

template<class Mesh >
template<typename Mesh::Normal(DrawMeshT< Mesh >::*)(typename Mesh::FaceHandle) NormalLookup>
Mesh::Point ACG::DrawMeshT< Mesh >::halfedge_point ( const typename Mesh::HalfedgeHandle  _heh)
private

compute halfedge point compute visualization point for halfedge (shifted to interior of face)

Parameters
_heh
Returns

Definition at line 1885 of file DrawMeshT_impl.hh.

◆ invalidateFullVBO()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::invalidateFullVBO

the mesh has been changed

call this function if you changed anything of the mesh.

Definition at line 2778 of file DrawMeshT_impl.hh.

◆ invalidatePerEdgeBuffers()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::invalidatePerEdgeBuffers ( )
inline

Update of the buffers.

This function will set all per edge buffers to invalid and will force an update whe they are requested

Definition at line 992 of file DrawMesh.hh.

◆ invalidatePerHalfedgeBuffers()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::invalidatePerHalfedgeBuffers ( )
inline

Update of the buffers.

This function will set all per edge buffers to invalid and will force an update whe they are requested

Definition at line 1022 of file DrawMesh.hh.

◆ mapToHalfedgeHandle()

template<class Mesh >
Mesh::HalfedgeHandle ACG::DrawMeshT< Mesh >::mapToHalfedgeHandle ( size_t  _vertexId)
private

Definition at line 2491 of file DrawMeshT_impl.hh.

◆ mapVertexToVBOIndex()

template<class Mesh >
unsigned int ACG::DrawMeshT< Mesh >::mapVertexToVBOIndex ( unsigned int  _v)

map from vertex index of the original mesh point buffer to the corresponding vertex index inside the VBO.

Parameters
_vvertex index into mesh points
Returns
vertex index into VBO

Definition at line 1288 of file DrawMeshT_impl.hh.

◆ perEdgeColorBuffer()

template<class Mesh >
ACG::Vec4f * ACG::DrawMeshT< Mesh >::perEdgeColorBuffer

get a pointer to the per edge color buffer

This function will return a pointer to the first element of the color buffer.

Definition at line 1584 of file DrawMeshT_impl.hh.

◆ perEdgeVertexBuffer()

template<class Mesh >
ACG::Vec3f * ACG::DrawMeshT< Mesh >::perEdgeVertexBuffer

get a pointer to the per edge vertex buffer

This function will return a pointer to the first element of the vertex buffer.

Definition at line 1575 of file DrawMeshT_impl.hh.

◆ perFaceTextureCoordinateAvailable()

template<class Mesh >
int ACG::DrawMeshT< Mesh >::perFaceTextureCoordinateAvailable

Check if per Face Texture coordinates are available.

If this function returns true, a per face per vertex texture array is available

Returns
zero if not available, nonzero otherwise

Definition at line 2374 of file DrawMeshT_impl.hh.

◆ perFaceTextureIndexAvailable()

template<class Mesh >
int ACG::DrawMeshT< Mesh >::perFaceTextureIndexAvailable

Check if texture indices are available.

If this function returns true, the strip processor will respect textures during strip generation. Each returned strip has than an index that has to be used as a texture index during strip rendering.

Returns
zero if not available, nonzero otherwise

Definition at line 2390 of file DrawMeshT_impl.hh.

◆ perHalfedgeColorBuffer()

template<class Mesh >
ACG::Vec4f * ACG::DrawMeshT< Mesh >::perHalfedgeColorBuffer

get a pointer to the per edge color buffer

This function will return a pointer to the first element of the color buffer.

Definition at line 1929 of file DrawMeshT_impl.hh.

◆ perHalfedgeVertexBuffer()

template<class Mesh >
ACG::Vec3f * ACG::DrawMeshT< Mesh >::perHalfedgeVertexBuffer

get a pointer to the per edge vertex buffer

This function will return a pointer to the first element of the vertex buffer.

Definition at line 1914 of file DrawMeshT_impl.hh.

◆ pickAnyEdgeColorBuffer()

template<class Mesh >
ACG::Vec4uc * ACG::DrawMeshT< Mesh >::pickAnyEdgeColorBuffer ( )
inline

get a pointer to the any picking color buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingAny to update the buffer before you render it via ACG::GLState::colorPointer.

Returns
Pointer to the first element of the picking buffer

Definition at line 702 of file DrawMesh.hh.

◆ pickAnyFaceColorBuffer()

template<class Mesh >
ACG::Vec4uc * ACG::DrawMeshT< Mesh >::pickAnyFaceColorBuffer ( )
inline

get a pointer to the any picking color buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingAny to update the buffer before you render it via ACG::GLState::colorPointer.

Returns
Pointer to the first element of the picking buffer

Definition at line 685 of file DrawMesh.hh.

◆ pickAnyVertexColorBuffer()

template<class Mesh >
ACG::Vec4uc * ACG::DrawMeshT< Mesh >::pickAnyVertexColorBuffer ( )
inline

get a pointer to the any picking color buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingAny to update the buffer before you render it via ACG::GLState::colorPointer.

Returns
Pointer to the first element of the picking buffer

Definition at line 719 of file DrawMesh.hh.

◆ pickEdgeColorBuffer()

template<class Mesh >
ACG::Vec4uc * ACG::DrawMeshT< Mesh >::pickEdgeColorBuffer ( )
inline

get a pointer to the per edge picking color buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingEdges to update the buffer before you render it via ACG::GLState::colorPointer.

Returns
pointer to the first element of the picking buffer

Definition at line 547 of file DrawMesh.hh.

◆ pickFaceColorBuffer()

template<class Mesh >
ACG::Vec4uc * ACG::DrawMeshT< Mesh >::pickFaceColorBuffer ( )
inline

get a pointer to the per face picking color buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingFaces to update the buffer before you render it via ACG::GLState::colorPointer.

Returns
pointer to the per face picking color buffer

Definition at line 600 of file DrawMesh.hh.

◆ pickFaceTriangleMap_opt()

template<class Mesh >
TextureBuffer * ACG::DrawMeshT< Mesh >::pickFaceTriangleMap_opt ( )
inline

Definition at line 646 of file DrawMesh.hh.

◆ pickFaceVertexBuffer()

template<class Mesh >
ACG::Vec3f * ACG::DrawMeshT< Mesh >::pickFaceVertexBuffer ( )
inline

get a pointer to the per vertex picking color buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingFaces to update the buffer before you render it via ACG::GLState::colorPointer.

Returns
pointer to the first element of the picking buffer

Definition at line 617 of file DrawMesh.hh.

◆ pickVertexBuffer()

template<class Mesh >
ACG::Vec3f * ACG::DrawMeshT< Mesh >::pickVertexBuffer ( )
inline

get a pointer to the per vertex picking vertex buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingVertices to update the buffer before you render it via ACG::GLState::vertexPointer.

Returns
pointer to the first element of the picking buffer

Definition at line 466 of file DrawMesh.hh.

◆ pickVertexColorBuffer()

template<class Mesh >
ACG::Vec4uc * ACG::DrawMeshT< Mesh >::pickVertexColorBuffer ( )
inline

get a pointer to the per vertex picking color buffer

This function will return a pointer to the first element of the picking buffer. Use updatePickingVertices to update the buffer before you render it via ACG::GLState::colorPointer.

Returns
pointer to the first element of the picking buffer

Definition at line 449 of file DrawMesh.hh.

◆ pickVertexMap_opt()

template<class Mesh >
TextureBuffer * ACG::DrawMeshT< Mesh >::pickVertexMap_opt ( )
inline

Definition at line 496 of file DrawMesh.hh.

◆ readVertex()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::readVertex ( size_t  _vertex,
const typename Mesh::VertexHandle _vh,
const typename Mesh::HalfedgeHandle _hh,
const typename Mesh::FaceHandle _fh 
)
private

reads a vertex from mesh_ and write it to vertex buffer

Parameters
_vertextarget vertex id in vbo
_vhmesh vertex handle to read from
_hhcorresponding halfedge handle of this vertex
_fhcorresponding face handle of this vertex

Definition at line 755 of file DrawMeshT_impl.hh.

◆ readVertexFromVBO()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::readVertexFromVBO ( unsigned int  _vertex,
void *  _dst 
)
private

Read one vertex from the rendering vbo.

Parameters
_vertexvertex id from the rendering vbo (not the original input id from openmesh!)
_dst[out] pointer to address that will store the vertex. Must have enough space allocated, see vertex declaration stride to get the number of bytes

Definition at line 2760 of file DrawMeshT_impl.hh.

◆ rebuild()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::rebuild
private

draw_mesh updater

Definition at line 407 of file DrawMeshT_impl.hh.

◆ scanVertexShaderForInput()

template<class Mesh >
bool ACG::DrawMeshT< Mesh >::scanVertexShaderForInput ( const std::string &  _vertexShaderFile)

Scan vertex layout from vertex shader.

Scans a vertex shader for inputs and tries to get the matching properties from OpenMesh. The name of the input attribute in the shader has to match the property name in OpenMesh. Per halfedge properties are preferred over per vertex properties when available. Per face properties are used if the attribute is qualified as "flat" in the shader.

Parameters
_vertexShaderFilefilename of vertex shader (or vertex shader template)
Returns
true if all requested properties are available, false otherwise

Definition at line 2601 of file DrawMeshT_impl.hh.

◆ setFlatShading()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::setFlatShading ( )
inline

Definition at line 194 of file DrawMesh.hh.

◆ setPerFaceTextureCoordinatePropertyName()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::setPerFaceTextureCoordinatePropertyName ( std::string  _perFaceTextureCoordinatePropertyName)

set the name of the property used for texture coordinate

The given property name will define per face Texture coordinates. This property has to be a halfedge property. The coordinate on each edge is the texture coordinate of the to vertex. If this property is not available, textures will not be processed by the strip processor.

Parameters
_perFaceTextureCoordinatePropertyName

Definition at line 2341 of file DrawMeshT_impl.hh.

◆ setSmoothShading()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::setSmoothShading ( )
inline

Definition at line 195 of file DrawMesh.hh.

◆ setTextureIndexPropertyName()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::setTextureIndexPropertyName ( std::string  _indexPropertyName)

set the name of the property used for texture index specification

The given property name will define a texture index. The strip processor checks this property and generates strips which contain only the same index. If the property is not found, strips will be independent of this property

Parameters
_indexPropertyName

Definition at line 2317 of file DrawMeshT_impl.hh.

◆ supportsPickingAny_opt()

template<class Mesh >
bool ACG::DrawMeshT< Mesh >::supportsPickingAny_opt

Check if optimized any picking is supported.

Definition at line 2287 of file DrawMeshT_impl.hh.

◆ supportsPickingEdges_opt()

template<class Mesh >
bool ACG::DrawMeshT< Mesh >::supportsPickingEdges_opt

Check if optimized face picking is supported.

Definition at line 1986 of file DrawMeshT_impl.hh.

◆ supportsPickingFaces_opt()

template<class Mesh >
bool ACG::DrawMeshT< Mesh >::supportsPickingFaces_opt

Check if optimized face picking is supported.

Definition at line 2115 of file DrawMeshT_impl.hh.

◆ supportsPickingVertices_opt()

template<class Mesh >
bool ACG::DrawMeshT< Mesh >::supportsPickingVertices_opt

Check if optimized vertex picking is supported.

Definition at line 1658 of file DrawMeshT_impl.hh.

◆ testMeshPropertyTypeT()

template<class Mesh >
template<class T >
const void * ACG::DrawMeshT< Mesh >::testMeshPropertyTypeT ( const OpenMesh::BaseProperty _prop,
unsigned int *  _outSize 
) const
private

test mesh property for type T

Test whether property is of type T (eg float) or is a vector of type T. Property vectors up to size 4 are supported (native vertex properties).

Parameters
_propmesh property
_outSize[out] number of atoms in range 1..4, set to 0 if test failed
Returns
address of property data, 0 if test failed

Definition at line 110 of file DrawMeshT_impl.hh.

◆ unbindBuffers()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::unbindBuffers

disables vertex, normal, texcoord and color pointers in OpenGL

Definition at line 1346 of file DrawMeshT_impl.hh.

◆ updateEdgeHalfedgeVertexDeclarations()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updateEdgeHalfedgeVertexDeclarations

updates per edge and halfedge vertex declarations

Definition at line 2465 of file DrawMeshT_impl.hh.

◆ updateFull()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updateFull ( )
inline

request a full rebuild of the mesh

Definition at line 298 of file DrawMesh.hh.

◆ updateFullVBO()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updateFullVBO

update the full mesh vbo

the full vbo is the non-indexed version for drawing. it's not optimized for rendering at all and it uses lots of memory, so should only be used as last resort.

Definition at line 2785 of file DrawMeshT_impl.hh.

◆ updateGeometry()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updateGeometry ( )
inline

request an update for the mesh vertices

Definition at line 289 of file DrawMesh.hh.

◆ updateGPUBuffers()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updateGPUBuffers
private

eventually update vertex and index buffers

Definition at line 1249 of file DrawMeshT_impl.hh.

◆ updatePerEdgeBuffers()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePerEdgeBuffers

Update all per edge drawing buffers.

The updated buffers are: vertex buffer ( 2 vertices per edge ), color buffer. Only used in legacy rendering

Definition at line 1752 of file DrawMeshT_impl.hh.

◆ updatePerEdgeBuffersNew()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePerEdgeBuffersNew

Update the combined position + color buffer for edge rendering.

Definition at line 1789 of file DrawMeshT_impl.hh.

◆ updatePerHalfedgeBuffers()

template<class Mesh >
template<typename Mesh::Normal(DrawMeshT< Mesh >::*)(typename Mesh::FaceHandle) NormalLookup>
void ACG::DrawMeshT< Mesh >::updatePerHalfedgeBuffers

Update all per edge drawing buffer n The updated buffers are: per edge vertex buffer ( 2 vertices per edge )

Definition at line 1832 of file DrawMeshT_impl.hh.

◆ updatePickingAny()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingAny ( ACG::GLState _state)

Call this function to update the color picking array.

This function calls the updatePickingVertices, updatePickingEdges, updatePickingVertices functions with an appropriate offset so that the standard arrays will be updated.

Parameters
_stateOpenGL state

Definition at line 2201 of file DrawMeshT_impl.hh.

◆ updatePickingAny_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingAny_opt ( ACG::GLState _state)

Update color picking array for the shader implementation.

Parameters
_state

Definition at line 2277 of file DrawMeshT_impl.hh.

◆ updatePickingEdges()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingEdges ( ACG::GLState _state,
uint  _offset = 0 
)

Update color picking array for edges.

Call this function to update the color picking array The _offsett value can be used to shift the color in the resulting arrays. pick Any uses the offset to generate arrays for picking everything.

Parameters
_state
_offset

Definition at line 1947 of file DrawMeshT_impl.hh.

◆ updatePickingEdges_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingEdges_opt ( ACG::GLState _state)

Update color picking array for the shader implementation.

Parameters
_state

Definition at line 1972 of file DrawMeshT_impl.hh.

◆ updatePickingFaces()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingFaces ( ACG::GLState _state)

Update color picking array for faces.

Parameters
_state

Definition at line 2051 of file DrawMeshT_impl.hh.

◆ updatePickingFaces_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingFaces_opt ( ACG::GLState _state)

Update color picking array for the shader implementation.

Parameters
_state

Definition at line 2096 of file DrawMeshT_impl.hh.

◆ updatePickingVertices()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingVertices ( ACG::GLState _state,
uint  _offset = 0 
)

Call this function to update the color picking array The _offsett value can be used to shift the color in the resulting arrays. pick Any uses the offset to generate arrays for picking everything.

Parameters
_state
_offset

Definition at line 1594 of file DrawMeshT_impl.hh.

◆ updatePickingVertices_opt()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updatePickingVertices_opt ( ACG::GLState _state)

Update color picking array for the shader implementation.

Parameters
_state

Definition at line 1614 of file DrawMeshT_impl.hh.

◆ updateTextures()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updateTextures ( )
inline

request an update for the textures

Definition at line 293 of file DrawMesh.hh.

◆ updateTopology()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::updateTopology ( )
inline

request an update for the mesh topology

Definition at line 285 of file DrawMesh.hh.

◆ usePerFaceColors()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::usePerFaceColors ( )
inline

Definition at line 192 of file DrawMesh.hh.

◆ usePerHalfedgeNormals()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::usePerHalfedgeNormals ( )
inline

Definition at line 200 of file DrawMesh.hh.

◆ usePerHalfedgeTexcoords()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::usePerHalfedgeTexcoords ( )
inline

Definition at line 198 of file DrawMesh.hh.

◆ usePerVertexColors()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::usePerVertexColors ( )
inline

Definition at line 191 of file DrawMesh.hh.

◆ usePerVertexNormals()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::usePerVertexNormals ( )
inline

Definition at line 199 of file DrawMesh.hh.

◆ usePerVertexTexcoords()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::usePerVertexTexcoords ( )
inline

Definition at line 197 of file DrawMesh.hh.

◆ writeColor()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::writeColor ( size_t  _vertex,
unsigned int  _color 
)
private

Definition at line 2554 of file DrawMeshT_impl.hh.

◆ writeNormal()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::writeNormal ( size_t  _vertex,
const ACG::Vec3d _n 
)
private

Definition at line 2538 of file DrawMeshT_impl.hh.

◆ writePosition()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::writePosition ( size_t  _vertex,
const ACG::Vec3d _p 
)
private

Definition at line 2529 of file DrawMeshT_impl.hh.

◆ writeTexcoord()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::writeTexcoord ( size_t  _vertex,
const ACG::Vec2f _uv 
)
private

Definition at line 2548 of file DrawMeshT_impl.hh.

◆ writeVertexElement()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::writeVertexElement ( void *  _dstBuf,
size_t  _vertex,
size_t  _stride,
size_t  _elementOffset,
size_t  _elementSize,
const void *  _elementData 
)
private

Definition at line 2516 of file DrawMeshT_impl.hh.

◆ writeVertexProperty()

template<class Mesh >
void ACG::DrawMeshT< Mesh >::writeVertexProperty ( size_t  _vertex,
const VertexElement _elementDesc,
const ACG::Vec4f _propf 
)
private

Definition at line 2561 of file DrawMeshT_impl.hh.

Member Data Documentation

◆ additionalElements_

template<class Mesh >
std::vector<VertexProperty> ACG::DrawMeshT< Mesh >::additionalElements_
private

additional optional elements

Definition at line 901 of file DrawMesh.hh.

◆ bVBOinFlatMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::bVBOinFlatMode_
private

normals in VBO currently in flat / smooth mode

Definition at line 843 of file DrawMesh.hh.

◆ bVBOinHalfedgeNormalMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::bVBOinHalfedgeNormalMode_
private

normals in VBO currently in per vertex / halfedge mode toggle

Definition at line 855 of file DrawMesh.hh.

◆ bVBOinHalfedgeTexMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::bVBOinHalfedgeTexMode_
private

texcoords in VBO currently in per vertex / halfedge mode toggle

Definition at line 849 of file DrawMesh.hh.

◆ colorMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::colorMode_
private

Color Mode: 0: none, 1: per vertex, else: per face.

Definition at line 834 of file DrawMesh.hh.

◆ curVBOColorMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::curVBOColorMode_
private

Color Mode of vbo.

Definition at line 837 of file DrawMesh.hh.

◆ flatMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::flatMode_
private

flat / smooth shade mode toggle

Definition at line 840 of file DrawMesh.hh.

◆ halfedgeNormalMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::halfedgeNormalMode_
private

per vertex / halfedge normals mode toggle: 0: per vertex, 1: per halfedge

Definition at line 852 of file DrawMesh.hh.

◆ indices_

template<class Mesh >
unsigned int* ACG::DrawMeshT< Mesh >::indices_
private

final index buffer used for rendering

Definition at line 822 of file DrawMesh.hh.

◆ invVertexMap_

template<class Mesh >
unsigned int* ACG::DrawMeshT< Mesh >::invVertexMap_
private

inverse vertex map: original OpenMesh vertex index -> one vertex index in vbo this map is ambiguous and only useful for per vertex attributes rendering i.e. lines!

Definition at line 861 of file DrawMesh.hh.

◆ mesh_

template<class Mesh >
Mesh& ACG::DrawMeshT< Mesh >::mesh_
private

OpenMesh object to be rendered.

Definition at line 819 of file DrawMesh.hh.

◆ offsetColor_

template<class Mesh >
const size_t ACG::DrawMeshT< Mesh >::offsetColor_
private

Definition at line 898 of file DrawMesh.hh.

◆ offsetNormal_

template<class Mesh >
const size_t ACG::DrawMeshT< Mesh >::offsetNormal_
private

Definition at line 896 of file DrawMesh.hh.

◆ offsetPos_

template<class Mesh >
const size_t ACG::DrawMeshT< Mesh >::offsetPos_
private

fixed vertex elements:

Definition at line 895 of file DrawMesh.hh.

◆ offsetTexc_

template<class Mesh >
const size_t ACG::DrawMeshT< Mesh >::offsetTexc_
private

Definition at line 897 of file DrawMesh.hh.

◆ perEdgeBuf_

template<class Mesh >
std::vector<float> ACG::DrawMeshT< Mesh >::perEdgeBuf_
private

Definition at line 1067 of file DrawMesh.hh.

◆ perEdgeColorBuf_

template<class Mesh >
std::vector<ACG::Vec4f> ACG::DrawMeshT< Mesh >::perEdgeColorBuf_
private

Definition at line 1065 of file DrawMesh.hh.

◆ perEdgeVertexBuf_

template<class Mesh >
std::vector<ACG::Vec3f> ACG::DrawMeshT< Mesh >::perEdgeVertexBuf_
private

Definition at line 1064 of file DrawMesh.hh.

◆ perFaceTextureCoordinatePropertyName_

template<class Mesh >
std::string ACG::DrawMeshT< Mesh >::perFaceTextureCoordinatePropertyName_
private

Property for the per face texture coordinates.

This property is used by the mesh for texture coordinate specification. If this is invalid, then the strip processor will ignore per face textures during processing.

Definition at line 921 of file DrawMesh.hh.

◆ perHalfedgeColorBuf_

template<class Mesh >
std::vector<ACG::Vec4f> ACG::DrawMeshT< Mesh >::perHalfedgeColorBuf_
private

Definition at line 1071 of file DrawMesh.hh.

◆ perHalfedgeVertexBuf_

template<class Mesh >
std::vector<ACG::Vec3f> ACG::DrawMeshT< Mesh >::perHalfedgeVertexBuf_
private

Definition at line 1070 of file DrawMesh.hh.

◆ pickAnyEdgeColBuf_

template<class Mesh >
std::vector< ACG::Vec4uc > ACG::DrawMeshT< Mesh >::pickAnyEdgeColBuf_
private

Definition at line 749 of file DrawMesh.hh.

◆ pickAnyFaceColBuf_

template<class Mesh >
std::vector< ACG::Vec4uc > ACG::DrawMeshT< Mesh >::pickAnyFaceColBuf_
private

Definition at line 748 of file DrawMesh.hh.

◆ pickAnyVertexColBuf_

template<class Mesh >
std::vector< ACG::Vec4uc > ACG::DrawMeshT< Mesh >::pickAnyVertexColBuf_
private

Definition at line 750 of file DrawMesh.hh.

◆ pickEdgeBuf_

template<class Mesh >
std::vector< ACG::Vec4uc > ACG::DrawMeshT< Mesh >::pickEdgeBuf_
private

Definition at line 578 of file DrawMesh.hh.

◆ pickEdgeShader_

template<class Mesh >
GLSL::Program* ACG::DrawMeshT< Mesh >::pickEdgeShader_
private

Definition at line 581 of file DrawMesh.hh.

◆ pickFaceColBuf_

template<class Mesh >
std::vector< ACG::Vec4uc > ACG::DrawMeshT< Mesh >::pickFaceColBuf_
private

Definition at line 659 of file DrawMesh.hh.

◆ pickFaceShader_

template<class Mesh >
GLSL::Program* ACG::DrawMeshT< Mesh >::pickFaceShader_
private

optimized face picking shader

Definition at line 665 of file DrawMesh.hh.

◆ pickFaceTriToFaceMapTBO_

template<class Mesh >
TextureBuffer ACG::DrawMeshT< Mesh >::pickFaceTriToFaceMapTBO_
private

Definition at line 662 of file DrawMesh.hh.

◆ pickFaceVertexBuf_

template<class Mesh >
std::vector< ACG::Vec3f > ACG::DrawMeshT< Mesh >::pickFaceVertexBuf_
private

Definition at line 658 of file DrawMesh.hh.

◆ pickVertBuf_

template<class Mesh >
std::vector< ACG::Vec3f > ACG::DrawMeshT< Mesh >::pickVertBuf_
private

The vertex buffer used for vertex picking.

Definition at line 509 of file DrawMesh.hh.

◆ pickVertColBuf_

template<class Mesh >
std::vector< ACG::Vec4uc > ACG::DrawMeshT< Mesh >::pickVertColBuf_
private

The color buffer used for vertex picking.

Definition at line 511 of file DrawMesh.hh.

◆ pickVertexMapTBO_

template<class Mesh >
TextureBuffer ACG::DrawMeshT< Mesh >::pickVertexMapTBO_
private

Definition at line 515 of file DrawMesh.hh.

◆ pickVertexMethod_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::pickVertexMethod_
private

Definition at line 524 of file DrawMesh.hh.

◆ pickVertexShader_

template<class Mesh >
GLSL::Program* ACG::DrawMeshT< Mesh >::pickVertexShader_
private

Definition at line 518 of file DrawMesh.hh.

◆ prevNumFaces_

template<class Mesh >
size_t ACG::DrawMeshT< Mesh >::prevNumFaces_
private

used to track mesh changes, that require a full rebuild values directly taken from Mesh template

Definition at line 830 of file DrawMesh.hh.

◆ prevNumVerts_

template<class Mesh >
size_t ACG::DrawMeshT< Mesh >::prevNumVerts_
private

Definition at line 830 of file DrawMesh.hh.

◆ rebuild_

template<class Mesh >
unsigned int ACG::DrawMeshT< Mesh >::rebuild_
private

hint on what to rebuild

Definition at line 825 of file DrawMesh.hh.

◆ textureIndexPropertyName_

template<class Mesh >
std::string ACG::DrawMeshT< Mesh >::textureIndexPropertyName_
private

Property for the per face texture index.

This property is used by the mesh for texture index specification. If this is invalid, then it is assumed that there is one or no active texture. This means that the generated strips will be independent of texture information.

Definition at line 914 of file DrawMesh.hh.

◆ textureMode_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::textureMode_
private

per vertex / halfedge texture mode toggle: 0: per vertex, 1: per halfedge

Definition at line 846 of file DrawMesh.hh.

◆ updateFullVBO_

template<class Mesh >
bool ACG::DrawMeshT< Mesh >::updateFullVBO_
private

Definition at line 978 of file DrawMesh.hh.

◆ updatePerEdgeBuffers_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::updatePerEdgeBuffers_
private

Definition at line 1063 of file DrawMesh.hh.

◆ updatePerHalfedgeBuffers_

template<class Mesh >
int ACG::DrawMeshT< Mesh >::updatePerHalfedgeBuffers_
private

Definition at line 1069 of file DrawMesh.hh.

◆ vboEdges_

template<class Mesh >
GeometryBuffer ACG::DrawMeshT< Mesh >::vboEdges_
private

Definition at line 981 of file DrawMesh.hh.

◆ vboFull_

template<class Mesh >
GeometryBuffer ACG::DrawMeshT< Mesh >::vboFull_
private

Definition at line 975 of file DrawMesh.hh.


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