#include <surface.h>
Inheritance diagram for TSurface< T >:

Public Types | |
Type definitions | |
| typedef TVector3< T > | Vertex |
| A vertex. | |
| typedef TVector3< T > | Normal |
| A normal. | |
Public Member Functions | |
Constructors and Destructors | |
| TSurface (const TSurface &surface) throw () | |
Assignment | |
| void | set (const TSurface &surface) throw () |
| TSurface & | operator= (const TSurface &surface) throw () |
| void | get (TSurface &surface) const throw () |
| void | clear () throw () |
| void | readMSMSFile (const String &vert_filename, const String &face_filename) throw (Exception::FileNotFound) |
| Read from MSMS file. | |
Accessors | |
| float | getArea () const throw () |
| Compute the surface area. | |
| Size | getNumberOfTriangles () const throw () |
| Return the number of triangles. | |
| Size | getNumberOfVertices () const throw () |
| Return the number of vertices. | |
| Size | getNumberOfNormals () const throw () |
| Return the number of normals. | |
| Triangle & | getTriangle (Position index) throw () |
| Return a triangle with a given index. | |
| const Triangle & | getTriangle (Position index) const throw () |
| Return a triangle with a given index. | |
| void | clearTriangles () |
| Clear all triangles. | |
| void | resizeTriangles (Size size) |
| Resize the triangle array. | |
| void | pushBackTriangle (const Triangle &triangle) throw () |
| Add a triangle. | |
| Vertex & | getVertex (Position index) throw () |
| Return the position of a vertex. | |
| const Vertex & | getVertex (Position index) const throw () |
| Return the position of a vertex. | |
| void | clearVertices () |
| Clear all vertices. | |
| void | resizeVertices (Size size) |
| Resize the vertex array. | |
| void | pushBackVertex (const Vertex &vertex) throw () |
| Add a vertex. | |
| Normal & | getNormal (Position index) throw () |
| Return the position of a normal. | |
| const Normal & | getNormal (Position index) const throw () |
| Return the position of a normal. | |
| void | clearNormals () |
| Clear all normals. | |
| void | resizeNormals (Size size) |
| Resize the normal array. | |
| void | pushBackNormal (const Normal &n) throw () |
| Add a normal. | |
Predicates | |
| bool | operator== (const TSurface &surface) const throw () |
| bool | operator!= (const TSurface &surface) const throw () |
Public Attributes | |
Attributes | |
| vector< Vertex > | vertex |
| the vertices | |
| vector< Normal > | normal |
| the normals for each vertex | |
| vector< Triangle > | triangle |
| the triangles | |
This class describes a three-dimensional triangulated surface. Each triangle is represented by three indices to vertices (as described by the TSurface::Triangle ). Each of the vertices has a position and possibly a normal vector associated.
|
|||||||||
|
Compute the surface area. The area is computed as the sum of the areas of all triangles. |
|
||||||||||||||||
|
Read from MSMS file. Read the contents of the vertex and faces file created by Michael Sanners software MSMS. |