VR-Forces Developer's Guide
 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&,DtLocalObject*,DtSimulationServices*,
25  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
27  DtLocalObject* owner,
29  DtComponentDescriptor* desc = 0,
30  DtReaderWriterRegistry* parentRegistry = 0);
31 
32  //destructor
34 
35  //\copydoc DtSimComponent(const DtString&,DtLocalObject*,DtSimulationServices*,
36  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
37  //\return New instance of this class.
38  static DtSimComponent * creator(const DtString& name,
39  DtLocalObject* owner,
40  DtSimulationServices* 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 
const MyJoystickControllerComponenet & operator=(const MyJoystickControllerComponenet &orig)
Joystick routines that must be enabled in order for this to be considered a joystick controller Joyst...
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
virtual void joystickConnected()
Joystick routines that must be enabled in order for this to be considered a joystick controller Joyst...
virtual const char * type() const
Type of controller this is.
virtual void joystickDisconnected()
Joystick control has been disabled for this controller.
MyJoystickControllerComponenet()
Joystick routines that must be enabled in order for this to be considered a joystick controller Joyst...
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
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
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Will manage basic functionality of a joystick controller. Implement pure virtual functions to respons...
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
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)