LightWrap++
AC++wrapperfortheLightWave3DSDK
modeler.h
Go to the documentation of this file.
1 #ifndef LWPP_MODELER_H
2 #define LWPP_MODELER_H
3 
4 #include <lwmodeler.h>
5 #include <lwdyna.h>
6 #include <lwpp/global.h>
7 #include <lwpp/monitor.h>
8 
9 namespace lwpp
10 {
11 
12  class ModelerState : protected GlobalBase<LWStateQueryFuncs>
13  {
14  public:
15 
18  {
19  return globPtr->numLayers();
20  }
21 
23 
30  unsigned int GetLayerMask(EltOpLayer lyr)
31  {
32  return globPtr->layerMask(lyr);
33  }
34 
36  const char *GetSurface()
37  {
38  return globPtr->surface();
39  }
40 
42 
46  unsigned int GetBoundingBox(EltOpLayer lyr, double *box=0)
47  {
48  return globPtr->bbox(lyr, box);
49  }
50 
52 
57  const char *GetLayerList(EltOpLayer lyr, const char *name)
58  {
59  return globPtr->layerList(lyr, name);
60  }
61 
63 
68  const char *GetObjectName()
69  {
70  return globPtr->object();
71  }
72 
74 
79  int GetMode(int m)
80  {
81  return globPtr->mode(m);
82  }
83 
85 
91  const char *GetSelectedVMap(int i, LWID *id)
92  {
93  return globPtr->vmap(i, id);
94  }
95 
96  };
97 
98  class DynaMonitor : protected GlobalBase<DynaMonitorFuncs>
99  {
100  public:
101  LWMonitor *mon;
102  DynaMonitor(const char *a, const char *b)
103  : mon(0)
104  {
105  if (globPtr)
106  {
107  mon = globPtr->create(a, b);
108  }
109  }
110  virtual ~DynaMonitor()
111  {
112  if (mon) globPtr->destroy(mon);
113  }
114 
116  {
117  return SimpleMonitor(mon);
118  }
119  };
120 
121 
122 } // end namespace lwpp
123 
124 #endif // LWPP_MODELER_H