VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
humanCrosswalkController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
12 
13 #pragma once
14 
18 #include <vrfNavigation/navArea.h>
19 
21 class DtScriptedTaskTask;
24 class DtVectorOutputPort;
27 
33 {
34 private:
41 public:
44  DtSimulationServices* simManager, DtComponentDescriptor* desc=0, DtReaderWriterRegistry *parentRegistry=0);
45 
47  virtual ~DtHumanCrosswalkController() override;
48 
50  virtual bool init() override;
51 
53  virtual const char* type() const override;
54 
56  virtual void tick() override;
57 
59  static DtSimComponent* creator(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
60  DtComponentDescriptor* desc=0, DtReaderWriterRegistry* parentRegistry=0);
61 
62 protected:
63 
65  virtual bool createPortGroups() override;
66 
68  virtual bool createPorts() override;
69 
71  virtual DtHumanCrosswalkControllerPSR* createPSR();
72 
73  virtual bool usingNavBot() const;
74 
77  virtual DtRoadCrossingState upcomingCrossing(DtNavTag& crosswalkNavTag) const;
78 
81  virtual DtRoadCrossingState currentCrossing(DtNavTag& crosswalkNavTag) const;
82 
84  virtual bool canCross(const DtNavTag& navTag) const;
85 
87  virtual double getCrossingHeading(const DtNavTag& navTag) const;
88 
90  virtual bool isRoadNavTag(const DtNavTag& navTag) const;
91 
93  virtual bool isCrosswalkNavTag(const DtNavTag& navTag) const;
94 
95  virtual void updateTaskVisualizations() override;
96 
97  virtual void processNavigationInterfaceChanged();
98 
99 protected:
100 
102 
104 
108 
109 
112 
115 
122 
129 
131 };
DtBooleanOutputPort * myIsMovingPort
Output Port Name: is-moving Output Port Description: Indicates the entity is being actively moved by ...
Definition: humanCrosswalkController.h:121
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtHumanCrosswalkControllerPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: humanCrosswalkController.h:107
Description: This repository holds all information that is common to all the forms of humans within t...
Definition: humanStateRepository.h:33
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation s...
Definition: activeBotNavInterface.h:27
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
VR-Forces wrapper for Gameware NavTag. Note: This class keeps only a pointer to the data...
Definition: navDataTag.h:87
DtRoadCrossingState
Definition: humanCrosswalkControllerPSR.h:15
DtHumanCrosswalkController is a controller that models crossing the street at a crosswalk.
Definition: humanCrosswalkController.h:32
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:443
virtual bool init() override
Calls setRadio()
DtHumanMovementControlOutputPortGroup * myHumanMovementControlOutputPortGroup
Output Group Name: movement-control .
Definition: humanCrosswalkController.h:114
DtHumanCrosswalkCOntrollerPSR is a process state repository which holds state variables for the DtHum...
Definition: humanCrosswalkControllerPSR.h:25
Specialized classes.
Definition: scriptedTaskTask.h:277
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
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
Instances of DtHumanCrosswalkControllerDescriptor are used to specify the parameters for a DtHumanCro...
Definition: humanCrosswalkControllerDescriptor.h:18
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtActiveBotNavInterface * myNavInterface
Definition: humanCrosswalkController.h:103
An output port group that contains the ports necessary to control the movement of a human using the D...
Definition: humanMovementControlOutputPortGroup.h:22
DtHumanCrosswalkControllerDescriptor * myHumanCrosswalkDescriptor
Definition: humanCrosswalkController.h:101
A locally simulated VRF object.
Definition: localObject.h:98
DtBooleanOutputPort * myUseCollisionAvoidancePort
Output Port Name: use-collision-avoidance Output Port Description: Indicates whether or not this cont...
Definition: humanCrosswalkController.h:128

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)