Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
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

◆ SMF_State()

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

Definition at line 10 of file SMF_State.cpp.

11 {
12  first_vertex = ivar.next_vertex;
13  if( next )
14  {
15  vertex_correction = next->vertex_correction;
16  xform = next->xform;
17  }
18  else
19  {
21  AffineXform identity;
22  xform = identity;
23  }
24 }

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

Member Function Documentation

◆ dec()

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

◆ face()

void moab::SMF_State::face ( int *  verts,
const SMF_ivars ivar 
)

Definition at line 36 of file SMF_State.cpp.

37 {
38  for( int i = 0; i < 3; i++ )
39  {
40  if( verts[i] < 0 )
41  verts[i] += ivar.next_vertex;
42  else
43  verts[i] += vertex_correction + ( first_vertex - 1 );
44  }
45 }

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

◆ inc()

void moab::SMF_State::inc ( const char *  var,
int  delta = 1 
)

◆ mload()

void moab::SMF_State::mload ( const AffineXform M)

Definition at line 62 of file SMF_State.cpp.

63 {
64  xform = M;
65 }

References xform.

◆ mmult()

void moab::SMF_State::mmult ( const AffineXform M)

Definition at line 52 of file SMF_State.cpp.

53 {
54  // initially, we tried this:
55  // xform.accumulate(M);
56  // maybe we should do M.accumulate(xform)
57  AffineXform tmp = M;
58  tmp.accumulate( xform );
59  xform = tmp;
60 }

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

◆ normal()

void moab::SMF_State::normal ( double  n[3])

Definition at line 31 of file SMF_State.cpp.

32 {
33  xform.xform_vector( nrm );
34 }

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

◆ set_vertex_correction()

void moab::SMF_State::set_vertex_correction ( int  i)

Definition at line 47 of file SMF_State.cpp.

48 {
50 }

References vertex_correction.

◆ vertex()

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

Definition at line 26 of file SMF_State.cpp.

27 {
28  xform.xform_point( v );
29 }

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

Member Data Documentation

◆ first_vertex

int moab::SMF_State::first_vertex
private

Definition at line 22 of file SMF_State.hpp.

Referenced by face(), and SMF_State().

◆ vertex_correction

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().

◆ xform

AffineXform moab::SMF_State::xform
private

Definition at line 24 of file SMF_State.hpp.

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


The documentation for this class was generated from the following files: