|
cgma
|
#include <CoFace.hpp>
Public Member Functions | |
| CoFace () | |
| virtual | ~CoFace () |
| CoFace (RefFace *facePtr, CubitSense sense) | |
| DagType | dag_type () const |
| RefFace * | get_ref_face_ptr () |
| RefVolume * | get_ref_volume () |
| Shell * | get_shell_ptr () |
| virtual void | switch_child_notify (TopologyEntity const *newChild, TopologyEntity const *oldChild) |
Private Member Functions | |
| CoFace (const CoFace &) | |
| void | operator= (const CoFace &) |
Definition at line 33 of file CoFace.hpp.
| CoFace::CoFace | ( | ) |
Definition at line 57 of file CoFace.cpp.
{
}
| CoFace::~CoFace | ( | ) | [virtual] |
Definition at line 70 of file CoFace.cpp.
{
}
| CoFace::CoFace | ( | RefFace * | facePtr, |
| CubitSense | sense | ||
| ) |
Definition at line 84 of file CoFace.cpp.
{
attach_basic_topology_entity(facePtr) ;
set_sense(sense) ;
}
| CoFace::CoFace | ( | const CoFace & | ) | [private] |
| DagType CoFace::dag_type | ( | ) | const [inline, virtual] |
Implements TopologyEntity.
Definition at line 51 of file CoFace.hpp.
{ return DagType::co_face_type(); }
Definition at line 100 of file CoFace.cpp.
{
// Call the generic function defined in the SenseEntity class to
// do the real work
BasicTopologyEntity* BTEPtr = get_basic_topology_entity_ptr();
// Cast the returned pointer to RefFace and return it
return CAST_TO( BTEPtr, RefFace );
}
Definition at line 137 of file CoFace.cpp.
{
BasicTopologyEntity* bte_ptr = get_parent_basic_topology_entity_ptr();
// Cast the returned pointer to RefFace and return it
return dynamic_cast<RefVolume*>(bte_ptr);
}
| Shell * CoFace::get_shell_ptr | ( | ) |
Definition at line 119 of file CoFace.cpp.
{
GroupingEntity* gpe_ptr = get_grouping_entity_ptr();
// Cast the returned pointer to RefFace and return it
return CAST_TO( gpe_ptr, Shell );
}
| void CoFace::operator= | ( | const CoFace & | ) | [private] |
| void CoFace::switch_child_notify | ( | TopologyEntity const * | newChild, |
| TopologyEntity const * | oldChild | ||
| ) | [virtual] |
Definition at line 163 of file CoFace.cpp.
{
// Make sure the entities being switched are RefFaces. If not,
// get out of this function.
TopologyEntity* tmp_new_child = const_cast<TopologyEntity*>(newChild);
TopologyEntity* tmp_old_child = const_cast<TopologyEntity*>(oldChild);
RefFace* new_child_ref_face = CAST_TO(tmp_new_child, RefFace) ;
RefFace* old_child_ref_face = CAST_TO(tmp_old_child, RefFace) ;
if ( ( new_child_ref_face == NULL ) || ( old_child_ref_face == NULL ) )
{
return ;
}
CubitSense sense =
old_child_ref_face->compare_alignment( new_child_ref_face );
// If the sense of the old RefFace relative to the new RefFace is
// same, nothing needs to be done. However, if the relative sense
// is reversed, switch the sense of the CoFace.
if ( sense == CUBIT_REVERSED )
{
if ( get_sense() == CUBIT_FORWARD )
{
set_sense(CUBIT_REVERSED) ;
}
else
{
set_sense(CUBIT_FORWARD) ;
}
}
}