载入中...
搜索中...
未找到
World3D.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
6#include "common/Result.h"
7#include "common/Snapshot.h"
12
13#include <cstdint>
14#include <map>
15#include <memory>
16#include <string>
17#include <unordered_map>
18#include <unordered_set>
19#include <utility>
20#include <vector>
21
23
24namespace eve::physics {
25struct ForceStepState;
26
27namespace action_adapter {
28class ActionCollisionIgnoreState;
29}
30
31namespace jolt {
32class WorldBackend;
33}
34namespace box3d {
35class WorldBackend;
36struct Access;
37}
38class Body3D;
39class Coupling3D;
40class Shape3D;
41class Joint3D;
42class Mechanism3D;
48public:
50 struct EventShape {
51 int bodyId = 0;
52 int shapeId = 0;
53 int shapeTag = 0;
54 };
55
61
67
69 struct HitEvent {
72 float pointX = 0.f, pointY = 0.f, pointZ = 0.f;
73 float normalX = 0.f, normalY = 0.f, normalZ = 0.f;
74 float approachSpeed = 0.f;
75 float normalImpulse = 0.f;
76 };
79 int jointId = 0;
80 int bodyAId = 0;
81 int bodyBId = 0;
82 int kind = 0;
83 float forceX = 0.f, forceY = 0.f, forceZ = 0.f;
84 float torqueX = 0.f, torqueY = 0.f, torqueZ = 0.f;
85 };
94 World3D(float gravityX, float gravityY, float gravityZ, bool sleep,
100 [[nodiscard]] static eve::Result<std::unique_ptr<World3D>> createWithBackend(
101 RigidBackend3D backend, float gravityX, float gravityY, float gravityZ, bool sleep,
104 [[nodiscard]] RigidBackend3D rigidBackendKind() const noexcept { return rigidBackendKind_; }
105 ~World3D();
106
107 World3D(const World3D &) = delete;
108 World3D &operator=(const World3D &) = delete;
109
111 void update(float dt);
113 void updateFull(float dt, int subStepCount);
114
124 [[nodiscard("check the physics step outcome or explicitly ignore it")]]
126
128 [[nodiscard]] SimulationObservation simulationObservation() const noexcept;
130 [[nodiscard]] SimulationBackendKind backendKind() const noexcept;
132 [[nodiscard]] SimulationDeterminism backendDeterminism() const noexcept;
134 [[nodiscard]] eve::SimulationTick simulationTick() const noexcept { return simulationTick_; }
136 [[nodiscard]] PhysicsWorldHandle runtimeHandle() const noexcept { return runtimeHandle_; }
145 [[nodiscard]] std::weak_ptr<const void> lifetimeToken() const noexcept { return queryLifetime_; }
147 [[nodiscard]] eve::PersistentId persistentId() const noexcept { return instanceId_; }
151 [[nodiscard]] static World3D* findWorld(PhysicsWorldHandle handle) noexcept;
153 [[nodiscard]] bool usedBackendFallback() const noexcept { return backendFallback_; }
155 [[nodiscard("inspect backend selection diagnostics")]]
156 eve::Status backendSelectionStatus() const;
157
164 [[nodiscard("check or persist the physics snapshot")]]
166
183 [[nodiscard("check the physics snapshot restore outcome")]]
184 eve::Result<void> restore(const eve::SnapshotEnvelope &snapshot, const eve::SnapshotHashProvider &hashProvider);
185
187 void setGravity(float gx, float gy, float gz);
188 float getGravityX() const;
189 float getGravityY() const;
190 float getGravityZ() const;
192 void setContinuousCollisionEnabled(bool enabled);
194 bool isContinuousCollisionEnabled() const;
196 void setRestitutionThreshold(float speed);
198 float getRestitutionThreshold() const;
200 void setHitEventThreshold(float speed);
202 float getHitEventThreshold() const;
204 void setBodyPairCollisionEnabled(Body3D *bodyA, Body3D *bodyB, bool enabled);
206 bool isBodyPairCollisionEnabled(Body3D *bodyA, Body3D *bodyB) const;
208 void setShapePairCollisionEnabled(Shape3D *shapeA, Shape3D *shapeB, bool enabled);
210 bool isShapePairCollisionEnabled(Shape3D *shapeA, Shape3D *shapeB) const;
217 void setContactTuning(float hertz, float dampingRatio, float pushOutSpeed);
219 float getContactHertz() const { return contactHertz_; }
221 float getContactDampingRatio() const { return contactDampingRatio_; }
223 float getContactPushOutSpeed() const { return contactPushOutSpeed_; }
225 void setContactRecycleDistance(float distance);
227 float getContactRecycleDistance() const;
229 void setMaximumLinearSpeed(float speed);
231 float getMaximumLinearSpeed() const;
233 void setWarmStartingEnabled(bool enabled);
235 bool isWarmStartingEnabled() const;
247 int explode(float x, float y, float z, float radius, float falloff,
248 float impulsePerArea, int maskBits = -1);
250 int getExplosionResultCount() const { return static_cast<int>(explosionResults_.size()); }
266 float getBoundsMinX() const;
268 float getBoundsMinY() const;
270 float getBoundsMinZ() const;
272 float getBoundsMaxX() const;
274 float getBoundsMaxY() const;
276 float getBoundsMaxZ() const;
278 int getBodyCount() const;
280 int getShapeCount() const;
282 int getContactCount() const;
284 int getJointCount() const;
286 int getIslandCount() const;
288 int getAwakeBodyCount() const;
290 int getAwakeContactCount() const;
292 int getRecycledContactCount() const;
294 int getStaticTreeHeight() const;
296 int getDynamicTreeHeight() const;
298 int getMemoryByteCount() const;
300 float getProfileStepMs() const;
302 float getProfilePairsMs() const;
304 float getProfileCollideMs() const;
306 float getProfileSolveMs() const;
308 float getProfileBulletsMs() const;
310 float getProfileSensorsMs() const;
311
321 Body3D *newBody(const std::string &bodyType, float x, float y, float z);
323 [[nodiscard]] Body3D *findBody(PhysicsBodyHandle handle) const;
325 [[nodiscard]] Body3D *findBodyById(int bodyId) const;
331 [[nodiscard]] ResultRef<Coupling3D> resolveCoupling3D(int id) const;
333 [[nodiscard]] Shape3D *findShape(PhysicsShapeHandle handle) const;
335 [[nodiscard]] Shape3D *findShapeById(int shapeId) const;
337 [[nodiscard]] Joint3D *findJoint(PhysicsJointHandle handle) const;
348 Joint3D *newDistanceJoint(Body3D *bodyA, Body3D *bodyB, float anchorAX, float anchorAY,
349 float anchorAZ, float anchorBX, float anchorBY, float anchorBZ,
350 float length, bool collideConnected = false);
361 Joint3D *newRevoluteJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY,
362 float anchorZ, float axisX, float axisY, float axisZ,
363 bool collideConnected = false);
373 Joint3D *newPrismaticJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY,
374 float anchorZ, float axisX, float axisY, float axisZ,
375 bool collideConnected = false);
385 Joint3D *newSphericalJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY,
386 float anchorZ, float axisX, float axisY, float axisZ,
387 bool collideConnected = false);
397 Joint3D *newWheelJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY,
398 float anchorZ, float suspensionAxisX, float suspensionAxisY,
399 float suspensionAxisZ, float wheelAxisX, float wheelAxisY,
400 float wheelAxisZ, bool collideConnected = false);
411 Joint3D *newWeldJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY,
412 float anchorZ, bool collideConnected = false);
423 Joint3D *newMotorJoint(Body3D *bodyA, Body3D *bodyB, bool collideConnected = false);
434 Joint3D *newParallelJoint(Body3D *bodyA, Body3D *bodyB, float axisX, float axisY, float axisZ,
435 bool collideConnected = false);
446 Joint3D *newFilterJoint(Body3D *bodyA, Body3D *bodyB);
447
456 Mechanism3D *newShaft(Body3D *support, Body3D *rotor, float anchorX, float anchorY,
457 float anchorZ, float axisX, float axisY, float axisZ,
458 bool collideConnected = false);
469 Mechanism3D *newRatchet(Body3D *frame, Body3D *wheel, float anchorX, float anchorY,
470 float anchorZ, float axisX, float axisY, float axisZ, int direction,
471 float engagementTorque, bool collideConnected = false);
481 Mechanism3D *newCrankSlider(Body3D *frame, Body3D *crank, Body3D *rod, Body3D *slider,
482 float crankAnchorX, float crankAnchorY, float crankAnchorZ,
483 float axisX, float axisY, float axisZ, float crankPinX,
484 float crankPinY, float crankPinZ, float sliderPinX,
485 float sliderPinY, float sliderPinZ, float slideAxisX,
486 float slideAxisY, float slideAxisZ, bool collideConnected = false);
487
489 void destroyBody(Body3D *body);
491 void destroy();
492
497 int rayCast(float x1, float y1, float z1, float x2, float y2, float z2);
499 int rayCastFiltered(float x1, float y1, float z1, float x2, float y2, float z2,
500 uint64_t maskBits);
510 [[nodiscard]] eve::Result<RayHit3D> rayCastOwned(float x1, float y1, float z1, float x2,
511 float y2, float z2, QueryFilter3D filter = {});
513 bool sphereCast(float x1, float y1, float z1, float x2, float y2, float z2,
514 float radius, uint64_t maskBits, int ignoredBodyId,
515 CameraSphereHit3D* out) const;
520 int rayCastAll(float x1, float y1, float z1, float x2, float y2, float z2, int maxHits);
521 bool hasRayHit() const { return rayHitBodyId_ >= 0; }
522 int getRayHitBodyId() const { return rayHitBodyId_; }
524 int getRayHitShapeId() const { return rayHitShapeId_; }
526 int getRayHitShapeTag() const { return rayHitShapeTag_; }
528 int getRayHitMaterialId() const { return rayHitMaterialId_; }
530 int getRayHitTriangleIndex() const { return rayHitTriangleIndex_; }
531 float getRayHitX() const { return rayHitX_; }
532 float getRayHitY() const { return rayHitY_; }
533 float getRayHitZ() const { return rayHitZ_; }
534 float getRayHitNormalX() const { return rayHitNormalX_; }
535 float getRayHitNormalY() const { return rayHitNormalY_; }
536 float getRayHitNormalZ() const { return rayHitNormalZ_; }
537 float getRayHitFraction() const { return rayHitFraction_; }
539 int getRayResultCount() const { return static_cast<int>(rayResults_.size()); }
541 int getRayResultBodyId(int index) const;
551 float getRayResultX(int index) const;
553 float getRayResultY(int index) const;
555 float getRayResultZ(int index) const;
557 float getRayResultNormalX(int index) const;
559 float getRayResultNormalY(int index) const;
561 float getRayResultNormalZ(int index) const;
563 float getRayResultFraction(int index) const;
564
569 int queryAABB(float minX, float minY, float minZ, float maxX, float maxY, float maxZ);
577 [[nodiscard]] eve::Result<BroadPhaseAabb3D> queryAabbBroadPhaseOwned(
578 float minX, float minY, float minZ, float maxX, float maxY, float maxZ,
579 QueryFilter3D filter = {});
580
589 int querySphere(float x, float y, float z, float radius);
590
596 int queryCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius);
604 [[nodiscard]] eve::Result<CapsuleOverlap3D> queryCapsuleOwned(
605 float ax, float ay, float az, float bx, float by, float bz, float radius,
606 QueryFilter3D filter = {});
607
619 int queryBox(float x, float y, float z, float width, float height, float depth, float qx,
620 float qy, float qz, float qw);
621
627 [[nodiscard]] eve::Result<std::vector<eve::WorldSphereContact>> sweepSphereOwned(
628 double x, double y, double z, double endX, double endY, double endZ, eve::WorldSphereSweepSettings settings);
640 [[nodiscard]] eve::Result<void> applySweepContactImpulse(const eve::WorldSphereContact &contact,
641 PhysicsVector3D impulse, PhysicsVector3D worldPoint);
643 [[nodiscard]] std::string queryToken() const;
645 [[nodiscard]] std::uint64_t queryEpoch() const noexcept { return queryEpoch_; }
646
653 int castSphere(float x, float y, float z, float radius, float dx, float dy, float dz);
655 int castSphereAll(float x, float y, float z, float radius, float dx, float dy, float dz,
656 int maxHits);
657
663 int castCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius,
664 float dx, float dy, float dz);
666 int castCapsuleAll(float ax, float ay, float az, float bx, float by, float bz, float radius,
667 float dx, float dy, float dz, int maxHits);
668
673 int castBox(float x, float y, float z, float width, float height, float depth, float qx,
674 float qy, float qz, float qw, float dx, float dy, float dz);
676 int castBoxAll(float x, float y, float z, float width, float height, float depth, float qx,
677 float qy, float qz, float qw, float dx, float dy, float dz, int maxHits);
678
685 int closestPoint(float x, float y, float z, float maxDistance);
687 bool hasClosestPoint() const { return closestBodyId_ >= 0; }
689 int getClosestBodyId() const { return closestBodyId_; }
691 int getClosestShapeId() const { return closestShapeId_; }
693 int getClosestShapeTag() const { return closestShapeTag_; }
695 float getClosestX() const { return closestX_; }
697 float getClosestY() const { return closestY_; }
699 float getClosestZ() const { return closestZ_; }
701 float getClosestNormalX() const { return closestNormalX_; }
703 float getClosestNormalY() const { return closestNormalY_; }
705 float getClosestNormalZ() const { return closestNormalZ_; }
707 float getClosestDistance() const { return closestDistance_; }
708
710 bool hasShapeCastHit() const { return shapeCastBodyId_ >= 0; }
712 int getShapeCastBodyId() const { return shapeCastBodyId_; }
714 int getShapeCastShapeId() const { return shapeCastShapeId_; }
716 int getShapeCastShapeTag() const { return shapeCastShapeTag_; }
718 int getShapeCastMaterialId() const { return shapeCastMaterialId_; }
720 int getShapeCastTriangleIndex() const { return shapeCastTriangleIndex_; }
722 float getShapeCastX() const { return shapeCastX_; }
724 float getShapeCastY() const { return shapeCastY_; }
726 float getShapeCastZ() const { return shapeCastZ_; }
728 float getShapeCastNormalX() const { return shapeCastNormalX_; }
730 float getShapeCastNormalY() const { return shapeCastNormalY_; }
732 float getShapeCastNormalZ() const { return shapeCastNormalZ_; }
734 float getShapeCastFraction() const { return shapeCastFraction_; }
736 int getShapeCastResultCount() const { return static_cast<int>(shapeCastResults_.size()); }
748 float getShapeCastResultX(int index) const;
750 float getShapeCastResultY(int index) const;
752 float getShapeCastResultZ(int index) const;
761
767 bool moveCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius,
768 float dx, float dy, float dz);
777 [[nodiscard]] eve::Result<CapsuleMove3D> moveCapsuleOwned(
778 float ax, float ay, float az, float bx, float by, float bz, float radius, float dx,
779 float dy, float dz, QueryFilter3D filter = {}, CapsuleMovePolicy3D policy = {});
781 float getMoverDeltaX() const { return moverDeltaX_; }
783 float getMoverDeltaY() const { return moverDeltaY_; }
785 float getMoverDeltaZ() const { return moverDeltaZ_; }
787 float getMoverNormalX() const { return moverNormalX_; }
789 float getMoverNormalY() const { return moverNormalY_; }
791 float getMoverNormalZ() const { return moverNormalZ_; }
793 int getMoverPlaneCount() const { return moverPlaneCount_; }
795 int getMoverIterations() const { return moverIterations_; }
797 void setMoverUp(float x, float y, float z);
799 void setMoverSlopeLimit(float degrees);
801 bool isMoverGrounded() const { return moverGrounded_; }
803 float getMoverGroundDot() const { return moverGroundDot_; }
804
806 int getQueryCount() const { return static_cast<int>(queryBodyIds_.size()); }
808 int getQueryBodyId(int index) const;
810 int getQueryShapeCount() const { return static_cast<int>(queryShapes_.size()); }
812 int getQueryShapeId(int index) const;
814 int getQueryShapeTag(int index) const;
815
817 int getBeginContactCount() const { return static_cast<int>(beginContacts_.size()); }
831 int getEndContactCount() const { return static_cast<int>(endContacts_.size()); }
844
846 int getBeginTriggerCount() const { return static_cast<int>(beginTriggers_.size()); }
860 int getEndTriggerCount() const { return static_cast<int>(endTriggers_.size()); }
874 void clearContactEvents();
875
886 [[nodiscard]] eve::Result<BodyContacts3D> queryBodyContactsOwned(PhysicsBodyHandle body, int maxPoints) const;
887
894 int queryBodyContacts(int bodyId, int maxPoints);
896 int getContactPointCount() const { return static_cast<int>(contactPoints_.size()); }
908 float getContactPointX(int index) const;
910 float getContactPointY(int index) const;
912 float getContactPointZ(int index) const;
928 bool isContactPointPersisted(int index) const;
929
931 int getHitCount() const { return static_cast<int>(hits_.size()); }
933 int getHitBodyAId(int index) const;
935 int getHitBodyBId(int index) const;
937 int getHitShapeAId(int index) const;
939 int getHitShapeBId(int index) const;
941 int getHitShapeATag(int index) const;
943 int getHitShapeBTag(int index) const;
945 float getHitPointX(int index) const;
947 float getHitPointY(int index) const;
949 float getHitPointZ(int index) const;
951 float getHitNormalX(int index) const;
953 float getHitNormalY(int index) const;
955 float getHitNormalZ(int index) const;
957 float getHitApproachSpeed(int index) const;
959 float getHitNormalImpulse(int index) const;
961 int getJointStressCount() const { return static_cast<int>(jointStressEvents_.size()); }
969 int getJointStressKind(int index) const;
971 float getJointStressForceX(int index) const;
973 float getJointStressForceY(int index) const;
975 float getJointStressForceZ(int index) const;
977 float getJointStressTorqueX(int index) const;
979 float getJointStressTorqueY(int index) const;
981 float getJointStressTorqueZ(int index) const;
983 void setQueryFilter(int categoryBits, int maskBits);
985 void resetQueryFilter();
987 int getQueryCategoryBits() const { return static_cast<int>(queryCategoryBits_); }
989 int getQueryMaskBits() const { return static_cast<int>(queryMaskBits_); }
991 void setQueryIgnoredBodyId(int bodyId);
993 void setQueryIgnoredShapeId(int shapeId);
995 int getQueryIgnoredBodyId() const { return queryIgnoredBodyId_; }
997 int getQueryIgnoredShapeId() const { return queryIgnoredShapeId_; }
999 void clearQueryIgnores();
1000
1002 bool isValid() const;
1003
1008 bool pointProbe(float x, float y, float z, float radius, ClothContact3D *out) const;
1010 [[nodiscard]] ClothProbeStatus pointProbeFiltered(float x, float y, float z, float radius, ClothContact3D *out,
1011 uint64_t categoryBits, uint64_t maskBits) const;
1016 void forgetBody(Body3D *body);
1017 void forgetShape(Shape3D *shape);
1019 void forgetJoint(Joint3D *joint);
1021 void forgetMechanism(Mechanism3D *mechanism);
1023 void registerShapeHandle(Shape3D *shape);
1025 void updateShapeTag(Shape3D *shape);
1026
1028 int nextBodyId();
1030 PhysicsBodyHandle nextBodyRuntimeHandle();
1032 PhysicsShapeHandle nextShapeRuntimeHandle();
1034 PhysicsJointHandle nextJointRuntimeHandle();
1036 int nextShapeId() { return nextShapeId_++; }
1038 int nextJointId() { return nextJointId_++; }
1040 int nextMechanismId();
1041
1043 void emitContactEvents();
1044
1045private:
1047 friend struct box3d::Access;
1049 std::shared_ptr<ForceStepState> pendingForceStep_;
1050 [[nodiscard]] Result<void> validateForceStep(const SimulationStep &step) const;
1051 void finishForceStep() noexcept;
1052 void cancelForceStep() noexcept;
1053 friend class action_adapter::ActionCollisionIgnoreState;
1054 friend struct WorldSnapshotAccess;
1056 [[nodiscard]] Result<SnapshotEnvelope> snapshotPortable(const SnapshotHashProvider &) const;
1057 [[nodiscard]] Result<void> restorePortable(const SnapshotEnvelope &, const SnapshotHashProvider &);
1058 friend class Body3D;
1059 friend class Joint3D;
1060 friend class Mechanism3D;
1061 friend class Coupling3D;
1062 friend class ForceBatch;
1063 friend class Shape3D;
1065 friend void registerCameraObstructionWorld(World3D *world);
1066
1067 World3D(float gravityX, float gravityY, float gravityZ, bool sleep, eve::PersistentId instanceId,
1068 bool registerQueries, RigidBackend3D backend);
1069
1070 RigidBackend3D rigidBackendKind_ = RigidBackend3D::Box3D;
1071 std::unique_ptr<IWorldBackend3D> rigidBackend_;
1072 std::map<int, Coupling3D *> couplings3D_;
1073 int nextCoupling3DId_ = 1;
1074 bool couplingStepActive_ = false;
1075 void invalidateCouplings3D() noexcept;
1076 void adoptCouplings3D(World3D &prepared) noexcept;
1077 void releaseCouplingsForBody(PhysicsBodyHandle body) noexcept;
1078 void releaseCouplingsForJoint(PhysicsJointHandle joint) noexcept;
1079 [[nodiscard]] Result<void> stepCoupledBackend(const SimulationStep &step, const SimulationSettings &settings);
1080 std::unique_ptr<ISimulationBackend> simulation_;
1081 std::uint64_t queryEpoch_ = 1;
1082 PhysicsWorldHandle runtimeHandle_ = PhysicsWorldHandle::invalid();
1083 eve::PersistentId instanceId_ = eve::PersistentId::nil();
1084 std::shared_ptr<const void> queryLifetime_ = std::make_shared<int>(0);
1085 bool destroyed_ = false;
1086 int nextId_ = 1;
1087 int nextShapeId_ = 1;
1088 int nextJointId_ = 1;
1089 int nextMechanismId_ = 1;
1090 std::uint32_t nextBodyHandleIndex_ = 1u;
1091 std::uint32_t nextShapeHandleIndex_ = 1u;
1092 std::uint32_t nextJointHandleIndex_ = 1u;
1093 eve::SimulationTick simulationTick_ = eve::SimulationTick::zero();
1094 eve::Status backendSelectionStatus_ = eve::Status::success();
1095 bool backendFallback_ = false;
1096
1097 std::unordered_set<Body3D *> bodies_;
1098 std::unordered_set<Shape3D *> shapes_;
1099 std::unordered_set<Joint3D *> joints_;
1100 std::unordered_set<Mechanism3D *> mechanisms_;
1101 std::vector<std::unique_ptr<Body3D>> restoredBodies_;
1102 std::vector<std::unique_ptr<Shape3D>> restoredShapes_;
1103 std::vector<std::unique_ptr<Joint3D>> restoredJoints_;
1104 std::vector<std::unique_ptr<Coupling3D>> restoredCouplings3D_;
1105 std::unordered_set<uint64_t> disabledBodyPairs_;
1106 std::unordered_set<uint64_t> disabledShapePairs_;
1107 std::unordered_map<uint64_t, EventShape> shapeRecords_;
1108 std::unordered_map<PhysicsShapeHandle, Shape3D *> shapeHandles_;
1109 std::unordered_map<uint64_t, PhysicsShapeHandle> shapeRawHandles_;
1110 std::unordered_map<PhysicsJointHandle, Joint3D *> jointHandles_;
1111 std::vector<ContactEvent> beginContacts_;
1112 std::vector<ContactEvent> endContacts_;
1113 std::vector<TriggerEvent> beginTriggers_;
1114 std::vector<TriggerEvent> endTriggers_;
1115 std::vector<HitEvent> hits_;
1116 std::vector<JointStressEvent> jointStressEvents_;
1117
1119 std::vector<ContactPointResult> contactPoints_;
1120 [[nodiscard]] eve::Result<void> prepareRuntimeHandleRefresh(std::size_t bodyCount, std::size_t shapeCount,
1121 std::size_t jointCount) const;
1122 void refreshRuntimeHandlesAfterRestore();
1123 void indexShapeHandle(Shape3D *shape);
1124 void adoptPreparedTopology(World3D &prepared);
1125 const ContactPointResult &contactPointAt(int index, const char *operation) const;
1126 void refreshContactFilter(Shape3D *shape);
1127 void removeCollisionOverridesForBody(int bodyId);
1128 void removeCollisionOverridesForShape(int shapeId);
1129
1130 const ContactEvent &contactEventAt(const std::vector<ContactEvent> &events, int index,
1131 const char *operation) const;
1132 const TriggerEvent &triggerEventAt(const std::vector<TriggerEvent> &events, int index,
1133 const char *operation) const;
1134 const HitEvent &hitEventAt(int index, const char *operation) const;
1135 const JointStressEvent &jointStressEventAt(int index, const char *operation) const;
1136
1137 int rayHitBodyId_ = -1;
1138 int rayHitShapeId_ = -1;
1139 int rayHitShapeTag_ = 0;
1140 int rayHitMaterialId_ = 0;
1141 int rayHitTriangleIndex_ = -1;
1142 float rayHitX_ = 0.f;
1143 float rayHitY_ = 0.f;
1144 float rayHitZ_ = 0.f;
1145 float rayHitNormalX_ = 0.f;
1146 float rayHitNormalY_ = 0.f;
1147 float rayHitNormalZ_ = 0.f;
1148 float rayHitFraction_ = 0.f;
1149
1150 struct RayResult {
1151 int bodyId = -1;
1152 int shapeId = -1;
1153 int shapeTag = 0;
1154 int materialId = 0;
1155 int triangleIndex = -1;
1156 float x = 0.f, y = 0.f, z = 0.f;
1157 float normalX = 0.f, normalY = 0.f, normalZ = 0.f;
1158 float fraction = 0.f;
1159 };
1160 std::vector<RayResult> rayResults_;
1161 const RayResult &rayResultAt(int index, const char *operation) const;
1162
1163 std::vector<int> queryBodyIds_;
1164 std::vector<std::pair<int, int>> queryShapes_;
1165
1166
1167 int shapeCastBodyId_ = -1;
1168 int shapeCastShapeId_ = -1;
1169 int shapeCastShapeTag_ = 0;
1170 int shapeCastMaterialId_ = 0;
1171 int shapeCastTriangleIndex_ = -1;
1172 float shapeCastX_ = 0.f, shapeCastY_ = 0.f, shapeCastZ_ = 0.f;
1173 float shapeCastNormalX_ = 0.f, shapeCastNormalY_ = 0.f, shapeCastNormalZ_ = 0.f;
1174 float shapeCastFraction_ = 0.f;
1175 struct ShapeCastResult {
1176 int bodyId = -1;
1177 int shapeId = -1;
1178 int shapeTag = 0;
1179 int materialId = 0;
1180 int triangleIndex = -1;
1181 float x = 0.f, y = 0.f, z = 0.f;
1182 float normalX = 0.f, normalY = 0.f, normalZ = 0.f;
1183 float fraction = 0.f;
1184 };
1185 std::vector<ShapeCastResult> shapeCastResults_;
1186 const ShapeCastResult &shapeCastResultAt(int index, const char *operation) const;
1187
1188 int closestBodyId_ = -1;
1189 int closestShapeId_ = -1;
1190 int closestShapeTag_ = 0;
1191 float closestX_ = 0.f, closestY_ = 0.f, closestZ_ = 0.f;
1192 float closestNormalX_ = 0.f, closestNormalY_ = 0.f, closestNormalZ_ = 0.f;
1193 float closestDistance_ = 0.f;
1194
1195 float moverDeltaX_ = 0.f, moverDeltaY_ = 0.f, moverDeltaZ_ = 0.f;
1196 float moverNormalX_ = 0.f, moverNormalY_ = 0.f, moverNormalZ_ = 0.f;
1197 int moverPlaneCount_ = 0;
1198 int moverIterations_ = 0;
1199 float moverSlopeCos_ = 0.6427876f;
1200 float moverGroundDot_ = -1.f;
1201 bool moverGrounded_ = false;
1202
1203 float contactHertz_ = 30.f;
1204 float contactDampingRatio_ = 10.f;
1205 float contactPushOutSpeed_ = 3.f;
1206
1207 struct ExplosionResult {
1208 int bodyId = -1;
1209 float deltaVX = 0.f, deltaVY = 0.f, deltaVZ = 0.f;
1210 float deltaWX = 0.f, deltaWY = 0.f, deltaWZ = 0.f;
1211 };
1212 std::vector<ExplosionResult> explosionResults_;
1213 const ExplosionResult &explosionResultAt(int index, const char *operation) const;
1214
1215 uint32_t queryCategoryBits_ = 0xFFFFFFFFu;
1216 uint32_t queryMaskBits_ = 0xFFFFFFFFu;
1217 int queryIgnoredBodyId_ = -1;
1218 int queryIgnoredShapeId_ = -1;
1219};
1220
1221} // namespace eve::physics
double z
double y
double x
ActionParameterOperation operation
Vocabulary aliases for nullable and checked borrowed references.
float degrees
Definition CardTypes.cpp:38
int instanceId
#define EVENGINE_API_WORLD
Definition Export.h:109
ShaderImageInput shape
float u
Definition Grass.cpp:233
std::uint32_t height
std::uint32_t width
void(* destroy)(void *)
float dampingRatio
bool collideConnected
float length
Snapshot snapshot
double radius
Definition MeleeHit.cpp:42
float distance
OceanWakeSettings settings
OceanRenderBackend backend
ssq::Object frame
glm::dvec3 dx
glm::dvec3 dz
double dt
Owning, generation-qualified results for cross-module 3D physics queries.
std::vector< particles::ParticleRecordEvent > events
float f
Process-local, generation-qualified handles owned by the physics domain.
PrimitiveHandle handle
std::string body
Move-only, checked operation results for the common layer.
RoadLaneDirection direction
float axisZ
Definition RockMesh.cpp:22
float axisY
Definition RockMesh.cpp:22
float axisX
Definition RockMesh.cpp:22
std::string filter
ScriptStructure out
std::string kind
float dy
Definition Shadow.cpp:151
Backend-neutral, observable fixed-step contract for physics domains.
Versioned, integrity-checked persistence envelopes.
float step
Definition TreeMesh.cpp:451
std::uint32_t depth
uint32_t index
float fraction
Contact contact
int shapeId
std::array< double, 3 > impulse
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Structured status and zero or more diagnostics for an operation.
Definition Status.h:70
Id128 public API.
Definition Identity.h:111
static constexpr Id128 nil() noexcept
Returns the all-zero nil value.
Definition Identity.h:141
Backend-neutral 3D rigid body in meter-space coordinates (+Y up by convention). Owned by a World3D; c...
Definition Body3D.h:31
Owning 3D transmission constraint, stepped transactionally by its World3D. @ownership Caller/VM owns ...
Definition Coupling3D.h:50
Move-only, single-use collection of validated force requests. @ownership Owns values and handles only...
Definition ForceBatch.h:26
Minimal observable contract for physics simulation providers.
Complete rigid-world execution boundary, bound once to an owning World3D facade. @ownership Owns exac...
Script-facing joint owned by a World3D. Legacy scalar/void methods adapt the checked backend contract...
Definition Joint3D.h:27
Composed mechanical assembly owned by a World3D.
Definition Mechanism3D.h:25
3D shape (box/sphere/capsule) attached to a Body3D with material settings. Created via Body3D::new*Sh...
Definition Shape3D.h:34
Read-only 3D physics implementation of sensing's LOS capability.
Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixe...
Definition World3D.h:47
bool hasClosestPoint() const
Whether the latest closestPoint call found a shape.
Definition World3D.h:687
int getBeginTriggerVisitorShapeId(int index) const
Visitor shape ID of a begin-trigger event.
int getBeginContactShapeAId(int index) const
Shape ID on stable side A of a begin-contact event.
float getShapeCastX() const
World-space contact point X from the last shape cast.
Definition World3D.h:722
int getEndTriggerCount() const
Number of sensor overlaps that ended during the latest step.
Definition World3D.h:860
float getJointStressForceY(int index) const
Constraint force Y of a stress event.
int getClosestShapeId() const
Stable shape id from the latest closestPoint call, or -1.
Definition World3D.h:691
float getContactPointTotalNormalImpulse(int index) const
Total normal impulse accumulated across all physics substeps.
int getRayHitTriangleIndex() const
Mesh/height-field triangle index from the last ray cast, otherwise -1.
Definition World3D.h:530
float getHitNormalX(int index) const
Hit normal X, pointing from stable side A to B.
bool hasRayHit() const
Definition World3D.h:521
eve::PersistentId persistentId() const noexcept
Stable non-nil identity written to snapshot envelopes.
Definition World3D.h:147
int getShapeCastResultShapeId(int index) const
Shape ID of a sorted Shape Cast result.
float getClosestY() const
Closest surface point Y.
Definition World3D.h:697
int getBeginTriggerSensorBodyId(int index) const
Sensor body ID of a begin-trigger event.
float getHitPointZ(int index) const
World-space impact point Z.
float getContactPushOutSpeed() const
Current maximum contact push-out speed in m/s.
Definition World3D.h:223
float getContactPointNormalImpulse(int index) const
Normal impulse from the final physics substep.
int getEndContactShapeBId(int index) const
Shape ID on stable side B of an end-contact event.
float getShapeCastResultFraction(int index) const
Translation fraction in [0,1] of a Shape Cast result.
int getClosestShapeTag() const
User tag of the shape from the latest closestPoint call, or zero.
Definition World3D.h:693
PhysicsWorldHandle runtimeHandle() const noexcept
Process-local identity used by PhysicsLink; invalid after destruction.
Definition World3D.h:136
int getEndContactBodyAId(int index) const
Body ID on stable side A of an end-contact event.
int getEndContactShapeATag(int index) const
Shape Tag on stable side A of an end-contact event.
int getShapeCastShapeId() const
Stable shape id from the last shape cast, or -1.
Definition World3D.h:714
int getRayResultTriangleIndex(int index) const
Mesh/height-field triangle index of a sorted ray result, otherwise -1.
float getRayHitX() const
Definition World3D.h:531
float getShapeCastZ() const
World-space contact point Z from the last shape cast.
Definition World3D.h:726
float getContactPointX(int index) const
World-space contact point X on the queried body.
std::weak_ptr< const void > lifetimeToken() const noexcept
Return a weak lifetime token for owner-thread runtime integrations.
Definition World3D.h:145
int getBeginContactBodyBId(int index) const
Body ID on stable side B of a begin-contact event.
float getRayHitY() const
Definition World3D.h:532
int getContactPointOtherShapeId(int index) const
Other Shape ID of a contact point.
float getContactDampingRatio() const
Current contact damping ratio.
Definition World3D.h:221
float getMoverNormalY() const
Representative blocking normal Y from the last move.
Definition World3D.h:789
int getQueryShapeCount() const
Number of individual shapes hit by the last overlap query.
Definition World3D.h:810
float getExplosionResultDeltaVelocityX(int index) const
Explosion-induced linear velocity delta X.
World3D(const World3D &)=delete
World3D & operator=(const World3D &)=delete
int getQueryCount() const
Number of bodies hit by the last overlap query.
Definition World3D.h:806
float getRayResultNormalY(int index) const
Surface normal Y of a sorted ray result.
float getContactHertz() const
Current contact stiffness frequency.
Definition World3D.h:219
float getRayHitNormalX() const
Definition World3D.h:534
float getContactPointSeparation(int index) const
Signed surface separation; negative values indicate penetration.
int getHitShapeBId(int index) const
Stable Shape ID on side B of a hit.
float getClosestNormalX() const
Surface-to-target normal X, or zero for an inside/on-surface target.
Definition World3D.h:701
int getQueryMaskBits() const
Query mask bits currently in use.
Definition World3D.h:989
float getMoverDeltaZ() const
Resolved translation Z from the last moveCapsule call.
Definition World3D.h:785
int getHitCount() const
Number of significant collision hits generated during the latest step.
Definition World3D.h:931
int getJointStressKind(int index) const
Joint kind code: 0 distance, 1 revolute, 2 prismatic, 3 spherical, 4 wheel.
int getShapeCastShapeTag() const
User tag of the shape from the last shape cast, or zero on no hit.
Definition World3D.h:716
float getRayHitNormalZ() const
Definition World3D.h:536
float getMoverDeltaY() const
Resolved translation Y from the last moveCapsule call.
Definition World3D.h:783
float getHitPointX(int index) const
World-space impact point X.
int getBeginTriggerCount() const
Number of sensor overlaps that began during the latest step.
Definition World3D.h:846
int getExplosionResultBodyId(int index) const
Stable Body ID of an affected body, sorted ascending.
int getQueryCategoryBits() const
Query category bits currently in use.
Definition World3D.h:987
float getMoverNormalZ() const
Representative blocking normal Z from the last move.
Definition World3D.h:791
int getBeginTriggerVisitorShapeTag(int index) const
Visitor Shape Tag of a begin-trigger event.
int getEndContactShapeBTag(int index) const
Shape Tag on stable side B of an end-contact event.
float getClosestDistance() const
Non-negative distance from the target to the closest shape.
Definition World3D.h:707
int getHitBodyBId(int index) const
Stable body ID on side B of a hit.
int nextJointId()
Internal: next stable joint id.
Definition World3D.h:1038
int getContactPointShapeTag(int index) const
Queried-body Shape Tag of a contact point.
float getHitNormalImpulse(int index) const
Total normal impulse accumulated across all manifolds and substeps.
int getHitShapeAId(int index) const
Stable Shape ID on side A of a hit.
float getShapeCastNormalZ() const
Contact normal Z from the last shape cast.
Definition World3D.h:732
float getContactPointY(int index) const
World-space contact point Y on the queried body.
float getContactPointNormalY(int index) const
Contact normal Y from queried body toward the other body.
int getBeginContactCount() const
Number of non-sensor contacts that began during the latest step.
Definition World3D.h:817
int getJointStressBodyAId(int index) const
Stable body A ID of a stress event.
float getShapeCastResultNormalZ(int index) const
Contact normal Z of a Shape Cast result.
int getEndContactCount() const
Number of non-sensor contacts that ended during the latest step.
Definition World3D.h:831
int getRayResultShapeId(int index) const
Shape ID of a sorted ray result.
int getBeginTriggerSensorShapeId(int index) const
Sensor shape ID of a begin-trigger event.
int getJointStressCount() const
Number of joints exceeding force/torque thresholds in the latest step.
Definition World3D.h:961
float getShapeCastResultY(int index) const
World-space contact point Y of a Shape Cast result.
int getShapeCastTriangleIndex() const
Mesh/height-field triangle index from the latest shape cast, otherwise -1.
Definition World3D.h:720
float getMoverDeltaX() const
Resolved translation X from the last moveCapsule call.
Definition World3D.h:781
int getShapeCastMaterialId() const
Surface material ID at the last shape-cast intersection, or zero.
Definition World3D.h:718
float getRayResultFraction(int index) const
Segment fraction in [0,1] of a sorted ray result.
float getClosestZ() const
Closest surface point Z.
Definition World3D.h:699
int nextShapeId()
Internal: next stable shape id.
Definition World3D.h:1036
int getEndTriggerSensorShapeTag(int index) const
Sensor Shape Tag of an end-trigger event.
int getBeginContactShapeATag(int index) const
Shape Tag on stable side A of a begin-contact event.
int getContactPointOtherBodyId(int index) const
Other Body ID of a contact point.
int getEndTriggerSensorShapeId(int index) const
Sensor shape ID of an end-trigger event.
float getShapeCastResultNormalX(int index) const
Contact normal X of a Shape Cast result.
int getClosestBodyId() const
Stable body id from the latest closestPoint call, or -1.
Definition World3D.h:689
float getContactPointZ(int index) const
World-space contact point Z on the queried body.
int getBeginContactShapeBTag(int index) const
Shape Tag on stable side B of a begin-contact event.
float getExplosionResultDeltaAngularVelocityY(int index) const
Explosion-induced angular velocity delta Y.
float getExplosionResultDeltaVelocityY(int index) const
Explosion-induced linear velocity delta Y.
float getRayResultX(int index) const
World-space hit point X of a sorted ray result.
int getEndTriggerVisitorShapeId(int index) const
Visitor shape ID of an end-trigger event.
int getQueryIgnoredShapeId() const
Stable Shape3D ID currently ignored by queries, or -1.
Definition World3D.h:997
int getEndTriggerVisitorShapeTag(int index) const
Visitor Shape Tag of an end-trigger event.
int getShapeCastBodyId() const
Stable body id from the last shape cast, or -1.
Definition World3D.h:712
float getShapeCastY() const
World-space contact point Y from the last shape cast.
Definition World3D.h:724
int getContactPointShapeId(int index) const
Queried-body Shape ID of a contact point.
float getExplosionResultDeltaAngularVelocityX(int index) const
Explosion-induced angular velocity delta X.
float getShapeCastResultX(int index) const
World-space contact point X of a Shape Cast result.
int getRayHitMaterialId() const
Surface material ID at the last ray intersection, or zero.
Definition World3D.h:528
RigidBackend3D rigidBackendKind() const noexcept
Returns the immutable rigid solver identity; constant-time, simulation thread.
Definition World3D.h:104
float getJointStressForceZ(int index) const
Constraint force Z of a stress event.
int getShapeCastResultTriangleIndex(int index) const
Mesh/height-field triangle index of a Shape Cast result, otherwise -1.
float getClosestNormalZ() const
Surface-to-target normal Z, or zero for an inside/on-surface target.
Definition World3D.h:705
std::uint64_t queryEpoch() const noexcept
Monotonic query binding revision; successful restore invalidates prior sessions.
Definition World3D.h:645
int getExplosionResultCount() const
Number of bodies affected by the latest explosion.
Definition World3D.h:250
float getShapeCastResultZ(int index) const
World-space contact point Z of a Shape Cast result.
int getRayHitShapeTag() const
User tag of the shape from the last ray cast, or zero on no hit.
Definition World3D.h:526
int getHitShapeBTag(int index) const
Shape Tag on side B of a hit.
float getClosestNormalY() const
Surface-to-target normal Y, or zero for an inside/on-surface target.
Definition World3D.h:703
int getHitBodyAId(int index) const
Stable body ID on side A of a hit.
float getJointStressForceX(int index) const
Constraint force X of a stress event.
float getContactPointNormalVelocity(int index) const
Pre-solve relative normal velocity; negative means approaching.
int getRayResultShapeTag(int index) const
Shape Tag of a sorted ray result.
int getShapeCastResultShapeTag(int index) const
Shape Tag of a sorted Shape Cast result.
float getShapeCastFraction() const
Translation fraction in [0,1] at the earliest hit.
Definition World3D.h:734
int getBeginContactShapeBId(int index) const
Shape ID on stable side B of a begin-contact event.
int getEndTriggerSensorBodyId(int index) const
Sensor body ID of an end-trigger event.
int getEndTriggerVisitorBodyId(int index) const
Visitor body ID of an end-trigger event.
float getShapeCastNormalX() const
Contact normal X from the last shape cast.
Definition World3D.h:728
int getQueryIgnoredBodyId() const
Stable Body3D ID currently ignored by queries, or -1.
Definition World3D.h:995
int getContactPointCount() const
Number of points cached by queryBodyContacts.
Definition World3D.h:896
float getExplosionResultDeltaAngularVelocityZ(int index) const
Explosion-induced angular velocity delta Z.
float getRayResultNormalX(int index) const
Surface normal X of a sorted ray result.
float getShapeCastResultNormalY(int index) const
Contact normal Y of a Shape Cast result.
int getJointStressBodyBId(int index) const
Stable body B ID of a stress event.
int getEndContactShapeAId(int index) const
Shape ID on stable side A of an end-contact event.
float getRayHitZ() const
Definition World3D.h:533
float getContactPointNormalX(int index) const
Contact normal X from queried body toward the other body.
float getShapeCastNormalY() const
Contact normal Y from the last shape cast.
Definition World3D.h:730
float getHitNormalY(int index) const
Hit normal Y, pointing from stable side A to B.
float getHitApproachSpeed(int index) const
Positive pre-solve approach speed in m/s.
bool hasShapeCastHit() const
Whether the last sphere, capsule, or box cast hit a body.
Definition World3D.h:710
int getRayHitBodyId() const
Definition World3D.h:522
float getClosestX() const
Closest surface point X.
Definition World3D.h:695
float getMoverNormalX() const
Representative blocking normal X from the last move.
Definition World3D.h:787
int getShapeCastResultMaterialId(int index) const
Surface material ID at a sorted Shape Cast intersection.
int getEndContactBodyBId(int index) const
Body ID on stable side B of an end-contact event.
int getRayResultCount() const
Number of results cached by the latest rayCast or rayCastAll call.
Definition World3D.h:539
float getExplosionResultDeltaVelocityZ(int index) const
Explosion-induced linear velocity delta Z.
bool usedBackendFallback() const noexcept
Whether optional accelerator selection fell back to CPU.
Definition World3D.h:153
float getHitNormalZ(int index) const
Hit normal Z, pointing from stable side A to B.
int getBeginTriggerSensorShapeTag(int index) const
Sensor Shape Tag of a begin-trigger event.
float getRayResultNormalZ(int index) const
Surface normal Z of a sorted ray result.
float getRayHitFraction() const
Definition World3D.h:537
int getShapeCastResultBodyId(int index) const
Body ID of a sorted Shape Cast result.
int getHitShapeATag(int index) const
Shape Tag on side A of a hit.
float getJointStressTorqueY(int index) const
Constraint torque Y of a stress event.
int getJointStressJointId(int index) const
Stable Joint3D ID of a stress event.
int getBeginContactBodyAId(int index) const
Body ID on stable side A of a begin-contact event.
int getBeginTriggerVisitorBodyId(int index) const
Visitor body ID of a begin-trigger event.
float getJointStressTorqueZ(int index) const
Constraint torque Z of a stress event.
int getMoverIterations() const
Number of outer solver passes used by the last move.
Definition World3D.h:795
float getRayResultY(int index) const
World-space hit point Y of a sorted ray result.
float getRayHitNormalY() const
Definition World3D.h:535
int getShapeCastResultCount() const
Number of results cached by the latest single or multi Shape Cast.
Definition World3D.h:736
int getMoverPlaneCount() const
Number of collision planes considered during the last move.
Definition World3D.h:793
float getJointStressTorqueX(int index) const
Constraint torque X of a stress event.
int getContactPointOtherShapeTag(int index) const
Other Shape Tag of a contact point.
int getRayHitShapeId() const
Stable shape id from the last ray cast, or -1.
Definition World3D.h:524
float getHitPointY(int index) const
World-space impact point Y.
int getRayResultBodyId(int index) const
Body ID of a sorted ray result.
int getRayResultMaterialId(int index) const
Surface material ID at a sorted ray intersection.
float getContactPointNormalZ(int index) const
Contact normal Z from queried body toward the other body.
float getMoverGroundDot() const
Largest dot product between mover up and a contact normal.
Definition World3D.h:803
bool isMoverGrounded() const
True when the last move touched a walkable plane.
Definition World3D.h:801
float getRayResultZ(int index) const
World-space hit point Z of a sorted ray result.
Optional physics backend for vehicle mobility and body attach.
Definition Climbing.h:36
SimulationBackendKind
Kind of implementation that owns a simulation step.
RigidBackend3D
Solver identity fixed for the lifetime of one world; independent of CPU/GPU execution.
SimulationDeterminism
Determinism guarantee made by a simulation backend.
ClothProbeStatus
Named outcome for a filtered cloth particle probe.
Build metadata (engine git commit, build time, third-party version).
Definition Build.cpp:16
std::function< Result< ContentId >(std::string_view canonicalInput)> SnapshotHashProvider
Injected content-digest implementation used by snapshots.
Definition Snapshot.h:36
bool enabled
One deterministic fixed-step emitted by SimulationClock.
Definition Time.h:158
Stable outer format shared by persistence and cross-process snapshots.
Definition Snapshot.h:46
Owning sphere sweep contact; position is the moving sphere center, not the obstacle surface.
Immutable per-binding sphere and filter policy.
Owning contact point, oriented from the queried body toward its neighbour.
CameraSphereHit3D public API.
Definition World3DTypes.h:5
Per-call capsule mover classification policy; never mutates persistent World3D settings.
Result of a 3D point probe: deepest non-sensor shape within radius. Normal points from the shape towa...
Query filter applied atomically for one owning query operation.
Observable backend progress shared by CPU and accelerator providers.
Validated solver policy for one simulation step.
Begin/end event for two non-sensor shapes.
Definition World3D.h:57
Stable snapshot describing one side of a 3D collision event.
Definition World3D.h:50
Significant collision containing world-space feedback data.
Definition World3D.h:69
Joint whose solver force or torque exceeded a configured threshold.
Definition World3D.h:78
Begin/end overlap event with an explicit sensor and visitor side.
Definition World3D.h:63
Private bridge used exclusively by Box3D composition and native query code.
Definition Box3DBody.h:15