56 #ifndef OPENMESH_TRAITS_HH
57 #define OPENMESH_TRAITS_HH
63 #include <OpenMesh/Core/System/config.h>
64 #include <OpenMesh/Core/Geometry/VectorT.hh>
66 #include <OpenMesh/Core/Mesh/Handles.hh>
79 #define VertexAttributes(_i) enum { VertexAttributes = _i }
82 #define HalfedgeAttributes(_i) enum { HalfedgeAttributes = _i }
85 #define EdgeAttributes(_i) enum { EdgeAttributes = _i }
88 #define FaceAttributes(_i) enum { FaceAttributes = _i }
91 #define VertexTraits \
92 template <class Base, class Refs> struct VertexT : public Base
95 #define HalfedgeTraits \
96 template <class Base, class Refs> struct HalfedgeT : public Base
100 template <class Base, class Refs> struct EdgeT : public Base
104 template <class Base, class Refs> struct FaceT : public Base
142 #ifndef DOXY_IGNORE_THIS
190 #ifndef DOXY_IGNORE_THIS
204 typedef typename T1::Point Point;
207 typedef typename T1::TexCoord TexCoord;
209 template <
class Base,
class Refs>
class VertexT :
210 public T1::template VertexT<
211 typename T2::template VertexT<Base, Refs>, Refs>
214 template <
class Base,
class Refs>
class HalfedgeT :
215 public T1::template HalfedgeT<
216 typename T2::template HalfedgeT<Base, Refs>, Refs>
220 template <
class Base,
class Refs>
class EdgeT :
221 public T1::template EdgeT<
222 typename T2::template EdgeT<Base, Refs>, Refs>
226 template <
class Base,
class Refs>
class FaceT :
227 public T1::template FaceT<
228 typename T2::template FaceT<Base, Refs>, Refs>
241 #define OM_Merge_Traits(_S1, _S2, _D) \
242 typedef OpenMesh::MergeTraits<_S1, _S2>::Result _D;
249 #define OM_Merge_Traits_In_Template(_S1, _S2, _D) \
250 typedef typename OpenMesh::MergeTraits<_S1, _S2>::Result _D;
This file provides some macros containing attribute usage.
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
@ Normal
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:82
@ Color
Add colors to mesh item (vertices/faces/edges)
Definition: Attributes.hh:83
@ PrevHalfedge
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition: Attributes.hh:84
Base class for all traits.
Definition: Traits.hh:122
int TextureIndex
The default texture index type.
Definition: Traits.hh:137
float TexCoord1D
The default 1D texture coordinate type is float.
Definition: Traits.hh:130
Vec2f TexCoord2D
The default 2D texture coordinate type is OpenMesh::Vec2f.
Definition: Traits.hh:132
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:124
Vec3uc Color
The default color type is OpenMesh::Vec3uc.
Definition: Traits.hh:140
Vec3f Normal
The default normal type is OpenMesh::Vec3f.
Definition: Traits.hh:127
Vec3f TexCoord3D
The default 3D texture coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:134
Version of Default Traits that uses double precision for points and normals as well as floating point...
Definition: Traits.hh:164
OpenMesh::Vec4f Color
Use RGBA Color.
Definition: Traits.hh:170
OpenMesh::Vec3d Normal
Use double precision Normals.
Definition: Traits.hh:168
OpenMesh::Vec3d Point
Use double precision points.
Definition: Traits.hh:166
Helper class to merge two mesh traits.
Definition: Traits.hh:189
#define HalfedgeTraits
Macro for defining the halfedge traits. See Specifying your MyMesh.
Definition: Traits.hh:95
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
Definition: Traits.hh:79
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:103
#define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
Definition: Traits.hh:82
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.
Definition: Traits.hh:88
#define EdgeAttributes(_i)
Macro for defining the edge attributes. See Specifying your MyMesh.
Definition: Traits.hh:85
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:91
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:99