Tesselator.hpp
Go to the documentation of this file.
1 
28 //
29 // Created by Christian Swan on 09.10.17.
30 //
31 
32 #ifndef LVR2_ALGORITHM_TESSELATOR_H
33 #define LVR2_ALGORITHM_TESSELATOR_H
34 
38 
39 #if _MSC_VER
40 #include <Windows.h>
41 #endif
42 
43 #ifndef __APPLE__
44 #include <GL/glu.h>
45 #include <GL/glut.h>
46 #define CALLBACK
47 #else
48 #include <OpenGL/glu.h>
49 #include <GLUT/glut.h>
50 #endif
51 
52 namespace lvr2
53 {
54 
60 template<typename BaseVecT>
61 class Tesselator {
62 
63 public:
64 
68  static void apply(
70  ClusterBiMap<FaceHandle>& clusters,
72  float lineFusionThreshold
73  );
74 
75 private:
76 
80  static GLUtesselator* m_tesselator;
81 
85  static GLenum m_type;
86 
90  static std::vector<BaseVecT> m_vertices;
91 
95  static std::vector<BaseVecT> m_faces;
96 
100  static void CALLBACK beginCallback(GLenum type);
101 
105  static void CALLBACK vertexCallback(void* data);
106 
111  static void CALLBACK combineDataCallback(GLdouble coords[3],
112  void *vertex_data[4],
113  GLfloat weight[4],
114  void **outData,
115  void *userData);
116 
120  static void CALLBACK endCallback(void);
124  static void CALLBACK errorCallback(GLenum errno);
125 
130  static void init();
131 
137  static void addTesselatedFaces(
139  ClusterBiMap<FaceHandle>& clusters,
141  ClusterHandle clusterH
142  );
143 };
144 
145 } // namespace lvr2
146 
147 #include "lvr2/algorithm/Tesselator.tcc"
148 
149 #endif //LVR2_ALGORITHM_TESSELATOR_H
Handles.hpp
lvr2::Tesselator::apply
static void apply(BaseMesh< BaseVecT > &mesh, ClusterBiMap< FaceHandle > &clusters, DenseFaceMap< Normal< typename BaseVecT::CoordType >> &faceNormals, float lineFusionThreshold)
NormalAlgorithms.hpp
lvr2::Tesselator::vertexCallback
static void CALLBACK vertexCallback(void *data)
lvr2::VectorMap
A map with constant lookup overhead using small-ish integer-keys.
Definition: VectorMap.hpp:60
lvr2::Normal< typename BaseVecT::CoordType >
lvr2::Tesselator::init
static void init()
lvr2::Tesselator::beginCallback
static void CALLBACK beginCallback(GLenum type)
ClusterBiMap.hpp
CALLBACK
#define CALLBACK
Definition: Tesselator.hpp:46
lvr2::Tesselator::m_type
static GLenum m_type
Definition: Tesselator.hpp:85
lvr2::Tesselator::m_faces
static std::vector< BaseVecT > m_faces
Definition: Tesselator.hpp:95
lvr2::Tesselator::m_vertices
static std::vector< BaseVecT > m_vertices
Definition: Tesselator.hpp:90
lvr2::Tesselator
Definition: Tesselator.hpp:61
lvr2::Tesselator::combineDataCallback
static void CALLBACK combineDataCallback(GLdouble coords[3], void *vertex_data[4], GLfloat weight[4], void **outData, void *userData)
lvr2::ClusterHandle
Handle to access Cluster of the ClusterBiMap.
Definition: Handles.hpp:152
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::BaseMesh
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
lvr2::Tesselator::endCallback
static void CALLBACK endCallback(void)
lvr2::Tesselator::m_tesselator
static GLUtesselator * m_tesselator
Definition: Tesselator.hpp:80
lvr2::Tesselator::addTesselatedFaces
static void addTesselatedFaces(BaseMesh< BaseVecT > &mesh, ClusterBiMap< FaceHandle > &clusters, DenseFaceMap< Normal< typename BaseVecT::CoordType >> &faceNormal, ClusterHandle clusterH)
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::ClusterBiMap
A map of clusters, which also saves a back-reference from handle to cluster.
Definition: ClusterBiMap.hpp:72
lvr2::Tesselator::errorCallback
static void CALLBACK errorCallback(GLenum errno)


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:25