9 #include <boost/array.hpp> 10 #include <boost/shared_ptr.hpp> 11 #include <boost/type_traits.hpp> 33 template <
typename TMeshParam >
34 class Mesh :
public TMeshParam
40 typedef typename TMeshParam::Vertex
Vertex;
53 Mesh() : m_vertices(new VertexCollection()), m_faceIndices(new FaceIndexCollection()) {}
63 const VertexCollection &
getVertices()
const {
return *m_vertices; }
66 const FaceIndexCollection &
getFaceIndices()
const {
return *m_faceIndices; }
82 *m_vertices = *mesh.m_vertices;
83 *m_faceIndices = *mesh.m_faceIndices;
252 template <
class TParam >
259 template <
typename TParam>
281 template <
class TMesh,
typename TParam = DefaultAttributes<TMesh> >
303 const NormalCollection &
getNormals()
const {
return *m_normals; }
324 template <
class TMesh,
typename TParam = DefaultAttributes<TMesh> >
const shared_ptr< VertexCollection > & vertices() const
A class to represent a very basic mesh, consisting of a set of vertices and a set of edges...
numeric_array< float, 3 > Vertex
std::vector< typename TParam::FaceIndex::value_type > NeighborIndex
AddNormalAttribute(const TMesh &mesh, shared_ptr< NormalCollection > &ni)
const VertexCollection & getVertices() const
VertexCollection & getVertices()
shared_ptr< FaceIndexCollection > & faces()
This class enhance a mesh class with a normal vector attribute.
shared_ptr< VertexCollection > & vertices()
const NeighborIndexCollection & getNeighborIndices() const
const FaceIndexCollection & getFaceIndices() const
AddNeighborIndexAttribute()
detail::AddNeighborIndexAttribute< Mesh2 > Mesh2_N
Belongs to package Box Do not include directly, include til/Box.h instead.
std::vector< Vertex > VertexCollection
AddNormalAttribute(const TMesh &mesh)
A structure giving default template parameters for the Add_XXX_Attribute classes, for a given Mesh...
detail::AddNeighborIndexAttribute< Mesh1 > Mesh_N
detail::AddNormalAttribute< Mesh_N > Mesh_NNo
detail::AddNormalAttribute< Mesh2 > Mesh2_No
Mesh()
Default constructor.
boost::array< Vertex *, 3 > FaceIndex
NormalCollection & getNormals()
This file contains forward declarations of classes defined in the TIL library.
NeighborIndexCollection & getNeighborIndices()
std::vector< FaceIndex > FaceIndexCollection
detail::AddNormalAttribute< Mesh2_N > Mesh2_NNo
FaceIndexCollection & getFaceIndices()
TMeshParam::FaceIndexCollection FaceIndexCollection
detail::AddNormalAttribute< Mesh1 > Mesh_No
std::vector< FaceIndex > FaceIndexCollection
AddNeighborIndexAttribute(const TMesh &mesh)
void deepCopy(const Mesh &mesh)
std::vector< Normal > NormalCollection
numeric_array< float, 3 > Vertex
std::vector< NeighborIndex > NeighborIndexCollection
TParam::NeighborIndex NeighborIndex
TParam::NormalCollaction NormalCollection
AddNeighborIndexAttribute(const TMesh &mesh, shared_ptr< NeighborIndexCollection > &ni)
TMeshParam::VertexCollection VertexCollection
const shared_ptr< FaceIndexCollection > & faces() const
numeric_array< std::size_t, 3 > FaceIndex
std::vector< Vertex > VertexCollection
This class enhance a mesh class with a neighbor index attribute.
TMeshParam::Vertex Vertex
TParam::NeighborIndexCollection NeighborIndexCollection
numeric_array< float, 3 > Normal
TMeshParam::FaceIndex FaceIndex
const NormalCollection & getNormals() const