Add pybullet setVRCameraState and b3SetVRCameraStateCommandInit to set the VR camera root transform (position/orientation) and optional tracking object unique id (-1 for no tracking)

Fix robotcontrol.py script, getContactPointData -> getContactPoints
This commit is contained in:
Erwin Coumans
2017-01-05 17:41:58 -08:00
parent c940f0ec47
commit 83e103ac15
10 changed files with 229 additions and 41 deletions

View File

@@ -594,6 +594,26 @@ struct UserDebugDrawResultArgs
int m_debugItemUniqueId;
};
struct SendVREvents
{
int m_numVRControllerEvents;
b3VRControllerEvent m_controllerEvents[MAX_VR_CONTROLLERS];
};
enum eVRCameraEnums
{
VR_CAMERA_ROOT_POSITION=1,
VR_CAMERA_ROOT_ORIENTATION=2,
VR_CAMERA_ROOT_TRACKING_OBJECT=4
};
struct VRCameraState
{
double m_rootPosition[3];
double m_rootOrientation[4];
int m_trackingObjectUniqueId;
};
struct SharedMemoryCommand
{
@@ -635,6 +655,7 @@ struct SharedMemoryCommand
struct UserDebugDrawArgs m_userDebugDrawArgs;
struct RequestRaycastIntersections m_requestRaycastIntersections;
struct LoadBunnyArgs m_loadBunnyArguments;
struct VRCameraState m_vrCameraStateArguments;
};
};
@@ -657,11 +678,8 @@ struct SendOverlappingObjectsArgs
int m_numRemainingOverlappingObjects;
};
struct SendVREvents
{
int m_numVRControllerEvents;
b3VRControllerEvent m_controllerEvents[MAX_VR_CONTROLLERS];
};