Panda3D
Functions
clientBase.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "clientBase.h"
#include "config_device.h"

Go to the source code of this file.

Functions

 PT (ClientDevice) ClientBase
 Returns a ClientDevice pointer that corresponds to the named device of the indicated device type. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
jason
Date
2000-08-04

Definition in file clientBase.cxx.

Function Documentation

◆ PT()

PT ( ClientDevice  )

Returns a ClientDevice pointer that corresponds to the named device of the indicated device type.

Creates a new dial device.

Creates a new analog device.

Creates a new button device.

Creates a new tracker device.

The device_type should be one of ClientTrackerDevice, ClientAnalogDevice, etc.; the device_name is implementation defined.

Normally, the user does not need to call this function directly; it is called automatically by creating a TrackerNode or AnalogNode or some such data graph node.

The return value is the pointer to the created device (which might be the same pointer returned by a previous call to this function with the same parameters). When the pointer destructs (i.e. its reference count reaches zero) it will automatically be disconnected.

If the named device does not exist or cannot be connected for some reason, NULL is returned.

The device_name is parsed for sensor and data_type information.

The device_name may be one of the following:

tracker_name tracker_name:N tracker_name:N[pva]

Where N is an integer sensor number, and [pva] is one of the lowercase letters p, v, or a.

In the first form, the device connects to the indicated tracker, and reports position information on sensor number 0.

In the second form, the device connects to the indicated tracker, and reports position information on the indicated sensor number.

In the third form, the device connects to the indicated tracker, and reports either position, velocity, or acceleration information on the indicated sensor number.

The device_name is sent verbatim to the VRPN library.

Definition at line 115 of file clientBase.cxx.