Abstract base class for a collection of faces. More...
#include <imesh_face.h>
Public Member Functions | |
virtual | ~imesh_face_array_base () |
Destructor. | |
virtual unsigned int | regularity () const =0 |
returns the number of vertices per face if the same for all faces, zero otherwise. | |
virtual unsigned int | size () const =0 |
returns the number of faces. | |
virtual unsigned int | num_verts (unsigned int f) const =0 |
returns the number of vertices in face | |
virtual unsigned int | operator() (unsigned int f, unsigned int i) const =0 |
Access a vertex index by face index and within-face index. | |
virtual void | flip_orientation (unsigned int f) |
Flip a face over, inverting its orientation. | |
virtual imesh_face_array_base * | clone () const =0 |
Produce a clone of this object (dynamic copy). | |
virtual void | append (const imesh_face_array_base &other, unsigned int ind_shift=0) |
Append this array of faces (must be the same type). | |
bool | has_normals () const |
Return true if the faces have normals. | |
void | set_normals (const vcl_vector< vgl_vector_3d< double > > &n) |
Set the face normals. | |
vgl_vector_3d< double > & | normal (unsigned int f) |
Access a face normal. | |
const vgl_vector_3d< double > & | normal (unsigned int f) const |
const vcl_vector < vgl_vector_3d< double > > & | normals () const |
Access the entire vector of normals. | |
bool | has_groups () const |
Returns true if the faces have named groups. | |
vcl_string | group_name (unsigned int f) const |
Return the group name for a given face index. | |
unsigned int | make_group (const vcl_string &name) |
Assign a group name to all faces currently unnamed. | |
vcl_set< unsigned int > | group_face_set (const vcl_string &name) const |
Return a set of all faces in a group. | |
const vcl_vector< vcl_pair < vcl_string, unsigned int > > & | groups () const |
Access the groups. | |
Protected Attributes | |
vcl_vector< vcl_pair < vcl_string, unsigned int > > | groups_ |
named groups of adjacent faces (a partition of the face array). | |
vcl_vector< vgl_vector_3d < double > > | normals_ |
vectors that are normal to each face. |
Abstract base class for a collection of faces.
Definition at line 83 of file imesh_face.h.
virtual imesh_face_array_base::~imesh_face_array_base | ( | ) | [inline, virtual] |
Destructor.
Definition at line 87 of file imesh_face.h.
void imesh_face_array_base::append | ( | const imesh_face_array_base & | other, |
unsigned int | ind_shift = 0 |
||
) | [virtual] |
Append this array of faces (must be the same type).
Optionally shift the indices in
other | by |
ind_shift |
Reimplemented in imesh_regular_face_array< s >, and imesh_face_array.
Definition at line 59 of file imesh_face.cxx.
virtual imesh_face_array_base* imesh_face_array_base::clone | ( | ) | const [pure virtual] |
Produce a clone of this object (dynamic copy).
Implemented in imesh_regular_face_array< s >, and imesh_face_array.
virtual void imesh_face_array_base::flip_orientation | ( | unsigned int | f | ) | [inline, virtual] |
Flip a face over, inverting its orientation.
Reimplemented in imesh_regular_face_array< s >, and imesh_face_array.
Definition at line 102 of file imesh_face.h.
vcl_set< unsigned int > imesh_face_array_base::group_face_set | ( | const vcl_string & | name | ) | const |
Return a set of all faces in a group.
Definition at line 26 of file imesh_face.cxx.
vcl_string imesh_face_array_base::group_name | ( | unsigned int | f | ) | const |
Return the group name for a given face index.
Definition at line 8 of file imesh_face.cxx.
const vcl_vector<vcl_pair<vcl_string,unsigned int> >& imesh_face_array_base::groups | ( | ) | const [inline] |
Access the groups.
Definition at line 144 of file imesh_face.h.
bool imesh_face_array_base::has_groups | ( | ) | const [inline] |
Returns true if the faces have named groups.
Definition at line 131 of file imesh_face.h.
bool imesh_face_array_base::has_normals | ( | ) | const [inline] |
Return true if the faces have normals.
Definition at line 117 of file imesh_face.h.
unsigned int imesh_face_array_base::make_group | ( | const vcl_string & | name | ) |
Assign a group name to all faces currently unnamed.
Return the number of faces in the new group
Definition at line 44 of file imesh_face.cxx.
vgl_vector_3d<double>& imesh_face_array_base::normal | ( | unsigned int | f | ) | [inline] |
Access a face normal.
Definition at line 124 of file imesh_face.h.
const vgl_vector_3d<double>& imesh_face_array_base::normal | ( | unsigned int | f | ) | const [inline] |
Definition at line 125 of file imesh_face.h.
const vcl_vector<vgl_vector_3d<double> >& imesh_face_array_base::normals | ( | ) | const [inline] |
Access the entire vector of normals.
Definition at line 128 of file imesh_face.h.
virtual unsigned int imesh_face_array_base::num_verts | ( | unsigned int | f | ) | const [pure virtual] |
returns the number of vertices in face
f. |
Implemented in imesh_regular_face_array< s >, and imesh_face_array.
virtual unsigned int imesh_face_array_base::operator() | ( | unsigned int | f, |
unsigned int | i | ||
) | const [pure virtual] |
Access a vertex index by face index and within-face index.
Implemented in imesh_regular_face_array< s >, and imesh_face_array.
virtual unsigned int imesh_face_array_base::regularity | ( | ) | const [pure virtual] |
returns the number of vertices per face if the same for all faces, zero otherwise.
Implemented in imesh_regular_face_array< s >, and imesh_face_array.
void imesh_face_array_base::set_normals | ( | const vcl_vector< vgl_vector_3d< double > > & | n | ) | [inline] |
Set the face normals.
Definition at line 120 of file imesh_face.h.
virtual unsigned int imesh_face_array_base::size | ( | ) | const [pure virtual] |
returns the number of faces.
Implemented in imesh_regular_face_array< s >, and imesh_face_array.
vcl_vector<vcl_pair<vcl_string,unsigned int> > imesh_face_array_base::groups_ [protected] |
named groups of adjacent faces (a partition of the face array).
Integers mark the group's ending vertex + 1
Definition at line 149 of file imesh_face.h.
vcl_vector<vgl_vector_3d<double> > imesh_face_array_base::normals_ [protected] |
vectors that are normal to each face.
Definition at line 152 of file imesh_face.h.