#include <polygon_mesh.h>
Public Types | |
| typedef vgl_point_3d< double > | DPoint |
| typedef vnl_vector_fixed < double, 3 > | DVector3D |
| typedef vcl_vector< int > | Face |
| typedef vcl_vector< DPoint > | Polygon |
Public Member Functions | |
| PolygonMesh (int num_vertices=100, int num_faces=100) | |
| int | add_vertex (DPoint &pt) |
| add_vertex. | |
| int | set_vertex (int index, DPoint &pt) |
| add_vertex. | |
| int | add_face (Face &fc) |
| add_face. | |
| int | set_face (int index, Face &fc) |
| add_face. | |
| DPoint | get_vertex (int index) |
| get_vertex. | |
| Polygon | get_face (int index) |
| get_face. | |
| DVector3D | get_face_normal (int face_index, int vertex_index) |
| get_face_normal. | |
| bool | read_file (char *filename) |
| read_file. | |
| int | num_faces () const |
| int | num_vertices () const |
Private Attributes | |
| vcl_vector< DPoint > | vertex_list |
| vcl_vector< Face > | face_list |
Definition at line 16 of file polygon_mesh.h.
| typedef vgl_point_3d<double> PolygonMesh::DPoint |
Definition at line 19 of file polygon_mesh.h.
| typedef vnl_vector_fixed<double, 3> PolygonMesh::DVector3D |
Definition at line 20 of file polygon_mesh.h.
| typedef vcl_vector<int> PolygonMesh::Face |
Definition at line 21 of file polygon_mesh.h.
| typedef vcl_vector<DPoint> PolygonMesh::Polygon |
Definition at line 22 of file polygon_mesh.h.
| PolygonMesh::PolygonMesh | ( | int | num_vertices = 100, |
| int | num_faces = 100 |
||
| ) | [inline] |
Definition at line 28 of file polygon_mesh.h.
| int PolygonMesh::add_face | ( | Face & | fc | ) |
add_face.
Add a face to the end of the list of faces
| fc | The vertices associated with the face |
Definition at line 62 of file polygon_mesh.cxx.
| int PolygonMesh::add_vertex | ( | DPoint & | pt | ) |
add_vertex.
Add a vertex to the end of the list of vertices
| pt | The location of the vertex |
Definition at line 25 of file polygon_mesh.cxx.
| PolygonMesh::Polygon PolygonMesh::get_face | ( | int | index | ) |
get_face.
Returns a face at the specified location
| index | the position to return |
Definition at line 119 of file polygon_mesh.cxx.
| PolygonMesh::DVector3D PolygonMesh::get_face_normal | ( | int | face_index, |
| int | vertex_index | ||
| ) |
get_face_normal.
return the normal vector for the given vertex of a given face.
| face_index | which face |
| vertex_index | which vertex in the face (ie not the vertex index in the entire list of vertices, but the vertex index within the face). |
Definition at line 209 of file polygon_mesh.cxx.
| PolygonMesh::DPoint PolygonMesh::get_vertex | ( | int | index | ) |
get_vertex.
Returns a vertex at the specified location
| index | the position to return |
Definition at line 98 of file polygon_mesh.cxx.
| int PolygonMesh::num_faces | ( | ) | const [inline] |
Definition at line 39 of file polygon_mesh.h.
| int PolygonMesh::num_vertices | ( | ) | const [inline] |
Definition at line 40 of file polygon_mesh.h.
| bool PolygonMesh::read_file | ( | char * | filename | ) |
read_file.
read a mesh in from a file
| filename | the name of the file |
Definition at line 145 of file polygon_mesh.cxx.
| int PolygonMesh::set_face | ( | int | index, |
| Face & | fc | ||
| ) |
add_face.
Add a face to the prescribed position in the list of faces
| fc | The vertices associated with the face |
| index | Where to add the face |
Definition at line 79 of file polygon_mesh.cxx.
| int PolygonMesh::set_vertex | ( | int | index, |
| DPoint & | pt | ||
| ) |
add_vertex.
Add a vertex to the prescribed position in the list of vertices
| pt | The location of the vertex |
| index | Where to add the vertex |
Definition at line 43 of file polygon_mesh.cxx.
vcl_vector<Face> PolygonMesh::face_list [private] |
Definition at line 25 of file polygon_mesh.h.
vcl_vector<DPoint> PolygonMesh::vertex_list [private] |
Definition at line 24 of file polygon_mesh.h.
1.7.5.1