30 #ifndef ATBSURFACEGEOMETRY_HH 31 #define ATBSURFACEGEOMETRY_HH 39 #include <blitz/array.h> 62 typedef blitz::TinyVector<float,3>
VertexT;
69 typedef blitz::TinyVector<float,3>
NormalT;
129 std::vector<VertexT>
const &
vertices()
const;
155 std::vector<NormalT>
const &
normals()
const;
165 std::vector<NormalT> &
normals();
175 std::vector<IndexT>
const &
indices()
const;
185 std::vector<IndexT> &
indices();
221 void renderSTL(std::ostream &os,
bool writeASCII =
true)
const;
236 blitz::TinyVector<float,3>
const &planeNormal,
float planeOffset,
237 std::vector< blitz::TinyVector<blitz::TinyVector<float,2>,2> > &lines)
255 int direction,
float planeOffset,
256 std::vector< blitz::TinyVector<blitz::TinyVector<float,2>,2> > &lines)
291 void _updateBoundingBox()
const;
293 std::vector<VertexT> _vertices;
294 std::vector<NormalT> _normals;
295 std::vector<IndexT> _indices;
297 mutable blitz::TinyVector<double,3> _boundingBoxLowerBoundUm,
298 _boundingBoxUpperBoundUm;
299 mutable bool _boundingBoxUpToDate;
std::vector< IndexT > const & indices() const
Get a read only reference onto the Index vector of this SurfaceGeometry object.
SurfaceGeometry()
Default Constructor.
blitz::TinyVector< double, 3 > const & boundingBoxLowerBoundUm() const
Get the tight, axis-aligned lower bound of the bounding box for this surface geometry.
blitz::TinyVector< float, 3 > VertexT
VertexT is the type used to store a 3D vertex position.
unsigned int IndexT
IndexT is the type used to store the triangle corner indices in the vertex Array. ...
SurfaceGeometry & operator=(SurfaceGeometry const &geometry)
Copy assignment operator.
blitz::TinyVector< double, 3 > const & boundingBoxUpperBoundUm() const
Get the tight, axis-aligned upper bound of the bounding box for this surface geometry.
std::vector< NormalT > const & normals() const
Get a read only reference onto the Normal vector of this SurfaceGeometry object.
~SurfaceGeometry()
Destructor.
void renderSTL(std::ostream &os, bool writeASCII=true) const
Appends the set of triangle primitives described by this SurfaceGeometry as STL facets to the given o...
void computeDefaultNormals()
Computes the surface normals from the provided vertices and indices.
blitz::TinyVector< float, 3 > NormalT
NormalT is the type used to store a 3D vertex normal.
The SurfaceGeometry struct provides data structures required for the storage of triangulated surface ...
std::vector< VertexT > const & vertices() const
Get a read only reference onto the Vertex vector of this SurfaceGeometry object.
void planeIntersection(blitz::TinyVector< float, 3 > const &planeNormal, float planeOffset, std::vector< blitz::TinyVector< blitz::TinyVector< float, 2 >, 2 > > &lines) const
Intersect the SurfaceGeometryObject with the plane defined by the given parameters and return the res...