VR-Vantage 3.1 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  // getSimTime
211  double getSimTime() { return m_currentSimTime; }
212 
214  // setSimTime
222  void setSimTime( double time ) { m_currentSimTime = time; }
223 
225  // getSaveFrameCount
232  int getSaveFrameCount() { return m_saveFileCount; }
233 
235  // setSaveFrameCount
243  void setSaveFrameCount( int framecount ) { m_saveFileCount = framecount; }
244 
246  //setLinkTOD
251  void setLinkTOD(bool linkTOD){m_linkTOD = linkTOD;}
253  //getLinkTOD
258  bool getLinkTOD(){return m_linkTOD;}
259 
261  //setSaveImagesDuringPlayback
266  void setSaveImagesDuringPlayback(bool flag) { m_saveImagesDuringPlayback = flag; }
267 
269  //getSaveImagesDuringPlayback
274  bool getSaveImagesDuringPlayback() { return m_saveImagesDuringPlayback; }
275 
277  //setUseFrames
282  void setUseFrames(bool flag) { m_useFrames = flag; }
283 
285  //setSaveImagesDuringPlayback
290  bool getUseFrames() { return m_useFrames; }
291 
293  //setUseFrames
298  void setSaveFileName(string saveFileName) { m_saveFileName = saveFileName; }
299 
301  //setSaveImagesDuringPlayback
306  string getSaveFileName() { return m_saveFileName; }
307 
309  //setRecordingVelocity
314  void setRecordingVelocity(double recordingVelocity) { m_recordingVelocity = recordingVelocity; }
315 
317  //getRecordingVelocity
322  double getRecordingVelocity() { return m_recordingVelocity; }
323 
325  // archive
333  bool archive(std::ofstream &outf);
334 
336  // serialize
344  bool serialize(char *filepath);
345 
346  //
347  // loadXML
348  //
349  // \par Description:
350  // Load attributes from an XML node
351  //
352  // \param clXMLNode* trackNode
353  // \return bool
354  //
355  bool loadXML(clXMLNode* trackNode);
356 
357  //
358  // parseXML
359  //
360  // \par Description:
361  // Parses an XML document for specific tags
362  //
363  // \param clXML xmlDocument
364  // \return bool
365  //
366  bool parseXML(clXML& xmlDocument);
367 
369  //loadXMLNode
376  bool loadXMLNode(std::string tag, char *nodeString);
378  //loadXMLNode
385  bool loadXMLNode(std::string tag, bool *nodeBool);
387  //loadXMLNode
394  bool loadXMLNode(std::string tag, int *nodeBool);
396  //loadXMLNode
403  bool loadXMLNode(std::string tag, double *nodeBool);
404 
405  //
406  // saveXML
407  //
408  // \par Description:
409  // Saves XML nodes to an XML document
410  //
411  // \param clXML* xmlDocument
412  //
413  void saveXML(clXML* xmlDocument);
414 
416  // operator =
424  ciTrack operator = (ciTrack &obj);
425 
426 protected: // methods
427 
428 public: // construction/destruction
429 
431  // ciTrack
436  ciTrack();
437 
439  // ciTrack
446  ciTrack(ciTrack &obj);
447 
448  virtual ~ciTrack();
449 
450 protected: // variables
451 
452  double m_startTime;
453  double m_endTime;
454  double m_speed;
455  double m_frameRate;
456  double m_increment;
461  bool m_linkTOD;
467 private: // variables
468 
469 };
470 
471 #endif // _ciTRACK_H_


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