MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
PatchTranslate (Vector3D s) | |
virtual | ~PatchTranslate () |
virtual void | xform (PatchData &pd, PlanarDomain *dom) |
virtual void | xform_grad (std::vector< Vector3D > &) |
Private Attributes | |
Vector3D | offset |
Definition at line 1442 of file QualityMetricTester.cpp.
PatchTranslate::PatchTranslate | ( | Vector3D | s | ) | [inline] |
Definition at line 1447 of file QualityMetricTester.cpp.
: offset( s ) {}
PatchTranslate::~PatchTranslate | ( | ) | [virtual] |
Definition at line 1453 of file QualityMetricTester.cpp.
{}
void PatchTranslate::xform | ( | PatchData & | pd, |
PlanarDomain * | dom | ||
) | [virtual] |
Implements QualityMetricTester::PatchXform.
Definition at line 1454 of file QualityMetricTester.cpp.
References CPPUNIT_ASSERT, geom, MBMesquite::PatchData::get_domain(), MBMesquite::PlanarDomain::get_normal(), MBMesquite::PlanarDomain::get_origin(), MBMesquite::PatchData::move_vertex(), MBMesquite::PatchData::num_nodes(), offset, MBMesquite::PatchData::set_domain(), and MBMesquite::PlanarDomain::set_plane().
{ // If patch has associated planar geometry, translate that too MeshDomain* geom = pd.get_domain(); if( geom ) { PlanarDomain* plane = dynamic_cast< PlanarDomain* >( geom ); CPPUNIT_ASSERT( plane ); CPPUNIT_ASSERT( dom ); Vector3D norm = plane->get_normal(); Vector3D point = plane->get_origin() + offset; dom->set_plane( norm, point ); pd.set_domain( dom ); } // Translate mesh vertices MsqError err; for( size_t i = 0; i < pd.num_nodes(); ++i ) pd.move_vertex( offset, i, err ); }
void PatchTranslate::xform_grad | ( | std::vector< Vector3D > & | ) | [virtual] |
Implements QualityMetricTester::PatchXform.
Definition at line 1475 of file QualityMetricTester.cpp.
{}
Vector3D PatchTranslate::offset [private] |
Definition at line 1444 of file QualityMetricTester.cpp.
Referenced by xform().