VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
orbitTask.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2005 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vlpi/netStructs.h>
12 #include "vrftasks/simTask.h"
13 #include "readerWriter/rwVector.h"
14 #include <readerWriter/rwReal.h>
15 #include <readerWriter/rwBoolean.h>
16 #include "vrfutil/rwUUID.h"
18 
19 
33 {
34 public:
35 
38  DtOrbitTask();
39  DtOrbitTask(const DtString& writeName, DtReaderWriterRegistry* parentRegistry = NULL);
40  DtOrbitTask(const DtVector& newCenter,const DtUUID& entity, double newRadius, bool isClockwise,
41  double relativeAltitude = 0.0);
43 
45  DtOrbitTask(const DtString& writeName, const DtOrbitTask& orig,
46  DtReaderWriterRegistry* parentRegistry = NULL);
47 
49  DtOrbitTask& operator=(const DtOrbitTask& original);
50 
51  virtual ~DtOrbitTask() override;
52 
54  virtual const DtSimTaskMessageType& type() const override;
55 
57  virtual DtSimTask* clone(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL) const override;
58 
60  virtual DtString stringRep() const override;
61 
63  virtual void setCenter(const DtVector& center);
64  virtual DtVector center() const;
65 
68  virtual const DtUUID & entityToOrbit() const;
69  virtual void setEntityToOrbit(const DtUUID & entity);
70 
72  virtual void setRadius(double radius);
73  virtual double radius() const;
74 
76  virtual void setClockwise(bool clockwise);
77  virtual bool clockwise() const;
78 
80  virtual void setRelativeAltitude(double relativeAltitude);
81  virtual double relativeAltitude() const;
82 
84  virtual int netRepSize() const override;
85 
87  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
88 
91  virtual bool setToNet() override;
92 
93  static DtSimTask* creator();
94 
95 private:
101 
102 };
103 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
DtRwReal myRelativeAltitude
Definition: orbitTask.h:100
virtual DtSimTask * clone(const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const =0
Make a copy of this task. Returns a newly allocated instance of a DtSimTask. Override this member fun...
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:25
DtRwVector myCenter
Definition: orbitTask.h:96
Definition: rwVector.h:23
DtRwUUID myEntityToOrbit
Definition: orbitTask.h:97
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubtask member from the incoming contentBuffer (cast to type DtNetSimTask). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimTask::netRepSize().
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimTask*...
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwReal myRadius
Definition: orbitTask.h:98
DtOrbitTask represents an orbit task for an entity to perform. It inherits read/writableness from Sim...
Definition: orbitTask.h:32
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
virtual DtString stringRep() const =0
Returns a human-readable string representation of the task. This string representation is used to dis...
const DtSimTask & operator=(const DtSimTask &orig)
assignment operator; same as copy constructor
DtRwBoolean myClockwise
Definition: orbitTask.h:99
virtual const DtSimTaskMessageType & type() const =0
What kind of task am I? Returns a string indicating the kind of task (for example, “move-to”, “follow-entity”). Derived classes must implement this member function to return a unique string representing the type of task. The set of standard task types supplied with VR-Forces is in taskTypes.h.
File: rwVector.h.
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)