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);
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();
113 if (_tracker_cs != _graph_cs) {
121 _transform = TransformState::make_mat(_mat);
The fundamental type of node for the data graph.
An optional parameter associated with an event.
ClientBase * get_client() const
Returns the ClientBase this device is associated with.
void extract_to_matrix(LMatrix3f &m) const
Based on the quat lib from VRPN.
static const LMatrix4f & convert_mat(CoordinateSystem from, CoordinateSystem to)
Returns a matrix that transforms from the indicated coordinate system to the indicated coordinate sys...
const LPoint3 & get_pos() const
Returns the current position of the tracker.
void set_data(int index, const EventParameter &data)
Sets the data for the indicated parameter.
bool is_valid() const
Returns true if the TrackerNode is valid and connected to a server, false otherwise.
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.
const LOrientation & get_orient() const
Returns the current orientation of the tracker.
void set_row(int row, const LVecBase4f &v)
Replaces the indicated row of the matrix.
TypeHandle is the identifier used to differentiate C++ class types.
Encapsulates the data generated from (or sent into) any particular DataNode.
CoordinateSystem get_coordinate_system() const
Returns the coordinate system that all devices associated with this client will operate in...
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...