summaryrefslogtreecommitdiff
path: root/examples/SharedMemory/PhysicsClientC_API.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/SharedMemory/PhysicsClientC_API.cpp')
-rw-r--r--examples/SharedMemory/PhysicsClientC_API.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/SharedMemory/PhysicsClientC_API.cpp b/examples/SharedMemory/PhysicsClientC_API.cpp
index 920a463b7..c316cbeb2 100644
--- a/examples/SharedMemory/PhysicsClientC_API.cpp
+++ b/examples/SharedMemory/PhysicsClientC_API.cpp
@@ -314,6 +314,30 @@ B3_SHARED_API int b3LoadSoftBodySetCollisionMargin(b3SharedMemoryCommandHandle c
return 0;
}
+
+B3_SHARED_API int b3LoadSoftBodySetStartPosition(b3SharedMemoryCommandHandle commandHandle, double startPosX, double startPosY, double startPosZ)
+{
+ struct SharedMemoryCommand* command = (struct SharedMemoryCommand*)commandHandle;
+ b3Assert(command->m_type == CMD_LOAD_SOFT_BODY);
+ command->m_loadSoftBodyArguments.m_initialPosition[0] = startPosX;
+ command->m_loadSoftBodyArguments.m_initialPosition[1] = startPosY;
+ command->m_loadSoftBodyArguments.m_initialPosition[2] = startPosZ;
+ command->m_updateFlags |= LOAD_SOFT_BODY_INITIAL_POSITION;
+ return 0;
+}
+
+B3_SHARED_API int b3LoadSoftBodySetStartOrientation(b3SharedMemoryCommandHandle commandHandle, double startOrnX, double startOrnY, double startOrnZ, double startOrnW)
+{
+ struct SharedMemoryCommand* command = (struct SharedMemoryCommand*)commandHandle;
+ b3Assert(command->m_type == CMD_LOAD_SOFT_BODY);
+ command->m_loadSoftBodyArguments.m_initialOrientation[0] = startOrnX;
+ command->m_loadSoftBodyArguments.m_initialOrientation[1] = startOrnY;
+ command->m_loadSoftBodyArguments.m_initialOrientation[2] = startOrnZ;
+ command->m_loadSoftBodyArguments.m_initialOrientation[3] = startOrnW;
+ command->m_updateFlags |= LOAD_SOFT_BODY_INITIAL_ORIENTATION;
+ return 0;
+}
+
B3_SHARED_API b3SharedMemoryCommandHandle b3LoadUrdfCommandInit(b3PhysicsClientHandle physClient, const char* urdfFileName)
{
PhysicsClient* cl = (PhysicsClient*)physClient;