An array of mesh faces of arbitrary size. More...
#include <imesh_face.h>
Public Types | |
typedef vcl_vector < imesh_regular_face< s > >::iterator | iterator |
typedef vcl_vector < imesh_regular_face< s > >::const_iterator | const_iterator |
Public Member Functions | |
imesh_regular_face_array () | |
Default Constructor. | |
imesh_regular_face_array (unsigned int size) | |
Constructor. | |
imesh_regular_face_array (const vcl_vector< imesh_regular_face< s > > &faces) | |
Constructor (from a vector). | |
virtual unsigned int | regularity () const |
returns the number of vertices per face if the same for all faces. | |
virtual unsigned int | size () const |
returns the number of faces. | |
virtual unsigned int | num_verts (unsigned int) const |
returns the number of vertices in face | |
virtual unsigned int | operator() (unsigned int f, unsigned int i) const |
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 |
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). | |
void | push_back (const imesh_regular_face< s > &f) |
Add a face to the array. | |
imesh_regular_face< s > & | operator[] (unsigned int f) |
Access face. | |
const imesh_regular_face< s > & | operator[] (unsigned int f) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
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. | |
Private Attributes | |
vcl_vector< imesh_regular_face < s > > | faces_ |
An array of mesh faces of arbitrary size.
Definition at line 236 of file imesh_face.h.
typedef vcl_vector<imesh_regular_face<s> >::const_iterator imesh_regular_face_array< s >::const_iterator |
Definition at line 306 of file imesh_face.h.
typedef vcl_vector<imesh_regular_face<s> >::iterator imesh_regular_face_array< s >::iterator |
Definition at line 305 of file imesh_face.h.
imesh_regular_face_array< s >::imesh_regular_face_array | ( | ) | [inline] |
Default Constructor.
Definition at line 242 of file imesh_face.h.
imesh_regular_face_array< s >::imesh_regular_face_array | ( | unsigned int | size | ) | [inline] |
Constructor.
Definition at line 245 of file imesh_face.h.
imesh_regular_face_array< s >::imesh_regular_face_array | ( | const vcl_vector< imesh_regular_face< s > > & | faces | ) | [inline] |
Constructor (from a vector).
Definition at line 248 of file imesh_face.h.
virtual void imesh_regular_face_array< s >::append | ( | const imesh_face_array_base & | other, |
unsigned int | ind_shift = 0 |
||
) | [inline, virtual] |
Append this array of faces (must be the same type).
Optionally shift the indices in
other | by |
ind_shift |
Reimplemented from imesh_face_array_base.
Definition at line 278 of file imesh_face.h.
iterator imesh_regular_face_array< s >::begin | ( | ) | [inline] |
Definition at line 308 of file imesh_face.h.
const_iterator imesh_regular_face_array< s >::begin | ( | ) | const [inline] |
Definition at line 309 of file imesh_face.h.
virtual imesh_face_array_base* imesh_regular_face_array< s >::clone | ( | ) | const [inline, virtual] |
Produce a clone of this object (dynamic copy).
Implements imesh_face_array_base.
Definition at line 271 of file imesh_face.h.
iterator imesh_regular_face_array< s >::end | ( | ) | [inline] |
Definition at line 311 of file imesh_face.h.
const_iterator imesh_regular_face_array< s >::end | ( | ) | const [inline] |
Definition at line 312 of file imesh_face.h.
virtual void imesh_regular_face_array< s >::flip_orientation | ( | unsigned int | f | ) | [inline, virtual] |
Flip a face over, inverting its orientation.
Reimplemented from imesh_face_array_base.
Definition at line 264 of file imesh_face.h.
vcl_set< unsigned int > imesh_face_array_base::group_face_set | ( | const vcl_string & | name | ) | const [inherited] |
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 [inherited] |
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, inherited] |
Access the groups.
Definition at line 144 of file imesh_face.h.
bool imesh_face_array_base::has_groups | ( | ) | const [inline, inherited] |
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, inherited] |
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 | ) | [inherited] |
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, inherited] |
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, inherited] |
Definition at line 125 of file imesh_face.h.
const vcl_vector<vgl_vector_3d<double> >& imesh_face_array_base::normals | ( | ) | const [inline, inherited] |
Access the entire vector of normals.
Definition at line 128 of file imesh_face.h.
virtual unsigned int imesh_regular_face_array< s >::num_verts | ( | unsigned int | ) | const [inline, virtual] |
returns the number of vertices in face
f. |
Implements imesh_face_array_base.
Definition at line 258 of file imesh_face.h.
virtual unsigned int imesh_regular_face_array< s >::operator() | ( | unsigned int | f, |
unsigned int | i | ||
) | const [inline, virtual] |
Access a vertex index by face index and within-face index.
Implements imesh_face_array_base.
Definition at line 261 of file imesh_face.h.
imesh_regular_face<s>& imesh_regular_face_array< s >::operator[] | ( | unsigned int | f | ) | [inline] |
const imesh_regular_face<s>& imesh_regular_face_array< s >::operator[] | ( | unsigned int | f | ) | const [inline] |
Definition at line 301 of file imesh_face.h.
void imesh_regular_face_array< s >::push_back | ( | const imesh_regular_face< s > & | f | ) | [inline] |
Add a face to the array.
Definition at line 297 of file imesh_face.h.
virtual unsigned int imesh_regular_face_array< s >::regularity | ( | ) | const [inline, virtual] |
returns the number of vertices per face if the same for all faces.
Returns zero otherwise
Implements imesh_face_array_base.
Definition at line 252 of file imesh_face.h.
void imesh_face_array_base::set_normals | ( | const vcl_vector< vgl_vector_3d< double > > & | n | ) | [inline, inherited] |
Set the face normals.
Definition at line 120 of file imesh_face.h.
virtual unsigned int imesh_regular_face_array< s >::size | ( | ) | const [inline, virtual] |
returns the number of faces.
Implements imesh_face_array_base.
Definition at line 255 of file imesh_face.h.
vcl_vector<imesh_regular_face<s> > imesh_regular_face_array< s >::faces_ [private] |
Definition at line 238 of file imesh_face.h.
vcl_vector<vcl_pair<vcl_string,unsigned int> > imesh_face_array_base::groups_ [protected, inherited] |
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, inherited] |
vectors that are normal to each face.
Definition at line 152 of file imesh_face.h.