Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <SMF_State.hpp>
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 |
Definition at line 17 of file SMF_State.hpp.
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; } }
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 | ) |
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 ); }
void moab::SMF_State::set_vertex_correction | ( | int | i | ) |
Definition at line 47 of file SMF_State.cpp.
References vertex_correction.
{ vertex_correction = i; }
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 ); }
int moab::SMF_State::first_vertex [private] |
Definition at line 22 of file SMF_State.hpp.
Referenced by face(), and SMF_State().
int moab::SMF_State::vertex_correction [private] |
Definition at line 23 of file SMF_State.hpp.
Referenced by face(), set_vertex_correction(), and SMF_State().
AffineXform moab::SMF_State::xform [private] |
Definition at line 24 of file SMF_State.hpp.
Referenced by mload(), mmult(), normal(), SMF_State(), and vertex().