|
Developer Documentation
|
#include <ACG/SceneGraph/StripProcessorT.hh>
Public Types | |
| typedef unsigned int | Index |
| typedef std::vector< Strip > | Strips |
| typedef Strips::const_iterator | StripsIterator |
| typedef Mesh::FaceHandle | FaceHandle |
Public Member Functions | |
| StripProcessorT (Mesh &_mesh) | |
| Default constructor. | |
| ~StripProcessorT () | |
| Destructor. | |
| unsigned int | stripify () |
| Compute triangle strips, returns number of strips. | |
| void | clear () |
| delete all strips | |
| unsigned int | nStrips () const |
| returns number of strips | |
| StripsIterator | begin () const |
| Access strips. | |
| StripsIterator | end () const |
| Access strips. | |
Private Member Functions | |
| void | convexityTest (FaceHandle _fh) |
| Test whether face is convex. | |
| OpenMesh::FPropHandleT< bool >::reference | processed (typename Mesh::FaceHandle _fh) |
| OpenMesh::FPropHandleT< bool >::reference | used (typename Mesh::FaceHandle _fh) |
Private Attributes | |
| Mesh & | mesh_ |
| Strips | strips_ |
| OpenMesh::FPropHandleT< bool > | processed_ |
| OpenMesh::FPropHandleT< bool > | used_ |
Strip generation | |
| typedef std::vector< typename Mesh::FaceHandle > | FaceHandles |
| This flag shows if the strips have to be regenerated. | |
| bool | stripsValid_ |
| This flag shows if the strips have to be regenerated. | |
| void | invalidateStrips () |
| Force a strip update. | |
| void | buildStrips () |
| this method does the main work | |
| void | buildStripsTriMesh () |
| This method generates strips for triangle meshes. | |
| void | buildStripsPolyMesh () |
| void | buildStripTriMesh (typename Mesh::HalfedgeHandle _start_hh, Strip &_strip, FaceHandles &_faces) |
| build a strip from a given halfedge (in both directions) of a triangle mesh | |
| void | buildStripPolyMesh (typename Mesh::HalfedgeHandle _start_hh, Strip &_strip, FaceHandles &_faces) |
| build a strip from a given halfedge (in both directions) of a polymesh | |
Per edge drawing arrays handling | |
| std::vector< ACG::Vec3f > | perEdgeVertexBuffer_ |
| Per Edge vertex buffer (glLines) | |
| std::vector< ACG::Vec4f > | perEdgeColorBuffer_ |
| Per Edge color buffer. | |
| bool | updatePerEdgeBuffers_ |
| This flag controls if an update is really necessary. | |
| ACG::Vec3f * | perEdgeVertexBuffer () |
| get a pointer to the per edge vertex buffer | |
| ACG::Vec4f * | perEdgeColorBuffer () |
| get a pointer to the per edge color buffer | |
| void | invalidatePerEdgeBuffers () |
| Update of the buffers. | |
| void | updatePerEdgeBuffers () |
| Update all per edge drawing buffer n The updated buffers are: per edge vertex buffer ( 2 vertices per edge ) | |
Per halfedge drawing arrays handling | |
| std::vector< ACG::Vec3f > | perHalfedgeVertexBuffer_ |
| Per Edge vertex buffer (glLines) | |
| std::vector< ACG::Vec4f > | perHalfedgeColorBuffer_ |
| Per Edge color buffer. | |
| bool | updatePerHalfedgeBuffers_ |
| This flag controls if an update is really necessary. | |
| ACG::Vec3f * | perHalfedgeVertexBuffer () |
| get a pointer to the per edge vertex buffer | |
| ACG::Vec4f * | perHalfedgeColorBuffer () |
| get a pointer to the per edge color buffer | |
| void | invalidatePerHalfedgeBuffers () |
| Update of the buffers. | |
| void | updatePerHalfedgeBuffers () |
| Update all per edge drawing buffer n The updated buffers are: per edge vertex buffer ( 2 vertices per edge ) | |
| Mesh::Point | halfedge_point (const typename Mesh::HalfedgeHandle _heh) |
| compute halfedge point compute visulization point for halfedge (shifted to interior of face) | |
Per face drawing arrays handling | |
| std::vector< ACG::Vec3f > | perFaceVertexBuffer_ |
| Buffer holding vertices for per face rendering. | |
| std::vector< ACG::Vec4f > | perFaceColorBuffer_ |
| Buffer holding vertices for per face rendering. | |
| std::vector< ACG::Vec3f > | perFaceNormalBuffer_ |
| Buffer holding vertices for per face rendering. | |
| std::vector< ACG::Vec3f > | perFacePerVertexNormalBuffer_ |
| Buffer holding vertices for per face rendering. | |
| bool | updatePerFaceBuffers_ |
| This flag controls if an update is really necessary. | |
| ACG::Vec3f * | perFaceVertexBuffer () |
| get a pointer to the per face vertex buffer | |
| ACG::Vec3f * | perFaceNormalBuffer () |
| get a pointer to the per face normal buffer | |
| ACG::Vec3f * | perFacePerVertexNormalBuffer () |
| get a pointer to the per face per vertex normal buffer | |
| ACG::Vec4f * | perFaceColorBuffer () |
| get a pointer to the per face color buffer | |
| unsigned int | perFaceVertexBufferSize () |
| Get the number of elements in the face picking buffers. | |
| void | invalidatePerFaceBuffers () |
| Update of the buffers. | |
| void | updatePerFaceBuffers () |
| Update all per face buffers. | |
vertex picking functions | |
| std::vector< ACG::Vec4uc > | pickVertexColorBuf_ |
| The color buffer used for vertex picking. | |
| void | updatePickingVertices (ACG::GLState &_state, uint _offset=0) |
| ACG::Vec4uc * | pickVertexColorBuffer () |
| get a pointer to the per vertex picking color buffer | |
Edge picking functions | |
| std::vector< ACG::Vec4uc > | pickEdgeColorBuf_ |
| void | updatePickingEdges (ACG::GLState &_state, uint _offset=0) |
| ACG::Vec4uc * | pickEdgeColorBuffer () |
| get a pointer to the per edge picking color buffer | |
Face picking functions | |
| std::vector< ACG::Vec4uc > | pickFaceColorBuf_ |
| Call this function to update the color picking array. | |
| void | updatePickingFaces (ACG::GLState &_state) |
| Call this function to update the color picking array. | |
| ACG::Vec4uc * | pickFaceColorBuffer () |
| get a pointer to the per face picking color buffer | |
| void | updatePickingFacesTrimesh (ACG::GLState &_state) |
| Call this function to update the color picking array. | |
| void | updatePickingFacesPolymesh (ACG::GLState &_state) |
| Call this function to update the color picking array. | |
Any picking functions | |
| std::vector< ACG::Vec4uc > | pickAnyColorBuf_ |
| Call this function to update the color picking array. | |
| void | updatePickingAny (ACG::GLState &_state) |
| Call this function to update the color picking array. | |
| ACG::Vec4uc * | pickAnyColorBuffer () |
| get a pointer to the any picking color buffer | |
Per face Texture handling | |
| std::string | textureIndexPropertyName_ |
| Property for the per face texture index. | |
| std::string | perFaceTextureCoordinatePropertyName_ |
| Property for the per face texture coordinates. | |
| std::vector< ACG::Vec2f > | perFaceTextureCoordArray_ |
| Property for the per face texture index. | |
| std::vector< TextureRenderInfo > | textureRenderData_ |
| Property for the per face texture index. | |
| void | setIndexPropertyName (std::string _indexPropertyName) |
| set the name of the property used for texture index specification | |
| const std::string & | indexPropertyName () const |
| get the name of the texture index property | |
| void | setPerFaceTextureCoordinatePropertyName (std::string _perFaceTextureCoordinatePropertyName) |
| set the name of the property used for texture coordinate | |
| bool | perFaceTextureCoordinateAvailable () |
| Check if per Face Texture coordinates are available. | |
| bool | perFaceTextureIndexAvailable () |
| Check if textureindicies are available. | |
| ACG::Vec2f * | perFacePerVertexTextureCoordBuffer () |
| get a pointer to the per face per vertex texture coor buffer | |
| std::vector< TextureRenderInfo > * | textureRenderData () |
| get rendering information for texture data | |
This class decomposes a mesh into several strips
Definition at line 127 of file StripProcessorT.hh.
| typedef Mesh::FaceHandle ACG::SceneGraph::StripProcessorT< Mesh >::FaceHandle |
Definition at line 134 of file StripProcessorT.hh.
|
private |
This flag shows if the strips have to be regenerated.
Definition at line 193 of file StripProcessorT.hh.
| typedef unsigned int ACG::SceneGraph::StripProcessorT< Mesh >::Index |
Definition at line 131 of file StripProcessorT.hh.
| typedef std::vector<Strip> ACG::SceneGraph::StripProcessorT< Mesh >::Strips |
Definition at line 132 of file StripProcessorT.hh.
| typedef Strips::const_iterator ACG::SceneGraph::StripProcessorT< Mesh >::StripsIterator |
Definition at line 133 of file StripProcessorT.hh.
| ACG::SceneGraph::StripProcessorT< Mesh >::StripProcessorT | ( | Mesh & | _mesh | ) |
Default constructor.
Definition at line 73 of file StripProcessorT_impl.hh.
| ACG::SceneGraph::StripProcessorT< Mesh >::~StripProcessorT | ( | ) |
Destructor.
Definition at line 87 of file StripProcessorT_impl.hh.
|
inline |
Access strips.
Definition at line 152 of file StripProcessorT.hh.
|
private |
build a strip from a given halfedge (in both directions) of a polymesh
Definition at line 313 of file StripProcessorT_impl.hh.
|
private |
this method does the main work
Definition at line 158 of file StripProcessorT_impl.hh.
|
private |
This method generates strips for polyMeshes meshes
The strips generated in this function are triangle strips. The function takes arbitrary polygons as input and triangulates them.
Definition at line 189 of file StripProcessorT_impl.hh.
|
private |
This method generates strips for triangle meshes.
Definition at line 252 of file StripProcessorT_impl.hh.
|
private |
build a strip from a given halfedge (in both directions) of a triangle mesh
Definition at line 514 of file StripProcessorT_impl.hh.
|
inline |
delete all strips
Definition at line 146 of file StripProcessorT.hh.
|
private |
Test whether face is convex.
Definition at line 123 of file StripProcessorT_impl.hh.
|
inline |
Access strips.
Definition at line 154 of file StripProcessorT.hh.
|
private |
compute halfedge point compute visulization point for halfedge (shifted to interior of face)
Definition at line 838 of file StripProcessorT_impl.hh.
|
inline |
get the name of the texture index property
Definition at line 516 of file StripProcessorT.hh.
|
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 246 of file StripProcessorT.hh.
|
inline |
Update of the buffers.
This function will set all per face buffers to invalid and will force an update whe they are requested
Definition at line 362 of file StripProcessorT.hh.
|
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 289 of file StripProcessorT.hh.
|
inline |
Force a strip update.
Definition at line 189 of file StripProcessorT.hh.
|
inline |
returns number of strips
Definition at line 149 of file StripProcessorT.hh.
| ACG::Vec4f * ACG::SceneGraph::StripProcessorT< 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 791 of file StripProcessorT_impl.hh.
| ACG::Vec3f * ACG::SceneGraph::StripProcessorT< 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 781 of file StripProcessorT_impl.hh.
| ACG::Vec4f * ACG::SceneGraph::StripProcessorT< Mesh >::perFaceColorBuffer | ( | ) |
get a pointer to the per face color buffer
This function will return a pointer to the first element of the per face color buffer. Use updatePerFaceBuffers to update the buffer before you render it via ACG::GLState::colorPointer. The buffer contains 3 equal normals per face.
Definition at line 1092 of file StripProcessorT_impl.hh.
| ACG::Vec3f * ACG::SceneGraph::StripProcessorT< Mesh >::perFaceNormalBuffer | ( | ) |
get a pointer to the per face normal buffer
This function will return a pointer to the first element of the per face normal buffer. Use updatePerFaceBuffers to update the buffer before you render it via ACG::GLState::normalPointer. The buffer contains 3 equal normals per face.
Definition at line 1070 of file StripProcessorT_impl.hh.
| ACG::Vec3f * ACG::SceneGraph::StripProcessorT< Mesh >::perFacePerVertexNormalBuffer | ( | ) |
get a pointer to the per face per vertex normal buffer
This function will return a pointer to the first element of the per face per vertex normal buffer. Use updatePerFaceBuffers to update the buffer before you render it via ACG::GLState::normalPointer. The buffer contains 3 equal normals per face.
Definition at line 1081 of file StripProcessorT_impl.hh.
|
inline |
get a pointer to the per face per vertex texture coor buffer
This function will return a pointer to the first element of the buffer.
Definition at line 543 of file StripProcessorT.hh.
| bool ACG::SceneGraph::StripProcessorT< Mesh >::perFaceTextureCoordinateAvailable | ( | ) |
Check if per Face Texture coordinates are available.
If this function returns true, a per face per vertex texture array is available
Definition at line 1122 of file StripProcessorT_impl.hh.
| bool ACG::SceneGraph::StripProcessorT< Mesh >::perFaceTextureIndexAvailable | ( | ) |
Check if textureindicies 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.
Definition at line 1137 of file StripProcessorT_impl.hh.
| ACG::Vec3f * ACG::SceneGraph::StripProcessorT< Mesh >::perFaceVertexBuffer | ( | ) |
get a pointer to the per face vertex buffer
This function will return a pointer to the first element of the per face vertex buffer. Use updatePerFaceBuffers to update the buffer before you render it via ACG::GLState::colorPointer.
Definition at line 1058 of file StripProcessorT_impl.hh.
|
inline |
Get the number of elements in the face picking buffers.
Definition at line 355 of file StripProcessorT.hh.
| ACG::Vec4f * ACG::SceneGraph::StripProcessorT< 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 877 of file StripProcessorT_impl.hh.
| ACG::Vec3f * ACG::SceneGraph::StripProcessorT< 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 867 of file StripProcessorT_impl.hh.
|
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.
Definition at line 493 of file StripProcessorT.hh.
|
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.
Definition at line 430 of file StripProcessorT.hh.
|
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.
Definition at line 457 of file StripProcessorT.hh.
|
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.
Definition at line 401 of file StripProcessorT.hh.
|
inlineprivate |
Definition at line 164 of file StripProcessorT.hh.
| void ACG::SceneGraph::StripProcessorT< Mesh >::setIndexPropertyName | ( | 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 independend of this property
Definition at line 1151 of file StripProcessorT_impl.hh.
| void ACG::SceneGraph::StripProcessorT< 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.
Definition at line 1103 of file StripProcessorT_impl.hh.
| unsigned int ACG::SceneGraph::StripProcessorT< Mesh >::stripify | ( | ) |
Compute triangle strips, returns number of strips.
Definition at line 128 of file StripProcessorT_impl.hh.
|
inline |
get rendering information for texture data
This function returns a pointer to the texture render data produced by the stripprocessor each pair defines a texture index and te number of faces which have to be rendered for this texture before switching to the next one.
Definition at line 552 of file StripProcessorT.hh.
|
private |
Update all per edge drawing buffer n The updated buffers are: per edge vertex buffer ( 2 vertices per edge )
Definition at line 745 of file StripProcessorT_impl.hh.
|
private |
Update all per face buffers.
The updated buffers are: per face vertex buffer, per face normal buffer (3 equal normals per face), per face color buffer (3 equal colors per face)
Definition at line 887 of file StripProcessorT_impl.hh.
|
private |
Update all per edge drawing buffer n The updated buffers are: per edge vertex buffer ( 2 vertices per edge )
Definition at line 802 of file StripProcessorT_impl.hh.
| void ACG::SceneGraph::StripProcessorT< 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.
Definition at line 733 of file StripProcessorT_impl.hh.
| void ACG::SceneGraph::StripProcessorT< Mesh >::updatePickingEdges | ( | 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.
Definition at line 664 of file StripProcessorT_impl.hh.
| void ACG::SceneGraph::StripProcessorT< Mesh >::updatePickingFaces | ( | ACG::GLState & | _state | ) |
Call this function to update the color picking array.
Definition at line 688 of file StripProcessorT_impl.hh.
| void ACG::SceneGraph::StripProcessorT< 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.
Definition at line 648 of file StripProcessorT_impl.hh.
|
inlineprivate |
Definition at line 167 of file StripProcessorT.hh.
|
private |
Definition at line 175 of file StripProcessorT.hh.
|
private |
Per Edge color buffer.
Definition at line 259 of file StripProcessorT.hh.
|
private |
Per Edge vertex buffer (glLines)
Definition at line 256 of file StripProcessorT.hh.
|
private |
Buffer holding vertices for per face rendering.
Definition at line 373 of file StripProcessorT.hh.
|
private |
Buffer holding vertices for per face rendering.
Definition at line 374 of file StripProcessorT.hh.
|
private |
Buffer holding vertices for per face rendering.
Definition at line 375 of file StripProcessorT.hh.
|
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 572 of file StripProcessorT.hh.
|
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 570 of file StripProcessorT.hh.
|
private |
Buffer holding vertices for per face rendering.
Definition at line 372 of file StripProcessorT.hh.
|
private |
Per Edge color buffer.
Definition at line 308 of file StripProcessorT.hh.
|
private |
Per Edge vertex buffer (glLines)
Definition at line 305 of file StripProcessorT.hh.
|
private |
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.
Definition at line 497 of file StripProcessorT.hh.
|
private |
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.
Definition at line 436 of file StripProcessorT.hh.
|
private |
Call this function to update the color picking array.
Definition at line 469 of file StripProcessorT.hh.
|
private |
The color buffer used for vertex picking.
Definition at line 406 of file StripProcessorT.hh.
|
private |
Definition at line 177 of file StripProcessorT.hh.
|
private |
Definition at line 176 of file StripProcessorT.hh.
|
private |
This flag shows if the strips have to be regenerated.
Definition at line 196 of file StripProcessorT.hh.
|
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 563 of file StripProcessorT.hh.
|
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 574 of file StripProcessorT.hh.
|
private |
This flag controls if an update is really necessary.
Definition at line 262 of file StripProcessorT.hh.
|
private |
This flag controls if an update is really necessary.
Definition at line 378 of file StripProcessorT.hh.
|
private |
This flag controls if an update is really necessary.
Definition at line 311 of file StripProcessorT.hh.
|
private |
Definition at line 177 of file StripProcessorT.hh.