MOAB: Mesh Oriented datABase  (version 5.4.1)
PatchTranslate Class Reference
+ Inheritance diagram for PatchTranslate:
+ Collaboration diagram for PatchTranslate:

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

Detailed Description

Definition at line 1442 of file QualityMetricTester.cpp.


Constructor & Destructor Documentation

Definition at line 1447 of file QualityMetricTester.cpp.

: offset( s ) {}

Definition at line 1453 of file QualityMetricTester.cpp.

{}

Member Function Documentation

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.

{}

Member Data Documentation

Definition at line 1444 of file QualityMetricTester.cpp.

Referenced by xform().

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines