library of assembled shared sources

http://lass.cocamware.com

lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics > Class Template Reference

One of the simplier meshes. More...

#include <triangle_mesh_3d.h>


Data Structures

struct  IntersectionContext
struct  LogicalEdge
struct  PositionalEdge
struct  Rebind
struct  Triangle
struct  TriangleTraits

Public Types

enum  { dimension = TPoint::dimension }
typedef TriangleMesh3D< T,
BoundingVolumeHierarchy,
SplitHeuristics > 
TSelf
typedef Point3D< T > TPoint
typedef TPoint::TVector TVector
typedef Point2D< T > TUv
typedef Aabb3D< T > TAabb
typedef Ray3D< T > TRay
typedef TPoint::TValue TValue
typedef TPoint::TParam TParam
typedef TPoint::TReference TReference
typedef TPoint::TConstReference TConstReference
typedef TPoint::TNumTraits TNumTraits
typedef IntersectionContext TIntersectionContext
typedef Triangle TTriangle
typedef IndexTriangle TIndexTriangle
typedef std::vector< TriangleTTriangles
typedef std::vector< TPointTVertices
typedef std::vector< TVectorTNormals
typedef std::vector< TUvTUvs
typedef TTriangles::const_iterator TTriangleIterator
typedef TVertices::const_iterator TVertexIterator
typedef TNormals::const_iterator TNormalIterator
typedef TUvs::const_iterator TUvIterator

Public Member Functions

 TriangleMesh3D ()
template<typename VertexInputRange , typename IndexTriangleInputRange >
 TriangleMesh3D (const VertexInputRange &vertices, const IndexTriangleInputRange &triangles)
template<typename VertexInputRange , typename NormalInputRange , typename UvInputRange , typename IndexTriangleInputRange >
 TriangleMesh3D (const VertexInputRange &vertices, const NormalInputRange &normals, const UvInputRange &uvs, const IndexTriangleInputRange &triangles)
const TTrianglestriangles () const
const TVerticesvertices () const
const TNormalsnormals () const
const TUvsuvs () const
template<typename OutputIterator >
OutputIterator indexTriangles (OutputIterator triangles) const
const TAabb aabb () const
const TValue area () const
void smoothNormals (TParam maxAngleInRadians)
void flatFaces ()
 remove all normals, so that faces become flat
void loopSubdivision (unsigned level)
void autoSew ()
 automatically sews (unconnected) triangles by comparing geometrical vertices and normals
void autoCrease (unsigned level)
 automatically assign crease levels to edges with discontinued normals
const Result intersect (const TRay &ray, TTriangleIterator &triangle, TReference t, TParam tMin=0, IntersectionContext *context=0) const
const bool intersects (const TRay &ray, TParam tMin, TParam tMax) const
void swap (TSelf &other)

Private Types

typedef
spat::DefaultAabbRayTraits
< TAabb, TRay
TAabbRayTraits
typedef
BoundingVolumeHierarchy
< TTriangle, TriangleTraits,
SplitHeuristics > 
TTriangleTree
typedef std::vector< const
Triangle * > 
TVertexTriangles
typedef std::vector< TPointTVertexRing
typedef std::vector< TVectorTNormalRing
typedef std::vector< TUvTUvRing

Private Member Functions

template<typename IndexTriangleInputRange >
void buildMesh (const IndexTriangleInputRange &triangles)
void connectTriangles ()
void findVertexTriangles (TVertexTriangles &vertexTriangles) const
void findVertexRing (const TPoint &vertex, const Triangle *vertexTriangle, TVertexRing &ring, TVertexRing &creases, TNormalRing &normals, TUvRing &uvs) const
void subdivide ()
 subdivide every triangle in 4 new ones by splitting the edges

Private Attributes

TTriangleTree tree_
TTriangles triangles_
TVertices vertices_
TNormals normals_
TUvs uvs_
unsigned numBoundaryEdges_


Detailed Description

template<typename T, template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics>
class lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >

One of the simplier meshes.

Author:
Bram de Greve [BdG]

Definition at line 83 of file triangle_mesh_3d.h.


Member Typedef Documentation

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TriangleMesh3D<T, BoundingVolumeHierarchy, SplitHeuristics> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TSelf

Definition at line 87 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef Point3D<T> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TPoint

Definition at line 89 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TPoint::TVector lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TVector

Definition at line 90 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef Point2D<T> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TUv

Definition at line 91 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef Aabb3D<T> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TAabb

Definition at line 92 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef Ray3D<T> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TRay

Definition at line 93 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TPoint::TValue lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TValue

Definition at line 95 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TPoint::TParam lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TParam

Definition at line 96 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TPoint::TReference lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TReference

Definition at line 97 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TPoint::TConstReference lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TConstReference

Definition at line 98 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TPoint::TNumTraits lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TNumTraits

Definition at line 99 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef IntersectionContext lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TIntersectionContext

Definition at line 132 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef Triangle lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TTriangle

Definition at line 133 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef IndexTriangle lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TIndexTriangle

Definition at line 134 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<Triangle> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TTriangles

Definition at line 135 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<TPoint> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TVertices

Definition at line 136 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<TVector> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TNormals

