VR-Forces 4.8 Class Documentation
 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"
14 
15 class DtSimMessage;
16 class DtVrfObject;
19 class DtNavTag;
20 
21 
25 {
26 
27 public:
28 
32  DtVrfObject* owner,
33  DtSimManager* simManager,
34  DtComponentDescriptor* desc = 0,
35  DtReaderWriterRegistry* parentRegistry = 0);
36 
39 
42  virtual const char* type() const;
43 
47  static DtSimComponent * creator(const DtString& name,
48  DtVrfObject* owner,
49  DtSimManager* simManager,
50  DtComponentDescriptor* desc = 0,
51  DtReaderWriterRegistry* parentRegistry = 0);
52 
53  virtual bool init();
54 
55  virtual bool postAddComponentsInit();
56 
57  virtual void preFirstTickInit();
58 
59 
60 protected:
61  static bool pathCostEvalFcn(const DtNavTag& navTag, float* costMultiplier, void* userData);
62  virtual bool evaluatePathCost(const DtNavTag& navTag, float* costMultiplier);
63 
64  virtual void buildNormalizedSoilRoughnessFactors();
65  virtual void buildSoilAndSemanticFactors();
66  virtual void addSoilAndSemanticFactorsFromList(const DtPathCostEntryList& costList);
67 
68  virtual bool finalizePathCost(double pathCost, float* costMultiplier);
69 
70  static void setNavigationPreferencesCallback(DtSimMessage * msg, void * usr);
71  virtual void processSetNavigationPreferences(DtSimMessage* msg);
72 
73  static void requestAvailableNavigationPreferencesCallback(const DtVrfObjectMessage* msg, void* usr);
74  virtual void processRequestAvailableNavigationPreferences(const DtVrfObjectMessage* msg);
75 
76  void sendAvailableNavigationPreferences(const DtUUID& receiver, bool sendList);
77 
80 
81  std::map<DtRoughnessSoilType, double> myNormalizedSoilRoughnessFactors;
82  std::map<DtU32, double> mySoilCharacteristicFactors;
83  std::map<unsigned int, double> mySemanticDataFactors;
85 
88 
89 private:
91 
93 
96 
102 };
103 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:144
Stores the state data used by the DtNavigationPreferenceController component.
Definition: navigationPreferenceControllerPsr.h:18
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
virtual bool init()
Calls setRadio()
const DtSetController & operator=(const DtSetController &orig)
assignment operator; not implemented
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:86
DtNavigationPreferenceDescriptor; descriptor for the DtNavigationPreferenceController component...
Definition: navigationPreferenceDescriptor.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:42
Definition: readerWriterRegistry.h:39
std::map< DtU32, double > mySoilCharacteristicFactors
Definition: navigationPreferenceController.h:82
Wrapper for GameWare NavTag.
Definition: navDataTag.h:54
std::map< DtRoughnessSoilType, double > myNormalizedSoilRoughnessFactors
These tables are calculated once on initialization of the controller for fast access to these factors...
Definition: navigationPreferenceController.h:81
DtUUID myFrontEndSender
Definition: navigationPreferenceController.h:101
std::map< unsigned int, double > mySemanticDataFactors
Definition: navigationPreferenceController.h:83
This controller manages what terrain types an entity prefers or avoids when calculating paths to dest...
Definition: navigationPreferenceController.h:24
File: simMsg.h.
Definition: simMessage.h:35
DtNavigationPreferenceControllerPsr * myProcessState
Definition: navigationPreferenceController.h:87
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.
Definition: vrfObjectMessage.h:30
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102

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)