VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
humanCoverPointController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
12 
13 #pragma once
14 
17 #include <vrfNavigation/navArea.h>
18 
21 class DtScriptedTaskTask;
27 class DtVectorOutputPort;
28 
34 {
35 private:
42 
43 public:
46  DtSimManager* simManager, DtComponentDescriptor* desc=0, DtReaderWriterRegistry *parentRegistry=0);
47 
49  virtual ~DtHumanCoverPointController();
50 
52  virtual bool init();
53 
55  virtual const char* type() const;
56 
58  virtual void tick();
59 
64  static void coverPointCallback(DtSimMessage * msg, void * usr);
65 
67  static DtSimComponent* creator(const DtString& name, DtVrfObject* owner, DtSimManager* simManager,
68  DtComponentDescriptor* desc=0, DtReaderWriterRegistry* parentRegistry=0);
69 
70 protected:
71  virtual bool usingNavBot() const;
72 
73  virtual void processCoverPointTask(DtSimMessage * msg);
74 
76  virtual void registerTaskMsgCallbacks();
77 
78  static void navAreaChangedCallback(void* usr);
79  virtual void processNavAreaChanged();
80 
82  virtual DtVector findCoverFromPoint(DtScriptedTaskTask*);
83 
84  virtual void clearTask();
85 
88  virtual bool findCoverPoint(DtVector&);
89 
92  static DtOnGraphVertexVisitedResult coverPointCheckCallback(const DtVector& localCheck, void* usr);
93  virtual DtOnGraphVertexVisitedResult processCoverPoint(const DtVector& localCheck);
94 
96  static void coverPointCostPointModificationCallback(const DtVector& localCheck, float* costmod, void* usr);
97  virtual void processCoverPointCostPointModification(const DtVector& localCheck, float* costmod);
98 
100  static void objectAboutToBeRemoved(const DtVrfObject* msg, void * usr);
101  virtual void processObjectAboutToBeRemoved(const DtVrfObject* msg);
102 
103  virtual void offsetForEntity(DtVector& localPosition) const;
104 
105  virtual void useNavBotData();
106 
107  virtual bool createPortGroups();
108  virtual bool createPorts();
109  virtual void stop(bool success);
110  virtual void moveToDestination();
111 
113  virtual void processCoverPointTask(DtScriptedTaskTask*);
114 
115  virtual void showCoverPoint();
116 
117  virtual void preFirstTickInit();
118  virtual bool createPSR();
119 
121  virtual bool destinationIsInsideObstruction(const DtVector& localDestination);
122 
123  virtual void setupPathFollowing();
124 
126  virtual DtVector targetPoint(const DtVector& from, double heading, double distance) const;
127 
129  virtual bool hasLosTo(const DtVector& origin, double headingOffOfOrigin, double offsetFromOrigin,
130  double headingToTargetPoint, double distanceToTargetPoint);
131 
132  virtual bool entityInDestination(const DtVector& dest);
133 
134  static void navigationInterfaceChanged(const DtVrfObject*, void* usr);
135  virtual void processNavigationInterfaceChanged(const DtVrfObject*);
136 
137 protected:
141  std::vector<DtUUID> myFindCoverFrom;
144 
152 
156 
159 
166 
173 
175 
178  int myOnPass;
184  boost::unordered_set<std::string> myCheckedPoints;
185 
187 };
double myPostSpacing
Definition: humanCoverPointController.h:179
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
class DtHumanCoverPointPSR:
Definition: humanCoverPointPSR.h:21
DtHumanMovementControlOutputPortGroup * myHumanMovementControlOutputPortGroup
Output Group Name: movement-control .
Definition: humanCoverPointController.h:158
DtNavAreaQuery::Ptr myCoverPointQuery
Definition: humanCoverPointController.h:143
Description: This repository holds all information that is common to all the forms of humans within t...
Definition: humanStateRepository.h:32
voidpf uLong int origin
Definition: ioapi.h:42
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation s...
Definition: activeBotNavInterface.h:26
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
virtual void registerTaskMsgCallbacks()
const DtHumanStateRepository * myHumanSR
Definition: humanCoverPointController.h:142
DtHumanCoverPointController is a controller that models finding cover from a particular group of enti...
Definition: humanCoverPointController.h:33
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
std::vector< DtUUID > myFindCoverFrom
Definition: humanCoverPointController.h:141
boost::unordered_set< std::string > myCheckedPoints
Definition: humanCoverPointController.h:184
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
DtVector mySearchStartPoint
Definition: humanCoverPointController.h:181
DtVector myFindCoverFromPoint
Definition: humanCoverPointController.h:182
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
virtual bool init()
Calls setRadio()
DtHumanCoverPointPSR * myProcessState
Definition: humanCoverPointController.h:174
DtInputPortGroup * myCollisionAvoidancePortGroup
Input Port Group Name: collision-avoidance-control Input Port Group Description:
Definition: humanCoverPointController.h:155
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtCollisionInputPort * myCollisionAvoidancePort
Input Port Name: potential-collision-info Input Port Description: information about an impending pote...
Definition: humanCoverPointController.h:151
Specialized classes.
Definition: scriptedTaskTask.h:270
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points.
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
File: simMsg.h.
Definition: simMessage.h:35
int myCoverPointEvalCounter
Definition: humanCoverPointController.h:186
virtual void tick()
This gives the thread of control to the component.
DtHumanCoverPointControllerDescriptor; descriptor for the DtHumanCoverPointController component...
Definition: humanCoverPointControllerDescriptor.h:20
boost::shared_ptr< DtNavAreaQuery > Ptr
Definition: navArea.h:59
DtActiveBotNavInterface * myNavInterface
Definition: humanCoverPointController.h:139
virtual bool createPorts()
Called by init.
DtBooleanOutputPort * myIsMovingPort
Output Port Name: is-moving Output Port Description: Indicates the entity is being actively moved by ...
Definition: humanCoverPointController.h:172
bool myResetRouteWhenCan
Definition: humanCoverPointController.h:176
virtual bool createPortGroups()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtInputPortGroup is a data port group of a data consumer.
Definition: inputPortGroup.h:32
Instances of DtCollisionInputPort are input ports through which data consumers can receive informatio...
Definition: collisionIOPort.h:29
bool myIgnoreNavData
Definition: humanCoverPointController.h:140
int myOnPass
Definition: humanCoverPointController.h:178
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
double mySearchRadius
Definition: humanCoverPointController.h:180
DtHumanCoverPointControllerDescriptor * myHumanCoverPointControllerDescriptor
Definition: humanCoverPointController.h:138
An output port group that contains the ports necessary to control the movement of a human using the D...
Definition: humanMovementControlOutputPortGroup.h:22
bool myCalculatingCoverPoint
Definition: humanCoverPointController.h:183
bool mySetupFromTaskWhenCan
Definition: humanCoverPointController.h:177
DtVectorOutputPort * myDestinationOutputPort
Output Port Name: destination Output Port Description: Specifies the current destination of the entit...
Definition: humanCoverPointController.h:165
char * dest
Definition: lz4.h:434

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)