imesh_face_array_base Class Reference

#include <imesh_face.h>

Inheritance diagram for imesh_face_array_base:

imesh_face_array imesh_regular_face_array< s > List of all members.

Detailed Description

Abstract base class for a collection of faces.

Definition at line 83 of file 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_baseclone () 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.

Constructor & Destructor Documentation

virtual imesh_face_array_base::~imesh_face_array_base (  )  [inline, virtual]

Destructor.

Definition at line 87 of file imesh_face.h.


Member Function Documentation

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_face_array, and imesh_regular_face_array< s >.

virtual unsigned int imesh_face_array_base::size (  )  const [pure virtual]

returns the number of faces.

Implemented in imesh_face_array, and imesh_regular_face_array< s >.

virtual unsigned int imesh_face_array_base::num_verts ( unsigned int  f  )  const [pure virtual]

returns the number of vertices in face

Parameters:
f. 

Implemented in imesh_face_array, and imesh_regular_face_array< s >.

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_face_array, and imesh_regular_face_array< s >.

virtual void imesh_face_array_base::flip_orientation ( unsigned int  f  )  [inline, virtual]

Flip a face over, inverting its orientation.

Reimplemented in imesh_face_array, and imesh_regular_face_array< s >.

Definition at line 102 of file imesh_face.h.

virtual imesh_face_array_base* imesh_face_array_base::clone (  )  const [pure virtual]

Produce a clone of this object (dynamic copy).

Implemented in imesh_face_array, and imesh_regular_face_array< s >.

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

Parameters:
other by
ind_shift 

Reimplemented in imesh_face_array, and imesh_regular_face_array< s >.

Definition at line 59 of file imesh_face.cxx.

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.

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.

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.

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.

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.

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.

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.

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.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Generated on Mon Mar 8 05:30:58 2010 for contrib/brl/bbas/imesh by  doxygen 1.5.1