Container Class Reference

#include <container.h>

Collaboration diagram for Container:

Collaboration graph
[legend]
List of all members.

Public Member Functions

int getVertexCount (void) const
int getFaceCount (void) const
int getEdgeCount (void) const
void boundWorld (void)
void writeSummary (std::ostream &)
void scanDir (void)
void scanFiles (void)
void assessFile (Object *const, char const *)
void scanFile (Object *const, char const *)
void computeVertexNormals (void)
void createEdges (void)
void findVertAdj (void)
void readFrozen (char const *)
void sortAdjacentFaces (void)
void deleteme_checkClosestFace (int const &, int const &, std::string)
void checkClosestFace (int const &, std::string)
void checkClosestFace2 (int const &, std::string)
void checkClosestFace3 (int const &, std::string)
void checkFaces (std::string)
void checkFacesInOctree (void)
void printRegionInOctree (void)
void writeMeshData (int const &) const
void findClosestFaceToEachVertex (void)
void findClosestPtInFaceToLocation (vector3 const &pt, Face const *const face, vector3 &p, double &squareD) const
void findPtInFaceWhereNormalInt (vector3 const &pt, vector3 n, double const &, Face const *const face, vector3 &p, double &squareD) const
bool faceLiesOppositeToNormal (vector3 const &, Face const *const face, vector3 const &n) const
bool boundingBoxFullyInSearchRegion (vec_d const &sr, vec_d const &bb) const
bool vertexOutsideOctreeBounds (vector3 const *const new_pos)
bool closestPtIsInSearchCone (vector3 const &pt, vector3 const &p, vector3 const &n, double const &) const
bool findClosestPtToBarycenterAmongFaces (vector3 const &, Face *const f, fp_cit, fp_cit, double const &cone_radius, vector3 &, double &, Face *&, int &) const
bool findClosestPtToVertexAmongFaces (Vertex const *const, fp_cit, fp_cit, double const &, vector3 &, double &, Face *&, int &) const
bool findClosestPtToVertex (Vertex const *const, vector3 &, double &, Face *&) const
bool findClosestPtToBarycenter (vector3 const &pt, Face *const f, vector3 &, double &, Face *&) const
double getMinEdgeAngle (void) const
double getWorld (int const &) const
vec_d getSphericalConeBoundingBox (vector3 const &pt, vector3 n, double const &cone_radius) const
mmap_oi loadMap (char const *, s_set &)
ObjectgetObjectPointer (std::string) const
std::vector< ComplexloadVector (const char *filename, s_set &not_found)
bool vertexIsFrozen (Vertex *const v) const
int getFileCount (void) const

Static Public Member Functions

static Containerinstance (void)

Public Attributes

hxa7241_graphics::Octree<
Face > * 
octree
vec_o o

Member Function Documentation

Container & Container::instance ( void   )  [static]

int Container::getVertexCount ( void   )  const

Get the total number of vertices in the input data.

Returns:
The total number of vertices in the input data.

int Container::getFaceCount ( void   )  const

Get the total number of faces in the input data.

Returns:
The total number of faces in the input data.

int Container::getEdgeCount ( void   )  const

Get the total number of edges in the input data.

Returns:
The total number of edges in the input data.

void Container::boundWorld ( void   ) 

Calculate and record limits of model along each prinicpal axis.

void Container::writeSummary ( std::ostream &  target  ) 

Write description and summary of this class to output stream.

Parameters:
[in] target Pre-initialized output stream.

void Container::scanDir ( void   ) 

Find all .mesh files in input directory.

void Container::scanFiles ( void   ) 

For each .mesh file found in input directory build an instance of object class.

Returns:
Void.

void Container::assessFile ( Object * const  obj,
char const *  filename 
)

Scan input data file once to count total number of vertices and faces in the object.

Parameters:
[in] obj Pointer to parent Object.
[in] filename Input file name.

void Container::scanFile ( Object * const  obj,
char const *  filename 
)

Build Object from input file data.

Parameters:
[in] obj Pointer to parent Object.
[in] filename Input file name.

void Container::computeVertexNormals ( void   ) 

Calculate and record the normal vector of each vertex in the model.

void Container::createEdges ( void   ) 

For each object build instance of edge class using face and vertex class data.

