VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
groundMoveToControllerComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
15 #include <matrix/vlVector.h>
17 
18 class DtString;
20 class DtSimMessage;
21 class DtMoveToTask;
22 
35 
38 {
39 public:
40 
44  DtLocalObject* owner,
45  DtSimulationServices* simManager,
46  DtComponentDescriptor* desc = NULL,
47  DtReaderWriterRegistry* parentRegistry = NULL);
48 
50  virtual ~DtGroundMoveToControllerComponent() override;
51 
54  virtual const char* type() const override;
55 
57  virtual void tick() override;
58 
64  static void moveToDirectCallback(DtSimMessage* msg, void* usr);
65  virtual void processMoveToDirectTask(DtSimMessage* msg);
66 
71  virtual void processDestinationChanged();
72 
76  static DtSimComponent * creator(const DtString& name,
77  DtLocalObject* owner,
78  DtSimulationServices* simManager,
79  DtComponentDescriptor* desc = 0,
80  DtReaderWriterRegistry* parentRegistry = 0);
81 
83  virtual void registerTaskMsgCallbacks() override;
84 
88  virtual bool setupDestination() override;
89 
91  virtual void taskComplete(bool success = true) override;
92 
93 protected:
94 
95  virtual bool beginProcessingTask(const DtTaskMessage& task, DtSimTaskStatePtr taskState) override;
96 
97 private:
101 
104  orig);
105 
109 
110 protected:
114 
115 };
116 
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual void tick() override
Looks at the value on #myCollisionAvoidancePort, and if there is a value and the destination point is...
DtSimObjectReference myControlPoint
This is looked up once per tick - assumed unchanging while we have control.
Definition: groundMoveToControllerComponent.h:113
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtMoveToTask represents a moveTo task for an entity to perform. It inherits read/writableness from Si...
Definition: moveToTask.h:38
Definition: readerWriterRegistry.h:39
std::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
virtual bool beginProcessingTask(const DtTaskMessage &task, DtSimTaskStatePtr taskState) override
Called by the task manager when this controller should start executing the specified task...
DtGroundMoveToControllerComponent is a controller that models movement to a waypoint for ground entit...
Definition: groundMoveToControllerComponent.h:37
DtGroundMoveToDestinationControllerComponent is a controller that provides a kinematics-based model o...
Definition: groundMoveToDestinationControllerComponent.h:40
const DtGroundMoveToDestinationControllerComponent & operator=(const DtGroundMoveToDestinationControllerComponent &orig)
assignment operator; see comments on copy constructor!
File: simMsg.h.
Definition: simMessage.h:35
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
virtual void registerTaskMsgCallbacks() override
Overridden to register interest in move to and set location commands.
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
virtual bool setupDestination()
= &quot;BlockedByWall&quot;;
virtual void taskComplete(bool success=true) override
Calls stop() and then base taskComplete.
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
A locally simulated VRF object.
Definition: localObject.h:98

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)