-
Notifications
You must be signed in to change notification settings - Fork 26
ToolkitUtils
Alessandro Febretti edited this page Feb 8, 2014
·
4 revisions
Offers some generic utility static functions.
Method(s) | Description |
---|---|
static createInteractor(setting)
|
Creates an interactor object from a setting object |
static setupInteractor(settingName)
|
Creates an interactor object from a setting name |
static getKinectDepthCameraImage()
|
If a kinect service is running, this method returns a depth camera image as a PixelData object. Returns None if no kinect service is active |
node = SceneNode.create('node')
# [ ... ] attach stuff to the node here
# Create a standard interactor based on the settings under config/interactor
# The config/interactor section of the system configuration file specifies what
# interactor should be used depending on the hardware platform we are using (VR system, laptop, etc)
interactor = ToolkitUtils.setupInteractor("config/interactor")
# If we succesfully created an interactor, let's attach the node to it
if(interactor != None):
interactor.setSceneNode(node)