VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scriptAnimationModel.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
10 
12 #include <vrfutil/objectCounter.h>
13 
14 #include <boost/shared_ptr.hpp>
15 
17  : public DtAsciiSerializable
18 #ifdef DtObjectDebugger_Enable
19  , public DtObjectDebugger<DtScriptAnimationModel>
20 #endif
21 {
22 public:
25 
26  DtScriptAnimationModel& operator=(const DtScriptAnimationModel &orig);
27 
29 
30  bool operator==(const DtScriptAnimationModel& orig);
31 
34 
37  virtual void setAnimationModelFile( const std::string& );
38  virtual const std::string& animationModelFile() const;
39 
41  virtual void setTimeScale( double );
42  virtual double timeScale() const;
43 
46  virtual void setFrameTime( double );
47  virtual double frameTime() const;
48 
50  virtual int numAnimationFrames() const;
51 
53  virtual void setClampType( int );
54  virtual int clampType() const;
55 
57  virtual void setCompletionRule( int );
58  virtual int completionRule() const;
59 
62  virtual void setSpeedNegated( bool negateSpeeds );
63  virtual bool isSpeedNegated() const;
64 
66  virtual void init( void* userData );
67 
69  virtual void setEntity( DtLocalObject* );
70 
72  virtual void setTimeDeltaFromPreviousRow( int forRow, double timeDelta );
73 
76  virtual void setTransitionSpeed( double );
77 
79  virtual double transitionSpeed() const;
80 
82  virtual void setAnimationFrame( int );
83 
85  virtual int animationFrame() const;
86 
87  boost::shared_ptr<DtScriptOwnshipObject> ownshipObject() const
88  {
89  return mySharedObject;
90  }
91 
93  virtual double elapsedAnimationTime() const;
94 
96  virtual bool isFinished() const;
97 
102  virtual int addAnimationRow(double deltaTime, double lateral, double range, double altitude,
103  double headingOffset = 0, double pitchOffset = 0, double rollOffset = 0);
104 
106  virtual double speed(int) const;
107 
109  virtual DtLocation3D location(int) const;
110 
112  virtual void orientation(int frame, double& heading, double& pitch, double& roll) const;
113 
115  virtual DtVector3D rotationalVelocity(int) const;
116 
118  virtual DtVector3D acceleration(int) const;
119 
121  virtual DtVector3D velocity(int) const;
122 
125 
127  virtual const DtAnimationModel& animationModel() const;
128 
130  virtual DtString serialize();
131 
134  bool deserialize(const DtString& data);
135 
136  virtual DtString objectType() const;
137 
139  static DtAsciiSerializable* creator();
140 
142  virtual void reset();
143 
144 protected:
146  boost::shared_ptr<DtScriptOwnshipObject> mySharedObject;
148  std::string myAnimationModelFile;
149 };
150 
152 
153 DT_DLL_vrfobjcore std::ostream& operator<<(std::ostream&, const DtScriptAnimationModel&);
const DtSimulationServices * mySimulationServices
Definition: scriptAnimationModel.h:145
Definition: scriptAnimationModel.h:16
DtAnimationModel myAnimationModel
Definition: scriptAnimationModel.h:147
boost::shared_ptr< DtScriptOwnshipObject > mySharedObject
Definition: scriptAnimationModel.h:146
Definition: asciiSerializable.h:38
virtual bool deserialize(const DtString &)=0
This function should take the string that was serialized via serialize() and fill this object with th...
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
virtual void init(void *userData)
This function is called right after the object is constructed during the deserialization process...
Definition: asciiSerializable.h:76
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
Default on in debug, off in release.
Definition: objectCounter.h:27
DT_DLL_features std::ostream & operator<<(std::ostream &, const DtFeatureTransform &)
std::ostream output.
virtual DtString serialize()=0
The following characters are reserved and cannot be used in serialization: &#39;|&#39;, &#39;:&#39;.
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
The DtAnimationModel class will contain the interface allow for animated movement via an external fil...
Definition: animationModel.h:31
virtual DtString objectType() const =0
Should return the string name of this object. The object name should not be part of the serialization...
DtVector3D is a vector in earth-relative coordinates, e.g. east-north or heading-range. Its direction in space depends on where on the earth it is attached (like topocentric coordinates).
Definition: scriptGeometry.h:157
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The &quot;this&quot; version is the own-ship object. It is separated to allow special functions for the ownshi...
Definition: scriptVrfObject.h:405
boost::shared_ptr< DtScriptOwnshipObject > ownshipObject() const
Script API functions. ////////////////////////////////////!
Definition: scriptAnimationModel.h:87
std::string myAnimationModelFile
Definition: scriptAnimationModel.h:148
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
A location3D is a point in space, i.e. a geocentric coordinate.
Definition: scriptGeometry.h:22

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)