Skip to content

Commit d6bde92

Browse files
author
erwincoumans
authored
Merge pull request #2551 from erwincoumans/master
enable programmatic creation of spherical joint
2 parents 4414136 + 7a40234 commit d6bde92

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

examples/SharedMemory/PhysicsClientC_API.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5481,18 +5481,16 @@ B3_SHARED_API b3SharedMemoryCommandHandle b3ProfileTimingCommandInit(b3PhysicsCl
54815481
b3Assert(command);
54825482

54835483
int len = name ? strlen(name) : 0;
5484+
command->m_type = CMD_PROFILE_TIMING;
54845485
if (len > 0 && len < (MAX_FILENAME_LENGTH + 1))
54855486
{
5486-
command->m_type = CMD_PROFILE_TIMING;
5487+
54875488
strcpy(command->m_profile.m_name, name);
54885489
command->m_profile.m_name[len] = 0;
54895490
}
54905491
else
54915492
{
5492-
const char* invalid = "InvalidProfileTimingName";
5493-
int len = strlen(invalid);
5494-
strcpy(command->m_profile.m_name, invalid);
5495-
command->m_profile.m_name[len] = 0;
5493+
command->m_profile.m_name[0] = 0;
54965494
}
54975495
command->m_profile.m_type = -1;
54985496
command->m_profile.m_durationInMicroSeconds = 0;

examples/SharedMemory/PhysicsServerCommandProcessor.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2363,7 +2363,12 @@ struct ProgrammaticUrdfInterface : public URDFImporterInterface
23632363
jointType = URDFFixedJoint;
23642364
break;
23652365
}
2366-
//case eSphericalType:
2366+
case eSphericalType:
2367+
{
2368+
isValid = true;
2369+
jointType = URDFSphericalJoint;
2370+
break;
2371+
}
23672372
//case ePlanarType:
23682373
//case eFixedType:
23692374
//case ePoint2PointType:

0 commit comments

Comments
 (0)