VR-Vantage 3.0 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ciScenario.h
Go to the documentation of this file.
1 
2 // Original Author: Tim George
3 // Date: Oct 2005
4 //
5 //
6 //
8 
9 #if !defined(_CISCENARIO_H_)
10 #define _CISCENARIO_H_
11 #include "ciApi.h"
12 
13 #if _MSC_VER > 1000
14 #pragma once
15 #endif // _MSC_VER > 1000
16 
20 #include <iostream>
21 #include <fstream>
22 #include <string.h>
23 #include "clXML.h"
24 #include "clXMLNode.h"
25 
27 {
28 public: // methods
29 
31  // getMouseVelocity
38  double getMouseVel() { return m_mouseVel; }
39 
41  // setMouseVelocity
49  void setMouseVel(double rate) { m_mouseVel = rate; }
50 
52  // getLogScale
59  bool getLogScale() { return m_logScale; }
60 
61  void setLogScale( bool logScale ) { m_logScale = logScale; }
62 
63  double getTime(){return m_timeOfDay;}
64 
65  void setTime(double time){m_timeOfDay = time;}
66 
67  double getMouseFOV(){return m_mouseFOV;}
68 
69  void setMouseFOV(double mouseFOV){m_mouseFOV = mouseFOV;}
70 
71  bool getSceneWindow(){return m_sceneWindow;}
72 
73  void setSceneWindow(bool flag){m_sceneWindow = flag;}
74 
75  int getActiveSensor(){return m_activeSensor;}
76 
77  void setActiveSensor(int sensorID){
78  m_activeSensor = sensorID;
79  }
80 
81  void setActiveRGBSensor(int sensorId, int chan) {
82  if((chan >= 0) && (chan <= 3)){
83  m_activeRGBSensor[chan] = sensorId;
84  }
85 
86  };
87 
88  int getRGBSensor(int chan) {
89  if ((chan < 0) || (chan > 3))
90  {
91 
92  return m_activeRGBSensor[0];
93  }
94  else{
95 
96  return m_activeRGBSensor[chan];
97  }
98  };
99 
100  void setForceTextures(bool flag){m_forceTextures = flag;}
101  bool getForceTextures(){return m_forceTextures;}
102  void setReduceMcm(bool flag){m_reduceMcm = flag;}
103  bool getReduceMcm(){return m_reduceMcm;}
104  void setUseMouse(bool flag){m_useMouse = flag;}
105  bool getUseMouse(){return m_useMouse;}
106  void setUpdateTextures(bool flag){m_updateTextures = flag;}
107  bool getUpdateTextures(){return m_updateTextures;}
108  void setPbuffer32F(bool flag){m_pbuffer32F = flag;}
109  bool getPbuffer32F(){return m_pbuffer32F;}
110  void setUseRGBTexture(bool flag){m_useRGBTextures = flag;}
111  bool getUseRGBTexture(){return m_useRGBTextures;}
112 
113  void setUseShadows(bool flag){m_useShadows = flag;}
114  bool getUseShadows(){return m_useShadows;}
115  void setUseLightSources(bool flag){m_useLightSources = flag;}
116  bool getUseLightSources(){return m_useLightSources;}
117  void setUseLitWindows(bool flag){m_useLitWindows = flag;}
118  bool getUseLitWindows(){return m_useLitWindows;}
119  void setLitWindowStart(double time){m_litWindowStart = time;}
120  double getLitWindowStart(){return m_litWindowStart;}
121  void setLitWindowStop(double time){m_litWindowStop = time;}
122  double getLitWindowStop(){return m_litWindowStop;}
123 
125  // archive
133  bool archive(std::ofstream &outf);
134 
136  // serialize
144  bool serialize(char *filepath);
145 
146  //
147  // loadXML
148  //
149  // \par Description:
150  // Loads attributes from an XML node
151  //
152  // \param clXMLNode* scenarioNode
153  // \return bool
154  //
155  bool loadXML(clXMLNode* scenarioNode);
156 
157  //
158  // parseXML
159  //
160  // \par Description:
161  // Parses an XML document for specific tags
162  //
163  // \param clXML xmlDocument
164  // \return bool
165  //
166  bool parseXML(clXML& xmlDocument);
167 
169  //loadXMLNode
176  bool loadXMLNode(std::string tag, char *nodeString);
178  //loadXMLNode
185  bool loadXMLNode(std::string tag, bool *nodeBool);
187  //loadXMLNode
194  bool loadXMLNode(std::string tag, int *nodeBool);
196  //loadXMLNode
203  bool loadXMLNode(std::string tag, double *nodeBool);
204 
205  //
206  // saveXML
207  //
208  // \par Description:
209  // Saves XML nodes to an XML document
210  //
211  // \param clXML* xmlDocument
212  //
213  void saveXML(clXML* xmlDocument);
214 
216  // operator =
224  ciScenario operator = (ciScenario &obj);
225 
226 protected: // methods
227 
228 public: // construction/destruction
229 
231  // ciTrack
236  ciScenario();
237 
239  // ciScenario
247 
248  virtual ~ciScenario();
249 
250 protected: // variables
251 
252  double m_timeOfDay;
253  double m_mouseVel;
255  double m_mouseFOV;
258  int m_activeRGBSensor[4];
259  double m_lightLevel;
272 private: // variables
273 
274 };
275 
276 #endif // _ciSCENARIO_H_


Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)