moab
|
#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 16 of file SMF_State.hpp.
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; } }
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); }
void moab::SMF_State::set_vertex_correction | ( | int | i | ) |
Definition at line 49 of file SMF_State.cpp.
{ vertex_correction = i; }
void moab::SMF_State::vertex | ( | double | v[3] | ) |
Definition at line 28 of file SMF_State.cpp.
{ xform.xform_point(v); }
int moab::SMF_State::first_vertex [private] |
Definition at line 21 of file SMF_State.hpp.
int moab::SMF_State::vertex_correction [private] |
Definition at line 22 of file SMF_State.hpp.
AffineXform moab::SMF_State::xform [private] |
Definition at line 23 of file SMF_State.hpp.