VR-Vantage 3.0.3 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ciTrack.h
Go to the documentation of this file.
1 
2 // Copyright JRM Enterprises, Inc. 2004
3 // All rights reserved.
4 //
5 // This code is the intellectual property of JRM Enterprises, Inc.
6 // It may not be used or released as source or compiled binary form
7 // without the prior written consent of JRM Enterprises, Inc.
8 //
9 // Original Author: Ken George
10 // Date: Nov 2004
11 //
12 //
13 //
15 
16 #if !defined(_ciTRACK_H_)
17 #define _ciTRACK_H_
18 
19 #if _MSC_VER > 1000
20 #pragma once
21 #endif // _MSC_VER > 1000
22 
23 #include <stdio.h>
24 #include <string.h>
25 #include <iostream>
26 #include <fstream>
27 #include "clXML.h"
28 #include "clXMLNode.h"
29 
34 #include "ciApi.h"
35 #include <string.h>
36 
38 {
39 public: // enumerations
40 
41  enum PlayMode
42  {
43  pause = 0,
44  forwardPlay = 1,
45  reversePlay = 2,
46  forwardPause = 3,
47  reversePause = 4,
48  beginPause = 5,
49  endPause = 6,
50  };
51 
52 public: // methods
53 
55  // getStartTime
62  double getStartTime() { return m_startTime; }
63 
65  // setStartTime
73  void setStartTime( double time ) { m_startTime = time; }
74 
76  // getEndTime
83  double getEndTime() { return m_endTime; }
84 
86  // setEndTime
94  void setEndTime( double time ) {
95  m_endTime = time;
96  }
97 
99  // getIncrement
106  double getIncrement() { return m_increment; }
107 
109  // setIncrement
117  void setIncrement(double time) { m_increment = time; }
118 
120  // getFrameRate
127  double getFrameRate() { return m_frameRate; }
128 
130  // setFrameRate
138  void setFrameRate(double rate) { m_frameRate = rate; }
139 
141  // getSpeed
148  double getSpeed() { return m_speed; }
149 
151  // setSpeed
159  void setSpeed(double speed) { m_speed = speed; }
160 
162  // getPlayDirection
169  PlayMode getPlayMode() { return m_playMode; }
170 
172  // setPlayDirection
180  void setPlayMode( PlayMode flag ) { m_playMode = flag; }
181 
183  // getLoopContinuous
190  bool getLoopContinuous() { return m_loopContinuous; }
191 
193  // setLoopContinuous
201  void setLoopContinuous( bool flag ) { m_loopContinuous = flag; }
202 
204  // getSaveFloat
211  bool getSaveFloat() { return m_saveFloat; }
212 
214  // setSaveFloat
222  void setSaveFloat( bool flag ) { m_saveFloat = flag; }
223 
225  // getSimTime
232  double getSimTime() { return m_currentSimTime; }
233 
235  // setSimTime
243  void setSimTime( double time ) { m_currentSimTime = time; }
244 
246  // getSaveFrameCount
253  int getSaveFrameCount() { return m_saveFileCount; }
254 
256  // setSaveFrameCount
264  void setSaveFrameCount( int framecount ) { m_saveFileCount = framecount; }
265 
267  // getSaveBmp
274  bool getSaveBmp() { return m_saveBmp; }
275 
277  // setSaveBmp
285  void setSaveBmp( bool flag ) { m_saveBmp = flag; }
286 
288  // getSaveFilePrefix
295  char *getSaveFilePrefix();
296 
298  // setSaveFilePrefix
306  void setSaveFilePrefix(char *name);
308  //setLinkTOD
313  void setLinkTOD(bool linkTOD){m_linkTOD = linkTOD;}
315  //getLinkTOD
320  bool getLinkTOD(){return m_linkTOD;}
322  // archive
330  bool archive(std::ofstream &outf);
331 
333  // serialize
341  bool serialize(char *filepath);
342 
343  //
344  // loadXML
345  //
346  // \par Description:
347  // Load attributes from an XML node
348  //
349  // \param clXMLNode* trackNode
350  // \return bool
351  //
352  bool loadXML(clXMLNode* trackNode);
353 
354  //
355  // parseXML
356  //
357  // \par Description:
358  // Parses an XML document for specific tags
359  //
360  // \param clXML xmlDocument
361  // \return bool
362  //
363  bool parseXML(clXML& xmlDocument);
364 
366  //loadXMLNode
373  bool loadXMLNode(std::string tag, char *nodeString);
375  //loadXMLNode
382  bool loadXMLNode(std::string tag, bool *nodeBool);
384  //loadXMLNode
391  bool loadXMLNode(std::string tag, int *nodeBool);
393  //loadXMLNode
400  bool loadXMLNode(std::string tag, double *nodeBool);
401 
402  //
403  // saveXML
404  //
405  // \par Description:
406  // Saves XML nodes to an XML document
407  //
408  // \param clXML* xmlDocument
409  //
410  void saveXML(clXML* xmlDocument);
411 
413  // operator =
421  ciTrack operator = (ciTrack &obj);
422 
423 protected: // methods
424 
425 public: // construction/destruction
426 
428  // ciTrack
433  ciTrack();
434 
436  // ciTrack
443  ciTrack(ciTrack &obj);
444 
445  virtual ~ciTrack();
446 
447 protected: // variables
448 
449  double m_startTime;
450  double m_endTime;
451  double m_speed;
452  double m_frameRate;
453  double m_increment;
456  bool m_saveFloat;
457  bool m_saveBmp;
458  char m_saveFilePrefix[255];
461  bool m_linkTOD;
463 private: // variables
464 
465 };
466 
467 #endif // _ciTRACK_H_


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