VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
navigationPreferenceController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include "vrfmodel/setController.h"
13 #include <geometry/surface.h>
15 
16 class DtSimMessage;
19 class DtNavTag;
22 
26 {
27 
28 public:
29 
33  DtLocalObject* owner,
34  DtSimulationServices* simManager,
35  DtComponentDescriptor* desc = 0,
36  DtReaderWriterRegistry* parentRegistry = 0);
37 
40 
43  virtual const char* type() const;
44 
48  static DtSimComponent * creator(const DtString& name,
49  DtLocalObject* owner,
50  DtSimulationServices* simManager,
51  DtComponentDescriptor* desc = 0,
52  DtReaderWriterRegistry* parentRegistry = 0);
53 
54  virtual bool init();
55 
56  virtual bool postAddComponentsInit();
57 
58  virtual void preFirstTickInit();
59 
60  virtual void processNavigationInterfaceChanged();
61 
62 protected:
63  static bool pathCostEvalFcn(const DtNavTag& navTag, float slope, float elevationChange, float* costMultiplier, void* userData);
64  virtual bool evaluatePathCost(const DtNavTag& navTag, float slope, float elevationChange, float* costMultiplier);
65 
66  virtual void buildNormalizedSoilRoughnessFactors();
67  virtual void buildSoilAndSemanticFactors();
68  virtual void addSoilAndSemanticFactorsFromList(const DtPathCostEntryList& costList);
69 
75  virtual double slopeMultiplier(const double elevationChange, const double slope, const double soilModifier = 0.0);
79  virtual bool finalizePathCost(double pathCost, float* costMultiplier);
80 
81  static void setNavigationPreferencesCallback(DtSimMessage * msg, void * usr);
82  virtual void processSetNavigationPreferences(DtSimMessage* msg);
83 
84  static void requestAvailableNavigationPreferencesCallback(const DtVrfObjectMessage* msg, void* usr);
85  virtual void processRequestAvailableNavigationPreferences(const DtVrfObjectMessage* msg);
86 
87  void sendAvailableNavigationPreferences(const DtUUID& receiver, bool sendList);
88 
91 
92  std::map<DtRoughnessSoilType, double> myNormalizedSoilRoughnessFactors;
93  std::map<DtU32, double> mySoilCharacteristicFactors;
94  std::map<unsigned int, double> mySemanticDataFactors;
96 
99 
100 private:
102 
104 
107 
113 
115 
117 
118  tbb::spin_mutex myMutex;
119 };
120 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Stores the state data used by the DtNavigationPreferenceController component.
Definition: navigationPreferenceControllerPsr.h:17
DtVrfMovingObjectStateRepository * myMovingObjectStateRep
Definition: navigationPreferenceController.h:114
tbb::spin_mutex myMutex
Definition: navigationPreferenceController.h:118
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
virtual bool init()
Calls setRadio()
const DtSetController & operator=(const DtSetController &orig)
assignment operator; not implemented
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation s...
Definition: activeBotNavInterface.h:27
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
DtNavigationPreferenceDescriptor * myNavigationPreferenceDesc
Definition: navigationPreferenceController.h:97
DtNavigationPreferenceDescriptor; descriptor for the DtNavigationPreferenceController component...
Definition: navigationPreferenceDescriptor.h:23
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
std::map< DtU32, double > mySoilCharacteristicFactors
These tables are calculated once on initialization of the controller for fast access to these factors...
Definition: navigationPreferenceController.h:93
VR-Forces wrapper for Gameware NavTag. Note: This class keeps only a pointer to the data...
Definition: navDataTag.h:87
std::map< DtRoughnessSoilType, double > myNormalizedSoilRoughnessFactors
These tables are calculated once on initialization of the controller for fast access to these factors...
Definition: navigationPreferenceController.h:92
DtActiveBotNavInterface * myNavInterface
Definition: navigationPreferenceController.h:116
DtUUID myFrontEndSender
Definition: navigationPreferenceController.h:112
std::map< unsigned int, double > mySemanticDataFactors
These tables are calculated once on initialization of the controller for fast access to these factors...
Definition: navigationPreferenceController.h:94
This controller manages what terrain types an entity prefers or avoids when calculating paths to dest...
Definition: navigationPreferenceController.h:25
File: simMsg.h.
Definition: simMessage.h:35
DtNavigationPreferenceControllerPsr * myProcessState
Definition: navigationPreferenceController.h:98
This class will define a basic set controller that will allow for adding sets of that can be register...
Definition: setController.h:21
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
virtual bool postAddComponentsInit()
Calls enableTaskTypes()
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)