void Container::findVertAdj ( void   ) 

For each vertex in each object add pointers to adjacent faces of vertex to vertex class.

void Container::readFrozen ( char const *  filename  ) 

Process frozen vertex data.

Parameters:
[in] filename Frozen vertex file name.

void Container::sortAdjacentFaces ( void   ) 

Sort adjacent faces of each vertex in model.

void Container::deleteme_checkClosestFace ( int const &  ,
int const &  ,
std::string   
)

void Container::checkClosestFace ( int const &  group,
std::string  suffix 
)

Find the closest face of each vertex in container and compare with closest face stored in vertex class.

Parameters:
[in] group Number of group of vertices being moved.
[in] suffix String to append to file name to identify when in the program the file was written.

void Container::checkClosestFace2 ( int const &  ,
std::string   
)

void Container::checkClosestFace3 ( int const &  ,
std::string   
)

void Container::checkFaces ( std::string  s  ) 

Check that all faces have flag set to false.

Parameters:
[in] s Error message if face found with flag set to true.

void Container::checkFacesInOctree ( void   ) 

Check that all faces are present in appropriate octree cells.

void Container::printRegionInOctree ( void   ) 

Print octree overlapping region.

void Container::writeMeshData ( int const &  group  )  const

Write to file the current position of all mesh objects.

Parameters:
[in] group The current group number from meshmorph.cc.

void Container::findClosestFaceToEachVertex ( void   ) 

Find and record the closest face to each vertex in the model.

void Container::findClosestPtInFaceToLocation ( vector3 const &  pt,
Face const *const  face,
vector3 closest_point,
double &  fSqrDistance 
) const

Find closest point in face to input location.

Parameters:
[in] pt Location of interest.
[in] face Face on which closest point to input location will be identified.
[out] closest_point Closest point position, if found.
[out] fSqrDistance Squared distance between input location and closest point, if found.
Returns:
True if closest point found; otherwise false.

void Container::findPtInFaceWhereNormalInt ( vector3 const &  pt,
vector3  n,
double const &  cone_radius,
Face const *const  face,
vector3 intersection_point,
double &  fSqrDistance 
) const

Find intersection point of vertex normal vector and input face.

Parameters:
[in] pt Location of interest.
[in] face Face on which intersection point of normal vector will be identified.
[out] intersection_point Intersection point position, if found.
[out] fSqrDistance Squared distance between input location and intersection point, if found.
Returns:
True if intersection point found; otherwise false.

bool Container::faceLiesOppositeToNormal ( vector3 const &  pt,
Face const *const  face,
vector3 const &  nn 
) const

Determine if entire input face lies in hemispace opposite to normal vector at input location.

Parameters:
[in] pt Location of interest.
[in] face Face of interest.
[in] nn Normal vector of this face.
Returns:
True if entire face lies opposite to normal vector; false otherwise.

bool Container::boundingBoxFullyInSearchRegion ( vec_d const &  sr,
vec_d const &  bb 
) const

Determine if input bounding box is fully inside the input search region.

Parameters:
[in] sr Search region [xmin,xmax,ymin,ymax,zmin,zmax].
[in] bb Bounding box [xmin,xmax,ymin,ymax,zmin,zmax].
Returns:
True if bounding box is fully inside search region; false otherwise.

bool Container::vertexOutsideOctreeBounds ( vector3 const *const   new_pos  ) 

Check if moved vertex has breached octree boundary.

Parameters:
[in] new_pos The new position of current vertex.
Returns:
True if vertex has moved to a location outside of octree bounday, false otherwise.

bool Container::closestPtIsInSearchCone ( vector3 const &  pt,
vector3 const &  p,
vector3 const &  n,
double const &  sqd_sep_dist 
) const

Determine if closest point is inside search cone.

Parameters:
[in] pt Point of interest.
[in] p Closest point of interest.
[in] n Vertex normal vector.
[in] sqd_sep_dist Squared distance between point and vertex.
Returns:
True if point is inside vertex search cone; false otherwise;

bool Container::findClosestPtToBarycenterAmongFaces ( vector3 const &  pt,
Face *const   f,
fp_cit  begin,
fp_cit  end,
double const &  cone_radius,
vector3 p,
double &  squareD,
Face *&  ncl,
int &  faces_checked 
) const

