54 #ifndef OPENMESH_TRAITS_HH
55 #define OPENMESH_TRAITS_HH
61 #include <OpenMesh/Core/System/config.h>
62 #include <OpenMesh/Core/Geometry/VectorT.hh>
64 #include <OpenMesh/Core/Mesh/Handles.hh>
77 #define VertexAttributes(_i) enum { VertexAttributes = _i }
80 #define HalfedgeAttributes(_i) enum { HalfedgeAttributes = _i }
83 #define EdgeAttributes(_i) enum { EdgeAttributes = _i }
86 #define FaceAttributes(_i) enum { FaceAttributes = _i }
89 #define VertexTraits \
90 template <class Base, class Refs> struct VertexT : public Base
93 #define HalfedgeTraits \
94 template <class Base, class Refs> struct HalfedgeT : public Base
98 template <class Base, class Refs> struct EdgeT : public Base
102 template <class Base, class Refs> struct FaceT : public Base
140 #ifndef DOXY_IGNORE_THIS
170 #ifndef DOXY_IGNORE_THIS
184 typedef typename T1::Point Point;
187 typedef typename T1::TexCoord TexCoord;
189 template <
class Base,
class Refs>
class VertexT :
190 public T1::template VertexT<
191 typename T2::template VertexT<Base, Refs>, Refs>
194 template <
class Base,
class Refs>
class HalfedgeT :
195 public T1::template HalfedgeT<
196 typename T2::template HalfedgeT<Base, Refs>, Refs>
200 template <
class Base,
class Refs>
class EdgeT :
201 public T1::template EdgeT<
202 typename T2::template EdgeT<Base, Refs>, Refs>
206 template <
class Base,
class Refs>
class FaceT :
207 public T1::template FaceT<
208 typename T2::template FaceT<Base, Refs>, Refs>
221 #define OM_Merge_Traits(_S1, _S2, _D) \
222 typedef OpenMesh::MergeTraits<_S1, _S2>::Result _D;
229 #define OM_Merge_Traits_In_Template(_S1, _S2, _D) \
230 typedef typename OpenMesh::MergeTraits<_S1, _S2>::Result _D;
236 #endif // OPENMESH_TRAITS_HH defined
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:80
Add colors to mesh item (vertices/faces/edges)
Definition: Attributes.hh:81
Helper class to merge two mesh traits.
Definition: Traits.hh:168
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.
Definition: Traits.hh:86
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:89
Vec3f Normal
The default normal type is OpenMesh::Vec3f.
Definition: Traits.hh:125
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition: Attributes.hh:82
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
Definition: Traits.hh:77
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:122
float TexCoord1D
The default 1D texture coordinate type is float.
Definition: Traits.hh:128
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:101
int TextureIndex
The default texture index type.
Definition: Traits.hh:135
#define HalfedgeTraits
Macro for defining the halfedge traits. See Specifying your MyMesh.
Definition: Traits.hh:93
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:97
Vec2f TexCoord2D
The default 2D texture coordinate type is OpenMesh::Vec2f.
Definition: Traits.hh:130
This file provides some macros containing attribute usage.
Vec3uc Color
The default color type is OpenMesh::Vec3uc.
Definition: Traits.hh:138
#define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
Definition: Traits.hh:80
Base class for all traits.
Definition: Traits.hh:119
Vec3f TexCoord3D
The default 3D texture coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:132
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56
#define EdgeAttributes(_i)
Macro for defining the edge attributes. See Specifying your MyMesh.
Definition: Traits.hh:83