TrackerNode

class TrackerNode

Bases: DataNode

This class reads the position and orientation information from a tracker device and makes it available as a transformation on the data graph. It is also the primary interface to a Tracker object associated with a ClientBase.

Inheritance diagram

Inheritance diagram of TrackerNode

explicit TrackerNode(ClientBase *client, std::string const &device_name)
explicit TrackerNode(InputDevice *device)
TrackerNode(TrackerNode const&) = default
static TypeHandle get_class_type(void)
CoordinateSystem get_graph_coordinate_system(void) const

Returns the coordinate system that the TrackerNode will convert its transform into for passing down the data graph. Normally, this is CS_default.

LOrientation const &get_orient(void) const

Returns the current orientation of the tracker, if it is available.

LPoint3 const &get_pos(void) const

Returns the current position of the tracker, if it is available.

double get_time(void) const

Returns the time of the tracker’s last update.

CoordinateSystem get_tracker_coordinate_system(void) const

Returns the coordinate system that the tracker associated with this node will operate in.

LMatrix4 const &get_transform(void) const

Returns the current position and orientation of the tracker, as a combined matrix.

bool has_time(void) const

True if this data comes with timestamps.

bool is_valid(void) const

Returns true if the TrackerNode is valid and connected to a server, false otherwise.

void set_graph_coordinate_system(CoordinateSystem cs)

Specifies the coordinate system that the TrackerNode will convert its transform into for passing down the data graph. Normally, this is CS_default.

void set_tracker_coordinate_system(CoordinateSystem cs)

Specifies the coordinate system that the tracker associated with this node will operate in. Normally, this is set from the ClientBase that’s used to create the TrackerNode, so it should not need to be set on an individual tracker basis.