moab
moab::SMF_State Class Reference

#include <SMF_State.hpp>

List of all members.

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 16 of file SMF_State.hpp.


Constructor & Destructor Documentation

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

Definition at line 11 of file SMF_State.cpp.

{
    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 38 of file SMF_State.cpp.

{
    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.

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

Definition at line 52 of file SMF_State.cpp.

{
    // 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 33 of file SMF_State.cpp.

{
    xform.xform_vector(nrm);
}

Definition at line 49 of file SMF_State.cpp.

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

Definition at line 28 of file SMF_State.cpp.


Member Data Documentation

Definition at line 21 of file SMF_State.hpp.

Definition at line 22 of file SMF_State.hpp.

Definition at line 23 of file SMF_State.hpp.


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