mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
Add version of TrackerNode that takes a ClientTrackerDevice directly
This commit is contained in:
parent
aa4cc5c531
commit
0821026944
@ -54,6 +54,27 @@ TrackerNode(ClientBase *client, const string &device_name) :
|
||||
_tracker = DCAST(ClientTrackerDevice, device);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TrackerNode::Constructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
TrackerNode::
|
||||
TrackerNode(ClientTrackerDevice *device) :
|
||||
DataNode(device->get_device_name()),
|
||||
_tracker(device)
|
||||
{
|
||||
_transform_output = define_output("transform", TransformState::get_class_type());
|
||||
|
||||
_transform = TransformState::make_identity();
|
||||
|
||||
nassertv(device != (ClientTrackerDevice *)NULL);
|
||||
ClientBase *client = device->get_client();
|
||||
nassertv(client != (ClientBase *)NULL);
|
||||
set_tracker_coordinate_system(client->get_coordinate_system());
|
||||
set_graph_coordinate_system(CS_default);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TrackerNode::Destructor
|
||||
// Access: Public, Virtual
|
||||
|
@ -36,6 +36,7 @@
|
||||
class EXPCL_PANDA_DEVICE TrackerNode : public DataNode {
|
||||
PUBLISHED:
|
||||
TrackerNode(ClientBase *client, const string &device_name);
|
||||
TrackerNode(ClientTrackerDevice *device);
|
||||
virtual ~TrackerNode();
|
||||
|
||||
INLINE bool is_valid() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user