Definition at line 137 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<TUv> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TUvs

Definition at line 138 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TTriangles::const_iterator lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TTriangleIterator

Definition at line 140 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TVertices::const_iterator lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TVertexIterator

Definition at line 141 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TNormals::const_iterator lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TNormalIterator

Definition at line 142 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef TUvs::const_iterator lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TUvIterator

Definition at line 143 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef spat::DefaultAabbRayTraits<TAabb, TRay> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TAabbRayTraits [private]

Definition at line 179 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef BoundingVolumeHierarchy<TTriangle, TriangleTraits, SplitHeuristics> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TTriangleTree [private]

Definition at line 219 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<const Triangle*> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TVertexTriangles [private]

Definition at line 265 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<TPoint> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TVertexRing [private]

Definition at line 266 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<TVector> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TNormalRing [private]

Definition at line 267 of file triangle_mesh_3d.h.

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
typedef std::vector<TUv> lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::TUvRing [private]

Definition at line 268 of file triangle_mesh_3d.h.


Member Enumeration Documentation

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
anonymous enum

Enumerator:
dimension 

Definition at line 101 of file triangle_mesh_3d.h.


Constructor & Destructor Documentation

template<typename T , template< typename, typename, typename > class BHV, typename SH >
lass::prim::TriangleMesh3D< T, BHV, SH >::TriangleMesh3D (  )  [inline]

Definition at line 64 of file triangle_mesh_3d.inl.

template<typename T , template< typename, typename, typename > class BHV, typename SH >
template<typename VertexInputRange , typename IndexTriangleInputRange >
lass::prim::TriangleMesh3D< T, BHV, SH >::TriangleMesh3D ( const VertexInputRange &  vertices,
const IndexTriangleInputRange &  triangles 
) [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
template<typename VertexInputRange , typename NormalInputRange , typename UvInputRange , typename IndexTriangleInputRange >
lass::prim::TriangleMesh3D< T, BHV, SH >::TriangleMesh3D ( const VertexInputRange &  vertices,
const NormalInputRange &  normals,
const UvInputRange &  uvs,
const IndexTriangleInputRange &  triangles 
) [inline]


Member Function Documentation

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const TriangleMesh3D< T, BHV, SH >::TTriangles & lass::prim::TriangleMesh3D< T, BHV, SH >::triangles (  )  const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const TriangleMesh3D< T, BHV, SH >::TVertices & lass::prim::TriangleMesh3D< T, BHV, SH >::vertices (  )  const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const TriangleMesh3D< T, BHV, SH >::TNormals & lass::prim::TriangleMesh3D< T, BHV, SH >::normals (  )  const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const TriangleMesh3D< T, BHV, SH >::TUvs & lass::prim::TriangleMesh3D< T, BHV, SH >::uvs (  )  const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
template<typename OutputIterator >
OutputIterator lass::prim::TriangleMesh3D< T, BHV, SH >::indexTriangles ( OutputIterator  triangles  )  const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const TriangleMesh3D< T, BHV, SH >::TAabb lass::prim::TriangleMesh3D< T, BHV, SH >::aabb (  )  const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const TriangleMesh3D< T, BHV, SH >::TValue lass::prim::TriangleMesh3D< T, BHV, SH >::area (  )  const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::smoothNormals ( TParam  maxAngleInRadians  )  [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::flatFaces (  )  [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::loopSubdivision ( unsigned  level  )  [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::autoSew (  )  [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::autoCrease ( unsigned  level  )  [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const Result lass::prim::TriangleMesh3D< T, BHV, SH >::intersect ( const TRay ray,
TTriangleIterator triangle,
TReference  t,
TParam  tMin = 0,
IntersectionContext context = 0 
) const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
const bool lass::prim::TriangleMesh3D< T, BHV, SH >::intersects ( const TRay ray,
TParam  tMin,
TParam  tMax 
) const [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::swap ( TSelf other  )  [inline]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
template<typename IndexTriangleInputRange >
void lass::prim::TriangleMesh3D< T, BHV, SH >::buildMesh ( const IndexTriangleInputRange &  triangles  )  [inline, private]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::connectTriangles (  )  [inline, private]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::findVertexTriangles ( TVertexTriangles vertexTriangles  )  const [inline, private]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::findVertexRing ( const TPoint vertex,
const Triangle vertexTriangle,
TVertexRing ring,
TVertexRing creases,
TNormalRing normals,
TUvRing uvs 
) const [inline, private]

template<typename T , template< typename, typename, typename > class BHV, typename SH >
void lass::prim::TriangleMesh3D< T, BHV, SH >::subdivide (  )  [inline, private]


Field Documentation

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
TTriangleTree lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::tree_ [private]

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
TTriangles lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::triangles_ [private]

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
TVertices lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::vertices_ [private]

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
TNormals lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::normals_ [private]

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
TUvs lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::uvs_ [private]

template<typename T , template< typename T, typename OT, typename SH > class BoundingVolumeHierarchy, typename SplitHeuristics >
unsigned lass::prim::TriangleMesh3D< T, BoundingVolumeHierarchy, SplitHeuristics >::numBoundaryEdges_ [private]


The documentation for this class was generated from the following files:

Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo