VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
joystickController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 //\file joystickController.h
7 //\brief MyJoystickController; handles new joystick controller function requests
8 
9 #pragma once
10 
13 
14 //\brief MyJoystickController is a controller that handles new
15 //joystick function requests
16 //
17 //Uses Descriptor Type: DtJoystickControllerDescriptor
18 
19 #define DtJoystickControllerComponentExampleType "joystick-controller-component-example"
20 
22 {
23 public:
24  //\copydoc DtSimComponent(const DtString&,DtVrfObject*,DtSimManager*,
25  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
27  DtVrfObject* owner,
29  DtComponentDescriptor* desc = 0,
30  DtReaderWriterRegistry* parentRegistry = 0);
31 
32  //destructor
34 
35  //\copydoc DtSimComponent(const DtString&,DtVrfObject*,DtSimManager*,
36  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
37  //\return New instance of this class.
38  static DtSimComponent * creator(const DtString& name,
39  DtVrfObject* owner,
40  DtSimManager* simManager,
41  DtComponentDescriptor* desc = 0,
42  DtReaderWriterRegistry* parentRegistry = 0);
43 
45  virtual const char* type() const;
46 
50  virtual void joystickConnected();
51 
53  virtual void joystickDisconnected();
54 
56  virtual void calcAndSetPortValues(const DtString& functionGroup, const DtString& function, double value, bool repeat);
57 
58 private:
59  //Default constructor; should not be called. Here because the compiler
60  //will generate an unprotected one otherwise.
62 
63  //copy constructor
65 
66  //assignment operator
69 };
70 
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
const MyJoystickControllerComponenet & operator=(const MyJoystickControllerComponenet &orig)
DtSimManager * simManager()
Gets the sim manager.
Definition: simComponent.h:410
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
virtual const char * type() const
Type of controller this is.
static DtSimComponent * creator(const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
virtual void joystickDisconnected()
Joystick control has been disabled for this controller.
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:29
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:103
Will manage basic functionality of a joystick controller.
Definition: joystickControllerInterface.h:23
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
virtual void calcAndSetPortValues(const DtString &functionGroup, const DtString &function, double value, bool repeat)
Called when a particular function group and function for this controller has been called...
Definition: joystickController.h:21

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)