VR-Forces 4.2 Class Documentation
scriptedMovementController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 #include "vl/fireInter.h"
13 
16 
20 {
21 private:
22  //Not Implemented.
24  //Not Implemented.
26  //Not Implemented.
28 
29 public:
30 
31  //\copydoc DtSimComponent(const DtString&,DtVrfObject*,DtSimManager*,
32  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
34  DtVrfObject* owner,
35  DtSimManager* simManager,
36  DtComponentDescriptor* desc = NULL,
37  DtReaderWriterRegistry* parentRegistry = NULL);
38 
40 
41  //Initial setup of component after creation. Register attribute provider functions.
42  virtual bool init();
43 
44  //Creates the process state repository for this component.
45  virtual bool createPSR();
46 
47  //\copydoc DtSimComponent::type()
48  //\return DtScriptedMovementControllerType.
49  virtual DtString type() const;
50 
51  //Main processing for component.
52  virtual void tick();
53 
55  virtual void setDesiredLocation(const DtVector&);
56 
58  virtual void setDesiredSpeed(const DtVector& velocity, const DtVector& acceleration);
59 
60  virtual void setDesiredRotationalVelocity(const DtVector&);
61 
63  virtual void setDesiredOrientation(const DtTaitBryan&);
64 
65  virtual void clearTask();
66 
68  virtual DtScriptedMovementControllerPSR* getPSR(){return myProcessState;}
69 
74  static DtReaderWriter* provideAnimationFrame(void* controller);
76 
77 protected:
78 
79  virtual void registerTaskMsgCallbacks();
80  static void scriptedMovementTaskCallback(DtSimMessage* msg, void* usr);
81  virtual void processScriptedMovementTask(DtSimMessage* msg);
82 
83  virtual void preFirstTickInit();
84 
85  virtual bool setup();
86 
88  virtual DtFireInteraction* createFireInteraction() const;
89 
90  virtual void finishUp();
91  virtual void sendDetonation();
92 
95 
96  static void objectAboutToBeRemovedCallback(DtVrfObject* object, void* usr);
97  virtual void processObjectAboutToBeRemoved(DtVrfObject* object);
99 
119 
120  static void animatedMovementTaskCallback(DtSimMessage* msg, void* usr);
121  virtual void processAnimatedMovementTask(DtSimMessage* msg);
123 
125  virtual int detonationResultFromDistance(double d, const DtVector& detonationPosition) const;
126 
127  virtual bool createPortGroups();
128 
129  virtual bool tickWhileDestroyed() const;
130 
131  virtual double calculateNextTickTime() const;
132 
134  virtual void setupInitialState();
135 
136 public:
137 
138  //\copydoc DtSimComponent(const DtString&,DtVrfObject*,DtSimManager*,
139  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
140  //\return New instance of this class.
141  static DtSimComponent * creator(const DtString& name,
142  DtVrfObject* owner,
143  DtSimManager* simManager,
144  DtComponentDescriptor* desc = 0,
145  DtReaderWriterRegistry* parentRegistry = 0);
146 
147 protected:
151 
156 
158 };

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)