15 #include "trackerNode.h" 16 #include "config_device.h" 17 #include "dataNodeTransmit.h" 27 TrackerNode(
ClientBase *client,
const string &device_name) :
30 _transform_output = define_output(
"transform", TransformState::get_class_type());
32 _transform = TransformState::make_identity();
36 set_graph_coordinate_system(CS_default);
39 client->get_device(ClientTrackerDevice::get_class_type(), device_name);
43 <<
"Unable to open tracker device " << device_name <<
"\n";
47 if (!device->
is_of_type(ClientTrackerDevice::get_class_type())) {
49 <<
"Inappropriate device type " << device->get_type()
50 <<
" created; expected a ClientTrackerDevice.\n";
67 _transform_output = define_output(
"transform", TransformState::get_class_type());
69 _transform = TransformState::make_identity();
75 set_graph_coordinate_system(CS_default);
109 _data = _tracker->get_data();
112 _data.get_orient().extract_to_matrix(_mat);
113 if (_tracker_cs != _graph_cs) {
117 _mat.set_row(3, _data.get_pos());
121 _transform = TransformState::make_mat(_mat);
ClientBase * get_client() const
Returns the ClientBase this device is associated with.
The fundamental type of node for the data graph.
An optional parameter associated with an event.
static const LMatrix4f & convert_mat(CoordinateSystem from, CoordinateSystem to)
Returns a matrix that transforms from the indicated coordinate system to the indicated coordinate sys...
void set_data(int index, const EventParameter &data)
Sets the data for the indicated parameter.
A device, attached to the ClientBase by a TrackerNode, that records the data from a single tracker de...
An abstract base class for a family of client device interfaces–including trackers, buttons, dials, and other analog inputs.
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
TypeHandle is the identifier used to differentiate C++ class types.
CoordinateSystem get_coordinate_system() const
Returns the coordinate system that all devices associated with this client will operate in...
Encapsulates the data generated from (or sent into) any particular DataNode.
Any of a number of different devices that might be attached to a ClientBase, including trackers...
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...