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 
16  : public DtAsciiSerializable
17 #ifdef DtObjectDebugger_Enable
18  , public DtObjectDebugger<DtScriptAnimationModel>
19 #endif
20 {
21 public:
24 
25  DtScriptAnimationModel& operator=(const DtScriptAnimationModel& orig);
26 
27  virtual ~DtScriptAnimationModel() override;
28 
29  bool operator==(const DtScriptAnimationModel& orig);
30 
33 
36  virtual void setAnimationModelFile( const std::string& );
37  virtual const std::string& animationModelFile() const;
38 
40  virtual void setTimeScale( double );
41  virtual double timeScale() const;
42 
45  virtual void setFrameTime( double );
46  virtual double frameTime() const;
47 
49  virtual int numAnimationFrames() const;
50 
52  virtual void setClampType( int );
53  virtual int clampType() const;
54 
56  virtual void setCompletionRule( int );
57  virtual int completionRule() const;
58 
61  virtual void setSpeedNegated( bool negateSpeeds );
62  virtual bool isSpeedNegated() const;
63 
65  virtual void init(void* userData) override;
66 
68  virtual void setEntity( DtLocalObject* );
69 
71  virtual void setTimeDeltaFromPreviousRow( int forRow, double timeDelta );
72 
75  virtual void setTransitionSpeed( double );
76 
78  virtual double transitionSpeed() const;
79 
81  virtual void setAnimationFrame( int );
82 
84  virtual int animationFrame() const;
85 
86  std::shared_ptr<DtScriptOwnshipObject> ownshipObject() const
87  {
88  return mySharedObject;
89  }
90 
92  virtual double elapsedAnimationTime() const;
93 
95  virtual bool isFinished() const;
96 
101  virtual int addAnimationRow(double deltaTime, double lateral, double range, double altitude,
102  double headingOffset = 0, double pitchOffset = 0, double rollOffset = 0);
103 
105  virtual double speed(int) const;
106 
108  virtual DtLocation3D location(int) const;
109 
111  virtual void orientation(int frame, double& heading, double& pitch, double& roll) const;
112 
114  virtual DtVector3D rotationalVelocity(int) const;
115 
117  virtual DtVector3D acceleration(int) const;
118 
120  virtual DtVector3D velocity(int) const;
121 
124 
126  virtual const DtAnimationModel& animationModel() const;
127 
129  virtual DtString serialize() override;
130 
133  virtual bool deserialize(const DtString& data) override;
134 
135  virtual DtString objectType() const override;
136 
138  static DtAsciiSerializable* creator();
139 
141  virtual void reset();
142 
143 protected:
145  std::shared_ptr<DtScriptOwnshipObject> mySharedObject;
147  std::string myAnimationModelFile;
148 };
149 
151 
152 DT_DLL_vrfobjcore std::ostream& operator<<(std::ostream&, const DtScriptAnimationModel&);
const DtSimulationServices * mySimulationServices
Definition: scriptAnimationModel.h:144
Definition: scriptAnimationModel.h:15
DtAnimationModel myAnimationModel
Definition: scriptAnimationModel.h:146
std::shared_ptr< DtScriptOwnshipObject > mySharedObject
Definition: scriptAnimationModel.h:145
Definition: asciiSerializable.h:40
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:78
#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:161
std::shared_ptr< DtScriptOwnshipObject > ownshipObject() const
Script API functions. ////////////////////////////////////!
Definition: scriptAnimationModel.h:86
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The &quot;this&quot; version is the own-ship object. It is separated to allow special functions for the ownshi...
Definition: scriptVrfObject.h:418
std::string myAnimationModelFile
Definition: scriptAnimationModel.h:147
A locally simulated VRF object.
Definition: localObject.h:98
A location3D is a point in space, i.e. a geocentric coordinate.
Definition: scriptGeometry.h:22

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)