VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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/fireInteraction.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 const char* 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 
125 
126  static void animatedMovementTaskCallback(DtSimMessage* msg, void* usr);
127  virtual void processAnimatedMovementTask(DtSimMessage* msg);
129 
131  virtual int detonationResultFromDistance(double d, const DtVector& detonationPosition) const;
132 
133  virtual bool createPortGroups();
134 
135  virtual bool tickWhileDestroyed() const;
136 
138  virtual void setupInitialState();
139 
140 public:
141 
142  //\copydoc DtSimComponent(const DtString&,DtVrfObject*,DtSimManager*,
143  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
144  //\return New instance of this class.
145  static DtSimComponent * creator(const DtString& name,
146  DtVrfObject* owner,
147  DtSimManager* simManager,
148  DtComponentDescriptor* desc = 0,
149  DtReaderWriterRegistry* parentRegistry = 0);
150 
151 protected:
155 
160 
162 };

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)