State Class Reference

#include <state.h>

Collaboration diagram for State:

Collaboration graph
[legend]
List of all members.

Public Member Functions

v_set getVertsForFullClosestPtSearch (Vertex const *const, vector3 const &, vector3 const &)
v_set getVertsForPartialClosestPtSearch (vector3 const &, vector3 const &)
void recordVertAdjFaceEdgeAngles (Vertex const *const)
Search_Stats updateClosestFaceToVertices (Vertex *const, v_set &, v_set &)
void updateAdjacentFacesInTree (Vertex const *const)
void updateVertexVD (Vertex *const)
bool extremeAngleFound (void) const
bool assignNewVertexCoords (Vertex *const, vector3 const *const, vector3 const &, bool &, bool &, bool &)
bool angleChangeIsWrong (float const &, float const &) const
bool vertexOutsideOctreeBounds (vector3 const *const)
void updateVertexNormals (v_set &fs)
void updateAdjacentFacesInOctree (Vertex *const v, hxa7241_graphics::Vector3r *const adjacent_face_lower, hxa7241_graphics::Vector3r *const adjacent_face_upper)
void updateOctree (Vertex *const v, hxa7241_graphics::Vector3r *const old_adjacent_face_lower, hxa7241_graphics::Vector3r *const old_adjacent_face_upper, hxa7241_graphics::Vector3r *const new_adjacent_face_lower, hxa7241_graphics::Vector3r *const new_adjacent_face_upper)
float getVD2 (void)
void setVD2 (float const &sqd_disp)

Static Public Member Functions

static Stateinstance (void)

Member Function Documentation

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

v_set State::getVertsForFullClosestPtSearch ( Vertex const * const  v,
vector3 const &  lower,
vector3 const &  upper 
)

Collect vertices whose closest point may now lie anywhere.

Parameters:
[in] v The current vertex.
[in] lower Lower corner of desired search region.
[in] upper Upper corner of desired search region.
Returns:
Vertex pointers requiring full closest point search.

v_set State::getVertsForPartialClosestPtSearch ( vector3 const &  lower,
vector3 const &  upper 
)

Collect vertices whose closest point may now lie on an adjacent face of current vertex.

Parameters:
[in] lower Lower corner of desired search region.
[in] upper Upper corner of desired search region.
Returns:
Vertex pointers requiring partial closest point search.

void State::recordVertAdjFaceEdgeAngles ( Vertex const * const  v  ) 

Record all edge angles from adjacent faces to input vertex.

Parameters:
[in] v Vertex of interest.

Search_Stats State::updateClosestFaceToVertices ( Vertex * const  v,
v_set fs,
v_set ps 
)

Search for new closest point to input vertices.

Parameters:
[in] v The current vertex.
[in] fs Hashed set of vertex pointers requiring full closest point search.
[in] ps Vector of vertex pointers requiring partial closest point search.
Returns:
Collection of vertex counts quantifying how often the closest face to vertex changed.

void State::updateAdjacentFacesInTree ( Vertex const * const  v  ) 

Update the location of adjacent faces to moved vertex in octree.

Parameters:
[in] v Last moved vertex.

void State::updateVertexVD ( Vertex * const  v  ) 

The virtual displacement of all vertices on adjacent faces of moved vertex will have changed, so update the appropriate maps.

Parameters:
[in] v The current vertex.

bool State::extremeAngleFound ( void   )  const

Require vertex move to not worsen the condition of extreme angles.

Returns:
True if vertex move is an extreme angle violation; false if move passed the extreme angle test.

bool State::assignNewVertexCoords ( Vertex * const  v,
vector3 const * const  new_pos,
vector3 const &  old_pos,
bool &  face_intersection,
bool &  extreme_angle,
bool &  outside_octree 
)

Attempt move by input vertex.

Parameters:
[in] v Vertex to move.
[in] new_pos New location of vertex after move.
[out] face_intersection True if interecting faces were detected and move was aborted.
[out] extreme_angle True if extreme angles (near 0 or 2*pi) were detected and move was aborted.
[out] outside_octree True if vertex move breached octree boundary and move was aborted.
Returns:
True if move successful; false otherwise and vertex does not move.

bool State::angleChangeIsWrong ( float const &  old_angle,
float const &  new_angle 
) const

Determine if extreme angle improved.

Parameters:
[in] old_angle Extreme angle before the last vertex move.
[in] new_angle Extreme angle after the last vertex move.
Returns:
False if the change improved the angle; true otherwise.

bool State::vertexOutsideOctreeBounds ( vector3 const *  const  ) 

void State::updateVertexNormals ( v_set fs  ) 

Update vertex normals of vertices around moved vertex.

Parameters:
[in] fs Hashed set of vertex pointers requiring full closest point search.

void State::updateAdjacentFacesInOctree ( Vertex *const  v,
hxa7241_graphics::Vector3r *const  adjacent_face_lower,
hxa7241_graphics::Vector3r *const  adjacent_face_upper 
)

Update the octree with the new position of input adjacent faces to moved vertex.

Parameters:
[in] v Moved vertex.
[in] adjacent_face_lower Pointer to lower corner of pre-move bounding box of first adjacent face to moved vertex.
[in] adjacent_face_upper Pointer to upper corner of pre-move bounding box of first adjacent face to moved vertex.

void State::updateOctree ( Vertex *const  v,
hxa7241_graphics::Vector3r *const  old_adjacent_face_lower,
hxa7241_graphics::Vector3r *const  old_adjacent_face_upper,
hxa7241_graphics::Vector3r *const  new_adjacent_face_lower,
hxa7241_graphics::Vector3r *const  new_adjacent_face_upper 
)

Update the location of moved vertex adjacent faces in the octree.

Parameters:
[in] v Moved vertex.
[in] old_adjacent_face_lower Pointer to lower corner of old bounding box of first adjacent face to moved vertex.
[in] old_adjacent_face_upper Pointer to upper corner of old bounding box of first adjacent face to moved vertex.
[in] new_adjacent_face_lower Pointer to lower corner of new bounding box of first adjacent face to moved vertex.
[in] new_adjacent_face_upper Pointer to upper corner of new bounding box of first adjacent face to moved vertex.

float State::getVD2 ( void   )  [inline]

Return stored virtual displacement squared.

Returns:
Squared virtual displacement.

void State::setVD2 ( float const &  sqd_disp  )  [inline]

Set stored virtual displacement squared.

Parameters:
[in] sqd_disp Squared virtual displacement.


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