Closed
Description
I am using the JoltC api in my C project. Everything works fine except for the JoltPhysicsC_Extensions.cpp.
I dont know if im missing something or being stupid, but JoltPhysicsC_Extensions.cpp is trying to access private members.
How would I go about resolving this?
(And sorry if Im just missing something obvious and being dumb)
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:45:58: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
45 | return reinterpret_cast<JPC_Body **>(physics_system->mBodyManager.mBodies.data());
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:45:71: error: 'mBodies' is a private member of 'JPH::BodyManager'
45 | return reinterpret_cast<JPC_Body **>(physics_system->mBodyManager.mBodies.data());
| ^
../inc/Jolt/Physics/Body/BodyManager.h:314:18: note: declared private here
314 | BodyVector mBodies;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:60:25: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
60 | physics_system->mBodyManager.mBodiesMutex
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:60:38: error: 'mBodiesMutex' is a private member of 'JPH::BodyManager'
60 | physics_system->mBodyManager.mBodiesMutex
| ^
../inc/Jolt/Physics/Body/BodyManager.h:332:20: note: declared private here
332 | mutable Mutex mBodiesMutex;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:61:50: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
61 | JPH_IF_ENABLE_ASSERTS(, &physics_system->mBodyManager, JPH::EPhysicsLockTypes::BodiesList));
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:65:47: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
65 | for (const JPH::Body *b : physics_system->mBodyManager.mBodies)
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:65:60: error: 'mBodies' is a private member of 'JPH::BodyManager'
65 | for (const JPH::Body *b : physics_system->mBodyManager.mBodies)
| ^
../inc/Jolt/Physics/Body/BodyManager.h:314:18: note: declared private here
314 | BodyVector mBodies;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:89:25: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
89 | physics_system->mBodyManager.mBodiesMutex
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:89:38: error: 'mBodiesMutex' is a private member of 'JPH::BodyManager'
89 | physics_system->mBodyManager.mBodiesMutex
| ^
../inc/Jolt/Physics/Body/BodyManager.h:332:20: note: declared private here
332 | mutable Mutex mBodiesMutex;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:90:50: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
90 | JPH_IF_ENABLE_ASSERTS(, &physics_system->mBodyManager, JPH::EPhysicsLockTypes::BodiesList));
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:94:46: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
94 | for (uint32_t i = 0; i < physics_system->mBodyManager.mNumActiveBodies[0]; ++i)
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:94:59: error: 'mNumActiveBodies' is a private member of 'JPH::BodyManager'
94 | for (uint32_t i = 0; i < physics_system->mBodyManager.mNumActiveBodies[0]; ++i)
| ^
../inc/Jolt/Physics/Body/BodyManager.h:348:21: note: declared private here
348 | atomic<uint32> mNumActiveBodies[cBodyTypeCount] = { };
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:96:53: error: 'mBodyManager' is a private member of 'JPH::PhysicsSystem'
96 | const JPH::BodyID body_id = physics_system->mBodyManager.mActiveBodies[0][i];
| ^
../inc/Jolt/Physics/PhysicsSystem.h:271:18: note: declared private here
271 | BodyManager mBodyManager;
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:96:66: error: 'mActiveBodies' is a private member of 'JPH::BodyManager'
96 | const JPH::BodyID body_id = physics_system->mBodyManager.mActiveBodies[0][i];
| ^
../inc/Jolt/Physics/Body/BodyManager.h:345:16: note: declared private here
345 | BodyID * mActiveBodies[cBodyTypeCount] = { };
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:110:74: error: 'cIsFreedBody' is a private member of 'JPH::BodyManager'
110 | static_assert(_JPC_IS_FREED_BODY_BIT == JPH::BodyManager::cIsFreedBody);
| ^
../inc/Jolt/Physics/Body/BodyManager.h:323:30: note: declared private here
323 | static constexpr uintptr_t cIsFreedBody = uintptr_t(1);
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:111:73: error: 'cEmpty' is a private member of 'JPH::SubShapeID'
111 | static_assert(JPC_SUB_SHAPE_ID_EMPTY == JPH::SubShapeID::cEmpty);
| ^
../inc/Jolt/Physics/Collision/Shape/SubShapeID.h:86:24: note: declared private here
86 | static constexpr Type cEmpty = ~Type(0);
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:274:47: error: 'mForce' is a private member of 'JPH::MotionProperties'
274 | static_assert(offsetof(JPH::MotionProperties, mForce) == offsetof(JPC_MotionProperties, force));
| ^
../inc/Jolt/Physics/Body/MotionProperties.h:244:13: note: declared private here
244 | Float3 mForce { 0, 0, 0 }...
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:275:47: error: 'mTorque' is a private member of 'JPH::MotionProperties'
275 | static_assert(offsetof(JPH::MotionProperties, mTorque) == offsetof(JPC_MotionProperties, torque));
| ^
../inc/Jolt/Physics/Body/MotionProperties.h:245:13: note: declared private here
245 | Float3 mTorque { 0, 0, 0 }; ...
| ^
../src/lib/JoltC/JoltPhysicsC_Extensions.cpp:276:47: error: 'mMotionQuality' is a private member of 'JPH::MotionProperties'
276 | static_assert(offsetof(JPH::MotionProperties, mMotionQuality) == offsetof(JPC_MotionProperties, motion_quality));
| ^
../inc/Jolt/Physics/Body/MotionProperties.h:256:19: note: declared private here
256 | EMotionQuality mMotionQuality; ...
Metadata
Metadata
Assignees
Labels
No labels