#include <SimSetablePosition.h>
Inheritance diagram for gadget::SimSetablePosition:


Public Methods | |
| SimSetablePosition () | |
| virtual | ~SimSetablePosition () |
| virtual bool | config (jccl::ConfigElementPtr element) |
| Config method. More... | |
| bool | startSampling () |
| These functions don't do anything. More... | |
| bool | stopSampling () |
| StopSampling. More... | |
| bool | sample () |
| Sample the device. More... | |
| virtual void | updateData () |
| Updates the data. More... | |
| void | setData (const std::vector< PositionData > &pos_data_vec) |
| void | setData (const PositionData &pos_data) |
| void | operator delete (void *p) |
| Invokes the global scope delete operator. More... | |
Static Public Methods | |
| std::string | getElementType () |
| Returns the string rep of the element type used to config this device. More... | |
Protected Methods | |
| virtual void | destroy () |
| Deletes this object. More... | |
Should be set just before input manager updates data so it can be distributed by the remote input manager. The end of postFrame() is the logical place for the user to set the data. This prevents computers connected to the remote input manager from having different copies of data for very long.
Definition at line 58 of file SimSetablePosition.h.
|
|
Definition at line 66 of file SimSetablePosition.h.
00066 {;}
|
|
|
Definition at line 67 of file SimSetablePosition.h.
00067 {;}
|
|
|
Config method. This baselevel config will fill the base datamembers when found in the jccl::ConfigElementPtr such as instance name. Reimplemented from gadget::Input. Definition at line 47 of file SimSetablePosition.cpp.
00048 {
00049 if(! (Input::config(element) && Position::config(element)))
00050 {
00051 return false;
00052 }
00053
00054 return true;
00055 }
|
|
|
These functions don't do anything.
Implements gadget::Input. Definition at line 72 of file SimSetablePosition.h.
00072 { return 1; }
|
|
|
StopSampling. Reverse the effects of StartSampling(). Implements gadget::Input. Definition at line 73 of file SimSetablePosition.h.
00073 { return 1; }
|
|
|
Sample the device. Read the next set of input. This method is normally used internally by threaded drivers to repetively sample data in a separate thread. (This new data is not accessable until UpdateData is called) Implements gadget::Input. Definition at line 74 of file SimSetablePosition.h.
00074 { return 1; }
|
|
|
Updates the data.
Implements gadget::Input. Definition at line 77 of file SimSetablePosition.h.
00077 {;}
|
|
|
Definition at line 58 of file SimSetablePosition.cpp. References gadget::Position::addPositionSample, and gadget::Position::swapPositionBuffers.
00059 {
00060 mPos.setTime(); // Set the time
00061 addPositionSample(pos_data_vec);
00062
00063 swapPositionBuffers(); // Swap the buffers
00064 }
|
|
|
Definition at line 66 of file SimSetablePosition.cpp. References gadget::Position::addPositionSample, and gadget::Position::swapPositionBuffers.
00067 {
00068 std::vector<PositionData> pos_data_vec;
00069 pos_data_vec.push_back(pos_data);
00070
00071 mPos.setTime(); // Set the time
00072 addPositionSample(pos_data_vec);
00073
00074 swapPositionBuffers(); // Swap the buffers
00075
00076 //vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_DETAILED_LVL) << "SimSetablePosition: set Data:" << *(const_cast<PositionData*>(&pos_data)->getPosition()) << std::endl << vprDEBUG_FLUSH;
00077 }
|
|
|
Returns the string rep of the element type used to config this device. This string is used by the device factory to look up device drivers based up the type of element it is trying to load. Reimplemented from gadget::Input. Definition at line 42 of file SimSetablePosition.cpp.
00043 {
00044 return "simulated_setable_position";
00045 }
|
|
|
Invokes the global scope delete operator. This is required for proper releasing of memory in DLLs on Win32. Definition at line 88 of file SimSetablePosition.h.
00089 {
00090 ::operator delete(p);
00091 }
|
|
|
Deletes this object. This is an implementation of the pure virtual gadget::Input::destroy() method. Implements gadget::Input. Definition at line 98 of file SimSetablePosition.h.
00099 {
00100 delete this;
00101 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002