Changes UserData to use global identifiers and makes linkIndex optional.
This removes the need to specify the body id/link index when retrieving a user data entry. Additionally, user data can now optionally be set to visual shapes as well. The following public pybullet APIs have changed (backwards incompatible) addUserData and getUserDataId Makes linkIndex parameter optional (default value is -1) Adds optional visualShapeIndex parameter (default value is -1) getUserData and removeUserData Removes required parameters bodyUniqueId and linkIndex getNumUserData Removes required bodyUniqueId parameter getUserDataInfo Removes required linkIndex parameter Changes returned tuple from (userDataId, key) to (userDataId, key, bodyUniqueId, linkIndex, visualShapeIndex)
This commit is contained in:
@@ -274,6 +274,7 @@ struct b3JointInfo
|
||||
|
||||
|
||||
enum UserDataValueType {
|
||||
USER_DATA_VALUE_TYPE_NOT_USET = -1,
|
||||
// Data represents generic byte array.
|
||||
USER_DATA_VALUE_TYPE_BYTES = 0,
|
||||
// Data represents C-string
|
||||
@@ -287,13 +288,6 @@ struct b3UserDataValue
|
||||
char* m_data1;
|
||||
};
|
||||
|
||||
struct b3UserDataGlobalIdentifier
|
||||
{
|
||||
int m_bodyUniqueId;
|
||||
int m_linkIndex;
|
||||
int m_userDataId;
|
||||
};
|
||||
|
||||
struct b3UserConstraint
|
||||
{
|
||||
int m_parentBodyIndex;
|
||||
|
||||
Reference in New Issue
Block a user