VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
myHumanSetController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 //\file myHumanSetController.h
7 //\brief MyHumanSetController; handles new DtSetSpeedAndHeadingRequest
8 
9 
10 #pragma once
11 
13 #include "vrfobjcore/simRadio.h"
14 
15 namespace vrfAddSetExample
16 {
17  //\brief MyLocalEntitySetController is a controller that handles new
18  //DtSetSpeedAndHeadingRequest. It replaces the existing DtHumanSetController.
19  //
20  //Uses Descriptor Type: DtComponentDescriptor
21 
23  {
24 
25  public:
26 
27  //\copydoc DtSimComponent(const DtString&,DtLocalObject*,DtSimulationServices*,
28  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
30  DtLocalObject* owner,
32  DtComponentDescriptor* desc = 0,
33  DtReaderWriterRegistry* parentRegistry = 0);
34 
35  //destructor
36  virtual ~MyHumanSetController();
37 
38  virtual void processSetSpeedAndHeading(DtSimMessage * msg);
39 
40  static void setSpeedAndHeadingCallback(DtSimMessage * msg, void * usrData);
41 
42  //\copydoc DtSimComponent(const DtString&,DtLocalObject*,DtSimulationServices*,
43  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
44  //\return New instance of this class.
45  static DtSimComponent * creator(const DtString& name,
46  DtLocalObject* owner,
47  DtSimulationServices* simManager,
48  DtComponentDescriptor* desc = 0,
49  DtReaderWriterRegistry* parentRegistry = 0);
50 
51  private:
52  //Default constructor; should not be called. Here because the compiler
53  //will generate an unprotected one otherwise.
55 
56  //copy constructor
58 
59  //assignment operator
60  const MyHumanSetController & operator=(const
61  MyHumanSetController& orig);
62 
63 
64  protected:
65  //Overrides this so it can register its interest in the set commands.
66  virtual void setRadio(DtSimRadio * radio);
67  };
68 }
69 
virtual void setRadio(DtSimRadio *radio)
Override to add set data callbacks.
Definition: simRadio.h:30
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
const MyHumanSetController & operator=(const MyHumanSetController &orig)
Definition: readerWriterRegistry.h:39
static void setSpeedAndHeadingCallback(DtSimMessage *msg, void *usrData)
File: simMsg.h.
Definition: simMessage.h:35
virtual void processSetSpeedAndHeading(DtSimMessage *msg)
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition: myHumanSetController.h:22
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
VRF4API_METHOD const DtSimulationServices * simManager() const
This is the deprecated API that can be used as a reference to migrate 4.X code to 5...
Definition: simComponent.h:574
DtHumanSetController handles DtSetDataRequest messages for individual lifeform entities.
Definition: humanSetController.h:27
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
virtual DtSimRadio * radio()
The radio this component is listening to.
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)