1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef GFXSMF_STATE_INCLUDED  // -*- C++ -*-
#define GFXSMF_STATE_INCLUDED

#include "AffineXform.hpp"
#include <string>
#include <vector>

namespace moab
{

struct SMF_ivars
{
    int next_vertex;
    int next_face;
};

class SMF_State
{
  private:
    //
    // Standard state variables
    int first_vertex;
    int vertex_correction;
    AffineXform xform;

  public:
    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 );
};

}  // namespace moab

// GFXSMF_STATE_INCLUDED
#endif