#include <face.h>
Collaboration diagram for Face:
Public Member Functions | |
Face & | operator= (Face const &) |
Face (int const &, int const &, int const &, int const &, vec_vp &) | |
Face (Face const &) | |
bool | isMatch (int i, std::string const &name) const |
void | print (std::ostream &) const |
void | printCP (std::ostream &) const |
void | addEdge (Edge *) |
void | getBoundingBox (hxa7241_graphics::Vector3r &lower, hxa7241_graphics::Vector3r &upper) const |
void | getVertexCoord (vector3 const *&, vector3 const *&, vector3 const *&) const |
double | getAngle (Vertex const *const v) const |
double | getAngleProxy (Vertex const *const) const |
double | getAspectRatio (vector3 &, Vertex const *&) const |
double | getAspectRatioForceEnergy (Vertex const *const v, vector3 &force, bool compute_force) const |
void | updateNormal (void) |
bool | getFlag (void) const |
void | setFlag (void) |
void | clearFlag (void) |
int | getIndex (void) const |
Edge * | getEdge (int const &i) |
Vertex * | getVertex (int const &i) const |
vector3 const * | getNormal (void) const |
double | computeArea (void) |
Face::Face | ( | int const & | in, | |
int const & | v1, | |||
int const & | v2, | |||
int const & | v3, | |||
vec_vp & | vp | |||
) |
Creat instance of Face class.
[in] | line | Single line from input mesh file. |
[in] | vp | Implicit mapping from vertex index to vertex pointer. |
Face::Face | ( | Face const & | ) |
bool Face::isMatch | ( | int | i, | |
std::string const & | name | |||
) | const |
Compare input face index and object name to this face's index and object name.
[in] | i | Input face index. |
[in] | name | Input face parent object name. |
void Face::print | ( | std::ostream & | target | ) | const |
Print identifying face information to output stream.
[in] | target | Pre-initialized output stream. |
void Face::printCP | ( | std::ostream & | target | ) | const |
Print to output stream the position of each vertex of this face in DREaMM custom points format.
[in] | target | Pre-initialized output stream. |
void Face::addEdge | ( | Edge * | ptr | ) |
Add input edge pointer to this face.
[in] | ptr | Edge of interest. |
void Face::getBoundingBox | ( | hxa7241_graphics::Vector3r & | lower, | |
hxa7241_graphics::Vector3r & | upper | |||
) | const |
Calculate bounding box of this face.
[out] | lower | Lower corner of bounding box of this face. |
[out] | upper | Upper corner of bounding box of this face. |
Get pointers to face vertex positions.
[out] | v0 | Pointer to position of first vertex. |
[out] | v1 | Pointer to position of second vertex. |
[out] | v2 | Pointer to position of third vertex. |
double Face::getAngle | ( | Vertex const *const | v | ) | const |
double Face::getAngleProxy | ( | Vertex const * const | vv | ) | const |
Calculate and retun a ratio of face edge lengths that behaves similarly to interior face angle.
[in] | vv | Vertex of interest. |
Calculate and return aspect ratio of this face.
double Face::getAspectRatioForceEnergy | ( | Vertex const *const | vv, | |
vector3 & | force, | |||
bool | compute_force | |||
) | const |
Compute and return the force vector and energy due to the aspect ratio of this face.
[in] | v | Vertex of interest. |
[out] | force | Cumulative force. |
[in] | compute_force | If true then compute force vector; otherwise compute energy only. |
void Face::updateNormal | ( | void | ) |
Calculate and record face normal (not guaranteed to be unit vector).
bool Face::getFlag | ( | void | ) | const [inline] |
Get flag of this face.
void Face::setFlag | ( | void | ) | [inline] |
Set flag of this face to true.
void Face::clearFlag | ( | void | ) | [inline] |
Reset flag of this face to false.
int Face::getIndex | ( | void | ) | const [inline] |
Get face index.
Edge* Face::getEdge | ( | int const & | i | ) | [inline] |
Vertex* Face::getVertex | ( | int const & | i | ) | const [inline] |
Get pointer to face vertex.
[in] | i | Index (0,1,2) of face vertex of interest. |
vector3 const* Face::getNormal | ( | void | ) | const [inline] |
Return face normal (not guaranteed to be unit vector).
double Face::computeArea | ( | void | ) | [inline] |
Calculate face area.