00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef OPENMESH_MESH_ITEMS_HH
00032 #define OPENMESH_MESH_ITEMS_HH
00033
00034
00035
00036
00037
00038 #include <OpenMesh/Core/System/config.h>
00039 #include <OpenMesh/Core/Utils/GenProg.hh>
00040 #include <OpenMesh/Core/Utils/vector_traits.hh>
00041 #include <OpenMesh/Core/Mesh/Handles.hh>
00042
00043
00044
00045
00046
00047 namespace OpenMesh {
00048
00049
00050
00051
00053 template <class Traits, bool IsTriMesh>
00054 struct FinalMeshItemsT
00055 {
00056
00057 #ifndef DOXY_IGNORE_THIS
00058 struct Refs
00059 {
00060 typedef typename Traits::Point Point;
00061 typedef typename vector_traits<Point>::value_type Scalar;
00062
00063 typedef typename Traits::Normal Normal;
00064 typedef typename Traits::Color Color;
00065 typedef typename Traits::TexCoord1D TexCoord1D;
00066 typedef typename Traits::TexCoord2D TexCoord2D;
00067 typedef typename Traits::TexCoord3D TexCoord3D;
00068 typedef OpenMesh::VertexHandle VertexHandle;
00069 typedef OpenMesh::FaceHandle FaceHandle;
00070 typedef OpenMesh::EdgeHandle EdgeHandle;
00071 typedef OpenMesh::HalfedgeHandle HalfedgeHandle;
00072 };
00073 #endif
00074
00075 typedef typename Refs::Point Point;
00076 typedef typename Refs::Scalar Scalar;
00077 typedef typename Refs::Normal Normal;
00078 typedef typename Refs::Color Color;
00079 typedef typename Refs::TexCoord1D TexCoord1D;
00080 typedef typename Refs::TexCoord2D TexCoord2D;
00081 typedef typename Refs::TexCoord3D TexCoord3D;
00082
00083
00084 enum Attribs
00085 {
00086 VAttribs = Traits::VertexAttributes,
00087 HAttribs = Traits::HalfedgeAttributes,
00088 EAttribs = Traits::EdgeAttributes,
00089 FAttribs = Traits::FaceAttributes
00090 };
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 class ITraits
00105 {};
00106
00107 typedef typename Traits::template VertexT<ITraits, Refs> VertexData;
00108 typedef typename Traits::template HalfedgeT<ITraits, Refs> HalfedgeData;
00109 typedef typename Traits::template EdgeT<ITraits, Refs> EdgeData;
00110 typedef typename Traits::template FaceT<ITraits, Refs> FaceData;
00111 };
00112
00113
00114
00115 }
00116
00117 #endif // OPENMESH_MESH_ITEMS_HH defined
00118
00119