Find closest point to tile's barycenter among input faces.

Parameters:
[in] pt Barycenter of face tile for which closest point is searched.
[in] f Face on which tile is located.
[in] begin Iterator pointing to first face in vector of faces to check.
[in] end Iterator pointing to one past the last face in vector of faces to check.
[out] p Closest point position, if found.
[out] squareD Squared distance between vertex and closest point, if found.
[out] ncl Parent face of closest point, if found.
[out] faces_checked Cumulative number of faces checked.
Returns:
True if closest point found; otherwise false.

bool Container::findClosestPtToVertexAmongFaces ( Vertex const * const  v,
fp_cit  begin,
fp_cit  end,
double const &  cone_radius,
vector3 p,
double &  squareD,
Face *&  ncl,
int &  faces_checked 
) const

Find closest point to vertex among input faces.

Parameters:
[in] v Vertex of interest.
[in] begin Iterator pointing to first face in vector of faces to check.
[in] end Iterator pointing to one past the last face in vector of faces to check.
[out] p Closest point position, if found.
[out] squareD Squared distance between vertex and closest point, if found.
[out] ncl Parent face of closest point, if found.
[out] faces_checked Cumulative number of faces checked.
Returns:
True if closest point found; otherwise false.

bool Container::findClosestPtToVertex ( Vertex const * const  v,
vector3 p,
double &  sqd,
Face *&  ncl 
) const

Find the closest point to a vertex.

Parameters:
[in] v Vertex for which closest point is searched.
[out] p Closest point position, if found.
[out] sqd Squared distance between vertex and closest point, if found.
[out] ncl Parent face of closest point, if found.
Returns:
True if closest point found; otherwise false.

bool Container::findClosestPtToBarycenter ( vector3 const &  pt,
Face *const   f,
vector3 p,
double &  sqd,
Face *&  ncl 
) const

Find the closest point to a tile's barycenter.

Parameters:
[in] pt Barycenter of face tile for which closest point is searched.
[in] f Face on which tile is located.
[out] p Closest point position, if found.
[out] sqd Squared distance between barycenter and closest point, if found.
[out] ncl Parent face of closest point, if found.
Returns:
True if closest point found; otherwise false.

double Container::getMinEdgeAngle ( void   )  const

Find the edge in model with smallest angle and return angle.

Returns:
Smallest edge angle in radians.

double Container::getWorld ( int const &  axis  )  const

Return the world limit along input axis.

Parameters:
[in] axis Requested direction 0,1,2,3,4,5 == -x,+x,-y,+y,-z,+z.
Returns:
World limit along ith axis.

vec_d Container::getSphericalConeBoundingBox ( vector3 const &  pt,
vector3  n,
double const &  cone_radius 
) const

Compute axis-aligned bounding box of spherical cone.

Parameters:
[in] pt Point of interest.
[in] n Normal vector at point of interest.
[in] cone_radius Spherical cone radius.
Returns:
Bounding box along principal axes [xmin,xmax,ymin,ymax,zmin,zmax].

mmap_oi Container::loadMap ( char const *  ,
s_set  
)

Object * Container::getObjectPointer ( std::string  name  )  const

Get pointer to object with matching name.

Parameters:
[in] name Name of object of interest.
Returns:
Pointer to object with name that matches the input name; otherwise NULL.

std::vector< Complex > Container::loadVector ( const char *  filename,
s_set not_found 
)

Parse input file of vertices (obejct name and vertex index) and store data.

Parameters:
[in] filename Input file name.
[out] not_found Set of object names from file that were not found in input data.
Returns:
Stored object data.

bool Container::vertexIsFrozen ( Vertex *const  v  )  const [inline]

Check if vertex is frozen.

Parameters:
[in] v Vertex of interest.
Returns:
True if vertex is frozen; otherwise false;

int Container::getFileCount ( void   )  const [inline]

Get number of input mesh files.

Returns:
Number of input files.


Member Data Documentation

hxa7241_graphics::Octree<Face>* Container::octree

vec_o Container::o


The documentation for this class was generated from the following files:
Generated on Fri Feb 13 13:58:40 2009 for meshmorph by  doxygen 1.5.1