VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dynamicFeaturesController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include "features/feature.h"
17 
19 
21  : public MAKVRinTerra::DtDynamicFeature<MAKVRinTerra::DtFeature>
22 {
24 
25 public:
26  explicit DtVrfObjectFeature(const DtVrfObject* object);
27 
30  unsigned numberOfAttributes(const Key::String&) const;
31  bool hasAttribute(const Key&) const;
32  boost::optional<Attribute> attribute(const Key&) const;
33 
34  virtual DtObjectType objectType() const;
35  virtual std::string objectName() const;
36  virtual std::string objectUuid() const;
37  virtual DtVector position() const;
38 
39 protected:
42  std::string myObjectTypeString;
43 
45 };
46 
48 {
49 public:
51  const DtString& name,
52  DtVrfObject* owner,
53  DtSimManager* simManager,
54  DtComponentDescriptor* desc = 0,
55  DtReaderWriterRegistry* parentRegistry = 0);
56 
57  virtual ~DtDynamicFeaturesController();
58 
59  static DtSimComponent * creator(const DtString& name,
60  DtVrfObject* owner,
61  DtSimManager* simManager,
62  DtComponentDescriptor* desc = 0,
63  DtReaderWriterRegistry* parentRegistry = 0);
64 
67  virtual const char* type() const;
68 
69  virtual bool init();
70 
71  virtual void tick();
72 
73 protected:
74  virtual void verticesChanged();
75 
76  virtual boost::shared_ptr<DtVrfObjectFeature> createFeature();
77  virtual bool isChanged() const;
78 
79  boost::shared_ptr<DtVrfObjectFeature> myFeature;
80 
81 private:
82  static void staticVerticesChangedCallback(const DtVrfObject* obj, void* data);
83 
86 };
87 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
std::string myObjectTypeString
Definition: dynamicFeaturesController.h:42
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
Key used to lookup attributes.
Definition: feature.h:66
DtDynamicFeaturesContoller; creates dynamic features from entities.
Definition: dynamicFeaturesController.h:20
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
const DtVrfObject * myObject
Definition: dynamicFeaturesController.h:40
Feature object representing a dynamic feature.
Definition: dynamicFeature.h:21
DtObjectType myObjectType
Definition: dynamicFeaturesController.h:41
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
DtFeature * clone() const
Definition: dynamicFeature.h:49
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
*virtual const DtObjectType & objectType() const
Definition: readerWriterRegistry.h:39
virtual bool init()
Calls setRadio()
void forEachAttribute(ForEachFunction func) const
Definition: dynamicFeature.h:60
Definition: dynamicFeaturesController.h:47
Definition: objectType.h:27
boost::function< void(const Key &, const Attribute &)> ForEachFunction
Callback used to iterating through attributes with ForEachAttribute.
Definition: feature.h:149
unsigned numberOfAttributes(const typename Key::String &name) const
Definition: dynamicFeature.h:66
virtual void tick()
This gives the thread of control to the component.
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:29
DtVector myLastPosition
Definition: dynamicFeaturesController.h:44
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
boost::optional< Attribute > attribute(const Key &k) const
Definition: dynamicFeature.h:82
Case insensitive string.
Definition: feature.h:69
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
MAKVRinTerra::DtDynamicFeature< MAKVRinTerra::DtFeature > Base
Definition: dynamicFeaturesController.h:23
Represents a GIS feature.
Definition: feature.h:37
boost::shared_ptr< DtVrfObjectFeature > myFeature
Definition: dynamicFeaturesController.h:79
bool hasAttribute(const Key &k) const
Definition: dynamicFeature.h:74

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)