Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
moab::SMF_State Class Reference

#include <SMF_State.hpp>

+ Collaboration diagram for moab::SMF_State:

Public Member Functions

 SMF_State (const SMF_ivars &ivar, SMF_State *next=0)
void set_vertex_correction (int i)
void inc (const char *var, int delta=1)
void dec (const char *var, int delta=1)
void mmult (const AffineXform &)
void mload (const AffineXform &)
void vertex (double v[3])
void normal (double n[3])
void face (int *, const SMF_ivars &ivar)

Private Attributes

int first_vertex
int vertex_correction
AffineXform xform

Detailed Description

Definition at line 17 of file SMF_State.hpp.


Constructor & Destructor Documentation

moab::SMF_State::SMF_State ( const SMF_ivars ivar,
SMF_State next = 0 
)

Definition at line 10 of file SMF_State.cpp.

References first_vertex, moab::SMF_ivars::next_vertex, vertex_correction, and xform.

{
    first_vertex = ivar.next_vertex;
    if( next )
    {
        vertex_correction = next->vertex_correction;
        xform             = next->xform;
    }
    else
    {
        vertex_correction = 0;
        AffineXform identity;
        xform = identity;
    }
}

Member Function Documentation

void moab::SMF_State::dec ( const char *  var,
int  delta = 1 
)
void moab::SMF_State::face ( int *  verts,
const SMF_ivars ivar 
)

Definition at line 36 of file SMF_State.cpp.

References first_vertex, moab::SMF_ivars::next_vertex, and vertex_correction.

{
    for( int i = 0; i < 3; i++ )
    {
        if( verts[i] < 0 )
            verts[i] += ivar.next_vertex;
        else
            verts[i] += vertex_correction + ( first_vertex - 1 );
    }
}
void moab::SMF_State::inc ( const char *  var,
int  delta = 1 
)
void moab::SMF_State::mload ( const AffineXform M)

Definition at line 62 of file SMF_State.cpp.

References xform.

{
    xform = M;
}
void moab::SMF_State::mmult ( const AffineXform M)

Definition at line 52 of file SMF_State.cpp.

References moab::AffineXform::accumulate(), and xform.

{
    // initially, we tried this:
    // xform.accumulate(M);
    // maybe we should do M.accumulate(xform)
    AffineXform tmp = M;
    tmp.accumulate( xform );
    xform = tmp;
}
void moab::SMF_State::normal ( double  n[3])

Definition at line 31 of file SMF_State.cpp.

References xform, and moab::AffineXform::xform_vector().

{
    xform.xform_vector( nrm );
}

Definition at line 47 of file SMF_State.cpp.

References vertex_correction.

void moab::SMF_State::vertex ( double  v[3])

Definition at line 26 of file SMF_State.cpp.

References xform, and moab::AffineXform::xform_point().

{
    xform.xform_point( v );
}

Member Data Documentation

Definition at line 22 of file SMF_State.hpp.

Referenced by face(), and SMF_State().

Definition at line 23 of file SMF_State.hpp.

Referenced by face(), set_vertex_correction(), and SMF_State().

Definition at line 24 of file SMF_State.hpp.

Referenced by mload(), mmult(), normal(), SMF_State(), and vertex().

List of all members.


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