载入中...
搜索中...
未找到

Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixels + Physics.setMeter. 更多...

#include <World3D.h>

类

struct  ContactEvent
 Begin/end event for two non-sensor shapes. 更多...
 
struct  EventShape
 Stable snapshot describing one side of a 3D collision event. 更多...
 
struct  HitEvent
 Significant collision containing world-space feedback data. 更多...
 
struct  JointStressEvent
 Joint whose solver force or torque exceeded a configured threshold. 更多...
 
struct  TriggerEvent
 Begin/end overlap event with an explicit sensor and visitor side. 更多...
 

Public 成员函数

 World3D (float gravityX, float gravityY, float gravityZ, bool sleep, eve::PersistentId instanceId=eve::PersistentId::nil())
 Creates a 3D physics world.
 
 ~World3D ()
 
 World3D (const World3D &)=delete
 
World3D & operator= (const World3D &)=delete
 
void update (float dt)
 Steps the simulation by dt seconds (default substep count).
 
void updateFull (float dt, int subStepCount)
 Steps with an explicit substep count.
 
eve::Result< void > step (const eve::SimulationStep &step, const SimulationSettings &settings={})
 Advances the 3D domain with an injected deterministic step.
 
SimulationObservation simulationObservation () const noexcept
 Snapshot of completed backend steps and logical simulation time.
 
SimulationBackendKind backendKind () const noexcept
 Selected CPU/GPU/mock backend family.
 
SimulationDeterminism backendDeterminism () const noexcept
 Replay/numeric guarantee declared by the selected backend.
 
eve::SimulationTick simulationTick () const noexcept
 Current deterministic tick; save data should persist this value.
 
PhysicsWorldHandle runtimeHandle () const noexcept
 Process-local identity used by PhysicsLink; invalid after destruction.
 
std::weak_ptr< const void > lifetimeToken () const noexcept
 Return a weak lifetime token for owner-thread runtime integrations.
 
eve::PersistentId persistentId () const noexcept
 Stable non-nil identity written to snapshot envelopes.
 
bool usedBackendFallback () const noexcept
 Whether optional accelerator selection fell back to CPU.
 
eve::Status backendSelectionStatus () const
 Selection status, including a structured absent-capability warning.
 
eve::Result< eve::SnapshotEnvelope > snapshot (const eve::SnapshotHashProvider &hashProvider) const
 Captures a versioned, integrity-checked 3D world snapshot.
 
eve::Result< void > restore (const eve::SnapshotEnvelope &snapshot, const eve::SnapshotHashProvider &hashProvider)
 Restores a verified snapshot without exposing partial state.
 
void setGravity (float gx, float gy, float gz)
 Gravity in m/s².
 
float getGravityX () const
 
float getGravityY () const
 
float getGravityZ () const
 
void setContinuousCollisionEnabled (bool enabled)
 Enables world-level continuous collision against static geometry.
 
bool isContinuousCollisionEnabled () const
 Whether world-level continuous collision is enabled.
 
void setRestitutionThreshold (float speed)
 Minimum impact speed that permits material restitution, in m/s.
 
float getRestitutionThreshold () const
 Current restitution speed threshold in m/s.
 
void setHitEventThreshold (float speed)
 Minimum approach speed in m/s required for enabled Shape3D hit events.
 
float getHitEventThreshold () const
 Current significant-hit speed threshold in m/s.
 
void setBodyPairCollisionEnabled (Body3D *bodyA, Body3D *bodyB, bool enabled)
 Overrides collision for a live body pair without changing layer masks.
 
bool isBodyPairCollisionEnabled (Body3D *bodyA, Body3D *bodyB) const
 Whether a body pair is permitted by the runtime contact override.
 
void setShapePairCollisionEnabled (Shape3D *shapeA, Shape3D *shapeB, bool enabled)
 Overrides collision for one live shape pair.
 
bool isShapePairCollisionEnabled (Shape3D *shapeA, Shape3D *shapeB) const
 Whether a shape pair is permitted by the runtime contact override.
 
void setContactTuning (float hertz, float dampingRatio, float pushOutSpeed)
 Configures contact overlap recovery.
 
float getContactHertz () const
 Current contact stiffness frequency.
 
float getContactDampingRatio () const
 Current contact damping ratio.
 
float getContactPushOutSpeed () const
 Current maximum contact push-out speed in m/s.
 
void setContactRecycleDistance (float distance)
 Sets contact-point persistence distance in meters; zero disables recycling.
 
float getContactRecycleDistance () const
 Current contact-point persistence distance in meters.
 
void setMaximumLinearSpeed (float speed)
 Sets the finite positive world-wide linear velocity clamp in m/s.
 
float getMaximumLinearSpeed () const
 Current world-wide maximum linear speed in m/s.
 
void setWarmStartingEnabled (bool enabled)
 Enables constraint warm starting for stable stacks and joints.
 
bool isWarmStartingEnabled () const
 Whether constraint warm starting is enabled.
 
int explode (float x, float y, float z, float radius, float falloff, float impulsePerArea, int maskBits=-1)
 Applies a geometry-aware radial impulse to dynamic convex shapes.
 
int getExplosionResultCount () const
 Number of bodies affected by the latest explosion.
 
int getExplosionResultBodyId (int index) const
 Stable Body ID of an affected body, sorted ascending.
 
float getExplosionResultDeltaVelocityX (int index) const
 Explosion-induced linear velocity delta X.
 
float getExplosionResultDeltaVelocityY (int index) const
 Explosion-induced linear velocity delta Y.
 
float getExplosionResultDeltaVelocityZ (int index) const
 Explosion-induced linear velocity delta Z.
 
float getExplosionResultDeltaAngularVelocityX (int index) const
 Explosion-induced angular velocity delta X.
 
float getExplosionResultDeltaAngularVelocityY (int index) const
 Explosion-induced angular velocity delta Y.
 
float getExplosionResultDeltaAngularVelocityZ (int index) const
 Explosion-induced angular velocity delta Z.
 
float getBoundsMinX () const
 Minimum world-space X covered by current broad-phase bounds.
 
float getBoundsMinY () const
 Minimum world-space Y covered by current broad-phase bounds.
 
float getBoundsMinZ () const
 Minimum world-space Z covered by current broad-phase bounds.
 
float getBoundsMaxX () const
 Maximum world-space X covered by current broad-phase bounds.
 
float getBoundsMaxY () const
 Maximum world-space Y covered by current broad-phase bounds.
 
float getBoundsMaxZ () const
 Maximum world-space Z covered by current broad-phase bounds.
 
int getBodyCount () const
 Current backend body count.
 
int getShapeCount () const
 Current backend shape count.
 
int getContactCount () const
 Current backend contact count.
 
int getJointCount () const
 Current backend joint count.
 
int getIslandCount () const
 Current solver-island count.
 
int getAwakeBodyCount () const
 Number of awake bodies.
 
int getAwakeContactCount () const
 Contacts processed by the latest collide pass.
 
int getRecycledContactCount () const
 Contact points recycled during the latest step.
 
int getStaticTreeHeight () const
 Static broad-phase tree height.
 
int getDynamicTreeHeight () const
 Dynamic broad-phase tree height.
 
int getMemoryByteCount () const
 Approximate Box3D world allocation in bytes.
 
float getProfileStepMs () const
 Latest complete physics step time in milliseconds.
 
float getProfilePairsMs () const
 Latest broad-phase pair generation time in milliseconds.
 
float getProfileCollideMs () const
 Latest narrow-phase collision time in milliseconds.
 
float getProfileSolveMs () const
 Latest constraint solver time in milliseconds.
 
float getProfileBulletsMs () const
 Latest continuous-collision bullet time in milliseconds.
 
float getProfileSensorsMs () const
 Latest sensor processing time in milliseconds.
 
Body3D * newBody (const std::string &bodyType, float x, float y, float z)
 Creates a body in meter-space units.
 
Body3D * findBody (PhysicsBodyHandle handle) const
 Resolves a live body handle; returns null for a stale or foreign handle.
 
Body3D * findBodyById (int bodyId) const
 Resolves a live body by its world-local stable event/query id.
 
Shape3D * findShape (PhysicsShapeHandle handle) const
 Resolves a live shape handle; returns null when stale or foreign.
 
Shape3D * findShapeById (int shapeId) const
 Resolves a live shape by its world-local stable event/query id.
 
Joint3D * findJoint (PhysicsJointHandle handle) const
 Resolves a live joint handle; returns null when stale or foreign.
 
Joint3D * newDistanceJoint (Body3D *bodyA, Body3D *bodyB, float anchorAX, float anchorAY, float anchorAZ, float anchorBX, float anchorBY, float anchorBZ, float length, bool collideConnected=false)
 Connects two world-space anchor points with a rigid distance constraint.
 
Joint3D * newRevoluteJoint (Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
 Creates a hinge around a normalized world-space axis at a shared anchor.
 
Joint3D * newPrismaticJoint (Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
 Creates a slider whose permitted world-space translation follows axis.
 
Joint3D * newSphericalJoint (Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
 Creates a ball-and-socket joint with a world-space twist/cone axis.
 
Joint3D * newWheelJoint (Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float suspensionAxisX, float suspensionAxisY, float suspensionAxisZ, float wheelAxisX, float wheelAxisY, float wheelAxisZ, bool collideConnected=false)
 Creates a vehicle wheel joint with independent world suspension and spin axes.
 
Joint3D * newWeldJoint (Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, bool collideConnected=false)
 Welds two bodies at a shared world-space anchor, preserving current relative pose.
 
Joint3D * newMotorJoint (Body3D *bodyA, Body3D *bodyB, bool collideConnected=false)
 Creates a motor joint that drives relative linear/angular velocity between bodies.
 
Joint3D * newParallelJoint (Body3D *bodyA, Body3D *bodyB, float axisX, float axisY, float axisZ, bool collideConnected=false)
 Creates a parallel joint that spring-aligns body local Z axes to a world axis.
 
Joint3D * newFilterJoint (Body3D *bodyA, Body3D *bodyB)
 Disables collision between two specific bodies (filter joint).
 
Mechanism3D * newShaft (Body3D *support, Body3D *rotor, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
 Builds a shaft (support↔rotor revolute) with optional drive motor helpers.
 
Mechanism3D * newRatchet (Body3D *frame, Body3D *wheel, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, int direction, float engagementTorque, bool collideConnected=false)
 Builds a one-way ratchet around a revolute axis.
 
Mechanism3D * newCrankSlider (Body3D *frame, Body3D *crank, Body3D *rod, Body3D *slider, float crankAnchorX, float crankAnchorY, float crankAnchorZ, float axisX, float axisY, float axisZ, float crankPinX, float crankPinY, float crankPinZ, float sliderPinX, float sliderPinY, float sliderPinZ, float slideAxisX, float slideAxisY, float slideAxisZ, bool collideConnected=false)
 Builds a planar crank-slider from frame, crank, connecting rod and slider bodies.
 
void destroyBody (Body3D *body)
 Destroys a body (null is ignored).
 
void destroy ()
 Destroys the world and invalidates all wrappers.
 
int rayCast (float x1, float y1, float z1, float x2, float y2, float z2)
 Closest raycast from (x1,y1,z1) to (x2,y2,z2) in meters. Returns hit body id, or -1. Read hit details via getRayHit*.
 
int rayCastFiltered (float x1, float y1, float z1, float x2, float y2, float z2, uint64_t maskBits)
 带形状类别掩码的最短射线查询(掩码为接受的 shape categoryBits)。
 
eve::Result< RayHit3D > rayCastOwned (float x1, float y1, float z1, float x2, float y2, float z2, QueryFilter3D filter={})
 Performs one ray query and returns an owning, generation-qualified snapshot.
 
bool sphereCast (float x1, float y1, float z1, float x2, float y2, float z2, float radius, uint64_t maskBits, int ignoredBodyId, CameraSphereHit3D *out) const
 Internal camera query: swept sphere against non-sensor shapes.
 
int rayCastAll (float x1, float y1, float z1, float x2, float y2, float z2, int maxHits)
 Collects the nearest maxHits ray intersections, sorted by fraction then Shape ID.
 
bool hasRayHit () const
 
int getRayHitBodyId () const
 
int getRayHitShapeId () const
 Stable shape id from the last ray cast, or -1.
 
int getRayHitShapeTag () const
 User tag of the shape from the last ray cast, or zero on no hit.
 
int getRayHitMaterialId () const
 Surface material ID at the last ray intersection, or zero.
 
int getRayHitTriangleIndex () const
 Mesh/height-field triangle index from the last ray cast, otherwise -1.
 
float getRayHitX () const
 
float getRayHitY () const
 
float getRayHitZ () const
 
float getRayHitNormalX () const
 
float getRayHitNormalY () const
 
float getRayHitNormalZ () const
 
float getRayHitFraction () const
 
int getRayResultCount () const
 Number of results cached by the latest rayCast or rayCastAll call.
 
int getRayResultBodyId (int index) const
 Body ID of a sorted ray result.
 
int getRayResultShapeId (int index) const
 Shape ID of a sorted ray result.
 
int getRayResultShapeTag (int index) const
 Shape Tag of a sorted ray result.
 
int getRayResultMaterialId (int index) const
 Surface material ID at a sorted ray intersection.
 
int getRayResultTriangleIndex (int index) const
 Mesh/height-field triangle index of a sorted ray result, otherwise -1.
 
float getRayResultX (int index) const
 World-space hit point X of a sorted ray result.
 
float getRayResultY (int index) const
 World-space hit point Y of a sorted ray result.
 
float getRayResultZ (int index) const
 World-space hit point Z of a sorted ray result.
 
float getRayResultNormalX (int index) const
 Surface normal X of a sorted ray result.
 
float getRayResultNormalY (int index) const
 Surface normal Y of a sorted ray result.
 
float getRayResultNormalZ (int index) const
 Surface normal Z of a sorted ray result.
 
float getRayResultFraction (int index) const
 Segment fraction in [0,1] of a sorted ray result.
 
int queryAABB (float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
 Query shapes overlapping an AABB in meters (min/max corners). Returns match count; read ids with getQueryBodyId(i).
 
eve::Result< BroadPhaseAabb3D > queryAabbBroadPhaseOwned (float minX, float minY, float minZ, float maxX, float maxY, float maxZ, QueryFilter3D filter={})
 Queries one AABB into a fixed owning result without using the legacy query cache.
 
int querySphere (float x, float y, float z, float radius)
 Query shapes overlapping a sphere in world meters.
 
int queryCapsule (float ax, float ay, float az, float bx, float by, float bz, float radius)
 Query shapes overlapping an arbitrarily oriented capsule. The endpoints are the centers of its hemispherical caps.
 
eve::Result< CapsuleOverlap3D > queryCapsuleOwned (float ax, float ay, float az, float bx, float by, float bz, float radius, QueryFilter3D filter={})
 Performs one capsule overlap and returns an owning summary without exposing the query cache.
 
int queryBox (float x, float y, float z, float width, float height, float depth, float qx, float qy, float qz, float qw)
 Query shapes overlapping an oriented box.
 
int castSphere (float x, float y, float z, float radius, float dx, float dy, float dz)
 Sweep a sphere through the world and return the earliest hit body id, or -1.
 
int castSphereAll (float x, float y, float z, float radius, float dx, float dy, float dz, int maxHits)
 Collects the nearest maxHits swept-sphere intersections.
 
int castCapsule (float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz)
 Sweep an arbitrarily oriented capsule through the world. The endpoints are cap centers and d{x,y,z} is the world-space translation.
 
int castCapsuleAll (float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz, int maxHits)
 Collects the nearest maxHits swept-capsule intersections.
 
int castBox (float x, float y, float z, float width, float height, float depth, float qx, float qy, float qz, float qw, float dx, float dy, float dz)
 Sweep an oriented box without changing its rotation.
 
int castBoxAll (float x, float y, float z, float width, float height, float depth, float qx, float qy, float qz, float qw, float dx, float dy, float dz, int maxHits)
 Collects the nearest maxHits swept-oriented-box intersections.
 
int closestPoint (float x, float y, float z, float maxDistance)
 Find the closest collision surface within maxDistance of a world point. Uses the current query category/mask filter. The normal points from the surface toward the target and is zero when the target lies on or inside the shape.
 
bool hasClosestPoint () const
 Whether the latest closestPoint call found a shape.
 
int getClosestBodyId () const
 Stable body id from the latest closestPoint call, or -1.
 
int getClosestShapeId () const
 Stable shape id from the latest closestPoint call, or -1.
 
int getClosestShapeTag () const
 User tag of the shape from the latest closestPoint call, or zero.
 
float getClosestX () const
 Closest surface point X.
 
float getClosestY () const
 Closest surface point Y.
 
float getClosestZ () const
 Closest surface point Z.
 
float getClosestNormalX () const
 Surface-to-target normal X, or zero for an inside/on-surface target.
 
float getClosestNormalY () const
 Surface-to-target normal Y, or zero for an inside/on-surface target.
 
float getClosestNormalZ () const
 Surface-to-target normal Z, or zero for an inside/on-surface target.
 
float getClosestDistance () const
 Non-negative distance from the target to the closest shape.
 
bool hasShapeCastHit () const
 Whether the last sphere, capsule, or box cast hit a body.
 
int getShapeCastBodyId () const
 Stable body id from the last shape cast, or -1.
 
int getShapeCastShapeId () const
 Stable shape id from the last shape cast, or -1.
 
int getShapeCastShapeTag () const
 User tag of the shape from the last shape cast, or zero on no hit.
 
int getShapeCastMaterialId () const
 Surface material ID at the last shape-cast intersection, or zero.
 
int getShapeCastTriangleIndex () const
 Mesh/height-field triangle index from the latest shape cast, otherwise -1.
 
float getShapeCastX () const
 World-space contact point X from the last shape cast.
 
float getShapeCastY () const
 World-space contact point Y from the last shape cast.
 
float getShapeCastZ () const
 World-space contact point Z from the last shape cast.
 
float getShapeCastNormalX () const
 Contact normal X from the last shape cast.
 
float getShapeCastNormalY () const
 Contact normal Y from the last shape cast.
 
float getShapeCastNormalZ () const
 Contact normal Z from the last shape cast.
 
float getShapeCastFraction () const
 Translation fraction in [0,1] at the earliest hit.
 
int getShapeCastResultCount () const
 Number of results cached by the latest single or multi Shape Cast.
 
int getShapeCastResultBodyId (int index) const
 Body ID of a sorted Shape Cast result.
 
int getShapeCastResultShapeId (int index) const
 Shape ID of a sorted Shape Cast result.
 
int getShapeCastResultShapeTag (int index) const
 Shape Tag of a sorted Shape Cast result.
 
int getShapeCastResultMaterialId (int index) const
 Surface material ID at a sorted Shape Cast intersection.
 
int getShapeCastResultTriangleIndex (int index) const
 Mesh/height-field triangle index of a Shape Cast result, otherwise -1.
 
float getShapeCastResultX (int index) const
 World-space contact point X of a Shape Cast result.
 
float getShapeCastResultY (int index) const
 World-space contact point Y of a Shape Cast result.
 
float getShapeCastResultZ (int index) const
 World-space contact point Z of a Shape Cast result.
 
float getShapeCastResultNormalX (int index) const
 Contact normal X of a Shape Cast result.
 
float getShapeCastResultNormalY (int index) const
 Contact normal Y of a Shape Cast result.
 
float getShapeCastResultNormalZ (int index) const
 Contact normal Z of a Shape Cast result.
 
float getShapeCastResultFraction (int index) const
 Translation fraction in [0,1] of a Shape Cast result.
 
bool moveCapsule (float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz)
 Move a capsule with continuous collision and multi-plane sliding. Existing penetration is recovered before the desired translation is applied.
 
eve::Result< CapsuleMove3D > moveCapsuleOwned (float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz, QueryFilter3D filter={}, CapsuleMovePolicy3D policy={})
 Moves a capsule and returns all resolved movement data as one owning result.
 
float getMoverDeltaX () const
 Resolved translation X from the last moveCapsule call.
 
float getMoverDeltaY () const
 Resolved translation Y from the last moveCapsule call.
 
float getMoverDeltaZ () const
 Resolved translation Z from the last moveCapsule call.
 
float getMoverNormalX () const
 Representative blocking normal X from the last move.
 
float getMoverNormalY () const
 Representative blocking normal Y from the last move.
 
float getMoverNormalZ () const
 Representative blocking normal Z from the last move.
 
int getMoverPlaneCount () const
 Number of collision planes considered during the last move.
 
int getMoverIterations () const
 Number of outer solver passes used by the last move.
 
void setMoverUp (float x, float y, float z)
 Set the up direction used for grounded and slope classification.
 
void setMoverSlopeLimit (float degrees)
 Set maximum walkable slope in degrees, clamped to [0, 89.9].
 
bool isMoverGrounded () const
 True when the last move touched a walkable plane.
 
float getMoverGroundDot () const
 Largest dot product between mover up and a contact normal.
 
int getQueryCount () const
 Number of bodies hit by the last overlap query.
 
int getQueryBodyId (int index) const
 Body id of the i-th query hit.
 
int getQueryShapeCount () const
 Number of individual shapes hit by the last overlap query.
 
int getQueryShapeId (int index) const
 Stable shape id of the i-th shape hit, sorted ascending.
 
int getQueryShapeTag (int index) const
 User tag paired with the i-th shape hit.
 
int getBeginContactCount () const
 Number of non-sensor contacts that began during the latest step.
 
int getBeginContactBodyAId (int index) const
 Body ID on stable side A of a begin-contact event.
 
int getBeginContactBodyBId (int index) const
 Body ID on stable side B of a begin-contact event.
 
int getBeginContactShapeAId (int index) const
 Shape ID on stable side A of a begin-contact event.
 
int getBeginContactShapeBId (int index) const
 Shape ID on stable side B of a begin-contact event.
 
int getBeginContactShapeATag (int index) const
 Shape Tag on stable side A of a begin-contact event.
 
int getBeginContactShapeBTag (int index) const
 Shape Tag on stable side B of a begin-contact event.
 
int getEndContactCount () const
 Number of non-sensor contacts that ended during the latest step.
 
int getEndContactBodyAId (int index) const
 Body ID on stable side A of an end-contact event.
 
int getEndContactBodyBId (int index) const
 Body ID on stable side B of an end-contact event.
 
int getEndContactShapeAId (int index) const
 Shape ID on stable side A of an end-contact event.
 
int getEndContactShapeBId (int index) const
 Shape ID on stable side B of an end-contact event.
 
int getEndContactShapeATag (int index) const
 Shape Tag on stable side A of an end-contact event.
 
int getEndContactShapeBTag (int index) const
 Shape Tag on stable side B of an end-contact event.
 
int getBeginTriggerCount () const
 Number of sensor overlaps that began during the latest step.
 
int getBeginTriggerSensorBodyId (int index) const
 Sensor body ID of a begin-trigger event.
 
int getBeginTriggerVisitorBodyId (int index) const
 Visitor body ID of a begin-trigger event.
 
int getBeginTriggerSensorShapeId (int index) const
 Sensor shape ID of a begin-trigger event.
 
int getBeginTriggerVisitorShapeId (int index) const
 Visitor shape ID of a begin-trigger event.
 
int getBeginTriggerSensorShapeTag (int index) const
 Sensor Shape Tag of a begin-trigger event.
 
int getBeginTriggerVisitorShapeTag (int index) const
 Visitor Shape Tag of a begin-trigger event.
 
int getEndTriggerCount () const
 Number of sensor overlaps that ended during the latest step.
 
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.
 
int getEndTriggerSensorShapeId (int index) const
 Sensor shape ID of an end-trigger event.
 
int getEndTriggerVisitorShapeId (int index) const
 Visitor shape ID of an end-trigger event.
 
int getEndTriggerSensorShapeTag (int index) const
 Sensor Shape Tag of an end-trigger event.
 
int getEndTriggerVisitorShapeTag (int index) const
 Visitor Shape Tag of an end-trigger event.
 
void clearContactEvents ()
 Clears all contact and trigger buffers before the next step.
 
int queryBodyContacts (int bodyId, int maxPoints)
 Caches current touching manifold points for one stable Body3D ID. Results are oriented from the queried body toward the other body.
 
int getContactPointCount () const
 Number of points cached by queryBodyContacts.
 
int getContactPointShapeId (int index) const
 Queried-body Shape ID of a contact point.
 
int getContactPointShapeTag (int index) const
 Queried-body Shape Tag of a contact point.
 
int getContactPointOtherBodyId (int index) const
 Other Body ID of a contact point.
 
int getContactPointOtherShapeId (int index) const
 Other Shape ID of a contact point.
 
int getContactPointOtherShapeTag (int index) const
 Other Shape Tag of a contact point.
 
float getContactPointX (int index) const
 World-space contact point X on the queried body.
 
float getContactPointY (int index) const
 World-space contact point Y on the queried body.
 
float getContactPointZ (int index) const
 World-space contact point Z on the queried body.
 
float getContactPointNormalX (int index) const
 Contact normal X from queried body toward the other body.
 
float getContactPointNormalY (int index) const
 Contact normal Y from queried body toward the other body.
 
float getContactPointNormalZ (int index) const
 Contact normal Z from queried body toward the other body.
 
float getContactPointSeparation (int index) const
 Signed surface separation; negative values indicate penetration.
 
float getContactPointNormalImpulse (int index) const
 Normal impulse from the final physics substep.
 
float getContactPointTotalNormalImpulse (int index) const
 Total normal impulse accumulated across all physics substeps.
 
float getContactPointNormalVelocity (int index) const
 Pre-solve relative normal velocity; negative means approaching.
 
bool isContactPointPersisted (int index) const
 Whether this manifold point existed in the previous step.
 
int getHitCount () const
 Number of significant collision hits generated during the latest step.
 
int getHitBodyAId (int index) const
 Stable body ID on side A of a hit.
 
int getHitBodyBId (int index) const
 Stable body ID on side B of a hit.
 
int getHitShapeAId (int index) const
 Stable Shape ID on side A of a hit.
 
int getHitShapeBId (int index) const
 Stable Shape ID on side B of a hit.
 
int getHitShapeATag (int index) const
 Shape Tag on side A of a hit.
 
int getHitShapeBTag (int index) const
 Shape Tag on side B of a hit.
 
float getHitPointX (int index) const
 World-space impact point X.
 
float getHitPointY (int index) const
 World-space impact point Y.
 
float getHitPointZ (int index) const
 World-space impact point Z.
 
float getHitNormalX (int index) const
 Hit normal X, pointing from stable side A to B.
 
float getHitNormalY (int index) const
 Hit normal Y, pointing from stable side A to B.
 
float getHitNormalZ (int index) const
 Hit normal Z, pointing from stable side A to B.
 
float getHitApproachSpeed (int index) const
 Positive pre-solve approach speed in m/s.
 
float getHitNormalImpulse (int index) const
 Total normal impulse accumulated across all manifolds and substeps.
 
int getJointStressCount () const
 Number of joints exceeding force/torque thresholds in the latest step.
 
int getJointStressJointId (int index) const
 Stable Joint3D ID of a stress event.
 
int getJointStressBodyAId (int index) const
 Stable body A ID of a stress event.
 
int getJointStressBodyBId (int index) const
 Stable body B ID of a stress event.
 
int getJointStressKind (int index) const
 Joint kind code: 0 distance, 1 revolute, 2 prismatic, 3 spherical, 4 wheel.
 
float getJointStressForceX (int index) const
 Constraint force X of a stress event.
 
float getJointStressForceY (int index) const
 Constraint force Y of a stress event.
 
float getJointStressForceZ (int index) const
 Constraint force Z of a stress event.
 
float getJointStressTorqueX (int index) const
 Constraint torque X of a stress event.
 
float getJointStressTorqueY (int index) const
 Constraint torque Y of a stress event.
 
float getJointStressTorqueZ (int index) const
 Constraint torque Z of a stress event.
 
void setQueryFilter (int categoryBits, int maskBits)
 Set category/mask bits for subsequent ray, overlap, cast and mover queries.
 
void resetQueryFilter ()
 Restore the query filter to accept all lower-32-bit categories.
 
int getQueryCategoryBits () const
 Query category bits currently in use.
 
int getQueryMaskBits () const
 Query mask bits currently in use.
 
void setQueryIgnoredBodyId (int bodyId)
 Ignores one stable Body3D ID in subsequent spatial queries; -1 disables.
 
void setQueryIgnoredShapeId (int shapeId)
 Ignores one stable Shape3D ID in subsequent spatial queries; -1 disables.
 
int getQueryIgnoredBodyId () const
 Stable Body3D ID currently ignored by queries, or -1.
 
int getQueryIgnoredShapeId () const
 Stable Shape3D ID currently ignored by queries, or -1.
 
void clearQueryIgnores ()
 Clears Body and Shape query exclusions without changing layer filtering.
 
bool isValid () const
 True while the underlying Box3D world is alive.
 
bool pointProbe (float x, float y, float z, float radius, ClothContact3D *out) const
 Probe the deepest non-sensor shape within radius of a meter-space point. Returns false when nothing is hit. Used by Cloth3D for particle-vs-body collision.
 
ClothProbeStatus pointProbeFiltered (float x, float y, float z, float radius, ClothContact3D *out, uint64_t categoryBits, uint64_t maskBits) const
 Probe a cloth particle using symmetric category/mask filtering.
 
b3WorldId raw () const
 Raw Box3D world id.
 
void forgetBody (Body3D *body)
 Internal: wrapper teardown bookkeeping.
 
void forgetShape (Shape3D *shape)
 
void forgetJoint (Joint3D *joint)
 Internal: removes a joint wrapper from ownership bookkeeping.
 
void forgetMechanism (Mechanism3D *mechanism)
 Internal: removes a mechanism wrapper from ownership bookkeeping.
 
void registerShapeHandle (Shape3D *shape)
 Internal: snapshots a backend handle for destruction-safe end events.
 
void updateShapeTag (Shape3D *shape)
 Internal: refreshes the tag snapshot for a live shape handle.
 
int nextBodyId ()
 Internal: next stable body id.
 
PhysicsBodyHandle nextBodyRuntimeHandle ()
 Internal: next generation-qualified body handle.
 
PhysicsShapeHandle nextShapeRuntimeHandle ()
 Internal: next generation-qualified shape handle.
 
PhysicsJointHandle nextJointRuntimeHandle ()
 Internal: next generation-qualified joint handle.
 
int nextShapeId ()
 Internal: next stable shape id.
 
int nextJointId ()
 Internal: next stable joint id.
 
int nextMechanismId ()
 Internal: next stable mechanism id.
 
void emitContactEvents ()
 Internal: collects Box3D contact events into the event buffers.
 

静态 Public 成员函数

static World3D * findWorld (PhysicsWorldHandle handle) noexcept
 Resolve a live process-local world handle, or null after teardown. @thread Owning physics thread only; the returned pointer is borrowed for the immediate call.
 

友元

class action_adapter::ActionCollisionIgnoreState
 
struct WorldSnapshotAccess
 
class Body3D
 
class Joint3D
 
class Mechanism3D
 
class Shape3D
 
class TargetingLineOfSightAdapter
 
void registerCameraObstructionWorld (World3D *world)
 Registers camera obstruction world.
 

详细描述

Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixels + Physics.setMeter.

在文件 World3D.h 第 63 行定义.

构造及析构函数说明

◆ World3D() [1/2]

eve::physics::World3D::World3D ( float  gravityX,
float  gravityY,
float  gravityZ,
bool  sleep,
eve::PersistentId  instanceId = eve::PersistentId::nil() 
)

Creates a 3D physics world.

参数
gravityXGravity along the x axis in world units per second squared.
gravityYGravity along the y axis in world units per second squared.
gravityZGravity along the z axis in world units per second squared.
sleepWhether bodies may sleep when idle.
instanceIdStable save/network identity; nil creates a process-local generated identity.

在文件 World3D.cpp 第 173 行定义.

◆ ~World3D()

eve::physics::World3D::~World3D ( )

在文件 World3D.cpp 第 403 行定义.

引用了 destroy().

◆ World3D() [2/2]

eve::physics::World3D::World3D ( const World3D &  )
delete

成员函数说明

◆ backendDeterminism()

SimulationDeterminism eve::physics::World3D::backendDeterminism ( ) const
noexcept

Replay/numeric guarantee declared by the selected backend.

在文件 World3D.cpp 第 769 行定义.

引用了 eve::physics::ToleranceBounded.

◆ backendKind()

SimulationBackendKind eve::physics::World3D::backendKind ( ) const
noexcept

Selected CPU/GPU/mock backend family.

在文件 World3D.cpp 第 765 行定义.

引用了 eve::physics::Cpu.

◆ backendSelectionStatus()

eve::Status eve::physics::World3D::backendSelectionStatus ( ) const

Selection status, including a structured absent-capability warning.

在文件 World3D.cpp 第 773 行定义.

◆ castBox()

int eve::physics::World3D::castBox ( float  x,
float  y,
float  z,
float  width,
float  height,
float  depth,
float  qx,
float  qy,
float  qz,
float  qw,
float  dx,
float  dy,
float  dz 
)

Sweep an oriented box without changing its rotation.

返回
Earliest hit body id, or -1.

在文件 World3D.cpp 第 1820 行定义.

引用了 castBoxAll(), depth, dx, dy, dz, height, qw, qx, qy, qz, width, x, y , 以及 z.

◆ castBoxAll()

int eve::physics::World3D::castBoxAll ( float  x,
float  y,
float  z,
float  width,
float  height,
float  depth,
float  qx,
float  qy,
float  qz,
float  qw,
float  dx,
float  dy,
float  dz,
int  maxHits 
)

Collects the nearest maxHits swept-oriented-box intersections.

在文件 World3D.cpp 第 1826 行定义.

引用了 depth, dx, dy, dz, height, points, qw, qx, qy, qz, rotation, width, x, y , 以及 z.

被这些函数引用 castBox().

◆ castCapsule()

int eve::physics::World3D::castCapsule ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz,
float  radius,
float  dx,
float  dy,
float  dz 
)

Sweep an arbitrarily oriented capsule through the world. The endpoints are cap centers and d{x,y,z} is the world-space translation.

返回
earliest hit body id, or -1

在文件 World3D.cpp 第 1803 行定义.

引用了 ax, ay, az, bx, by, bz, castCapsuleAll(), dx, dy, dz , 以及 radius.

◆ castCapsuleAll()

int eve::physics::World3D::castCapsuleAll ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz,
float  radius,
float  dx,
float  dy,
float  dz,
int  maxHits 
)

Collects the nearest maxHits swept-capsule intersections.

在文件 World3D.cpp 第 1809 行定义.

引用了 ax, ay, az, bx, by, bz, dx, dy, dz, points , 以及 radius.

被这些函数引用 castCapsule().

◆ castSphere()

int eve::physics::World3D::castSphere ( float  x,
float  y,
float  z,
float  radius,
float  dx,
float  dy,
float  dz 
)

Sweep a sphere through the world and return the earliest hit body id, or -1.

参数
dxworld-space translation X
dyworld-space translation Y
dzworld-space translation Z

在文件 World3D.cpp 第 1788 行定义.

引用了 castSphereAll(), dx, dy, dz, radius, x, y , 以及 z.

◆ castSphereAll()

int eve::physics::World3D::castSphereAll ( float  x,
float  y,
float  z,
float  radius,
float  dx,
float  dy,
float  dz,
int  maxHits 
)

Collects the nearest maxHits swept-sphere intersections.

在文件 World3D.cpp 第 1793 行定义.

引用了 dx, dy, dz, point, radius, x, y , 以及 z.

被这些函数引用 castSphere().

◆ clearContactEvents()

void eve::physics::World3D::clearContactEvents ( )

Clears all contact and trigger buffers before the next step.

在文件 World3D.cpp 第 1086 行定义.

被这些函数引用 destroy(), restore() , 以及 step().

◆ clearQueryIgnores()

void eve::physics::World3D::clearQueryIgnores ( )

Clears Body and Shape query exclusions without changing layer filtering.

在文件 World3D.cpp 第 992 行定义.

◆ closestPoint()

int eve::physics::World3D::closestPoint ( float  x,
float  y,
float  z,
float  maxDistance 
)

Find the closest collision surface within maxDistance of a world point. Uses the current query category/mask filter. The normal points from the surface toward the target and is zero when the target lies on or inside the shape.

返回
Closest stable body id, or -1 when no shape is within range.

在文件 World3D.cpp 第 1838 行定义.

引用了 body, bounds, callback, collector, context, distance, filter, isValid(), point, shape, target, world, x, y , 以及 z.

◆ destroy()

void eve::physics::World3D::destroy ( )

Destroys the world and invalidates all wrappers.

在文件 World3D.cpp 第 432 行定义.

引用了 b, clearContactEvents(), found, eve::RuntimeHandle< Tag >::index(), eve::RuntimeHandle< PhysicsWorldHandleTag >::invalid() , 以及 s.

被这些函数引用 ~World3D().

◆ destroyBody()

void eve::physics::World3D::destroyBody ( Body3D *  body)

Destroys a body (null is ignored).

在文件 World3D.cpp 第 997 行定义.

引用了 body.

◆ emitContactEvents()

void eve::physics::World3D::emitContactEvents ( )

Internal: collects Box3D contact events into the event buffers.

在文件 World3D.cpp 第 1178 行定义.

引用了 a, b, eve::physics::World3D::EventShape::bodyId, isValid(), eve::platform_event::Variant::makeInt(), normal, eve::physics::World3D::EventShape::shapeId, eve::physics::World3D::EventShape::shapeTag , 以及 source.

被这些函数引用 step().

◆ explode()

int eve::physics::World3D::explode ( float  x,
float  y,
float  z,
float  radius,
float  falloff,
float  impulsePerArea,
int  maskBits = -1 
)

Applies a geometry-aware radial impulse to dynamic convex shapes.

参数
xExplosion center X in world meters.
yExplosion center Y.
zExplosion center Z.
radiusFull-strength radius, finite and non-negative.
falloffAdditional distance over which impulse fades to zero.
impulsePerAreaSigned impulse per projected square meter; negative implodes.
maskBitsCollision categories accepted by the explosion (low 32 bits).
返回
Number of bodies whose velocity changed; inspect getExplosionResult*.

在文件 World3D.cpp 第 280 行定义.

引用了 a, b, body, isValid(), radius, x, y , 以及 z.

◆ findBody()

Body3D * eve::physics::World3D::findBody ( PhysicsBodyHandle  handle) const

Resolves a live body handle; returns null for a stale or foreign handle.

在文件 World3D.cpp 第 918 行定义.

引用了 body, handle , 以及 isValid().

◆ findBodyById()

Body3D * eve::physics::World3D::findBodyById ( int  bodyId) const

Resolves a live body by its world-local stable event/query id.

在文件 World3D.cpp 第 926 行定义.

引用了 body , 以及 isValid().

◆ findJoint()

Joint3D * eve::physics::World3D::findJoint ( PhysicsJointHandle  handle) const

Resolves a live joint handle; returns null when stale or foreign.

在文件 World3D.cpp 第 949 行定义.

引用了 found, handle , 以及 isValid().

◆ findShape()

Shape3D * eve::physics::World3D::findShape ( PhysicsShapeHandle  handle) const

Resolves a live shape handle; returns null when stale or foreign.

在文件 World3D.cpp 第 934 行定义.

引用了 found, handle , 以及 isValid().

◆ findShapeById()

Shape3D * eve::physics::World3D::findShapeById ( int  shapeId) const

Resolves a live shape by its world-local stable event/query id.

在文件 World3D.cpp 第 941 行定义.

引用了 isValid() , 以及 shape.

◆ findWorld()

World3D * eve::physics::World3D::findWorld ( PhysicsWorldHandle  handle)
staticnoexcept

Resolve a live process-local world handle, or null after teardown. @thread Owning physics thread only; the returned pointer is borrowed for the immediate call.

在文件 World3D.cpp 第 484 行定义.

引用了 found , 以及 handle.

◆ forgetBody()

void eve::physics::World3D::forgetBody ( Body3D *  body)

Internal: wrapper teardown bookkeeping.

在文件 World3D.cpp 第 1002 行定义.

引用了 body.

被这些函数引用 eve::physics::Body3D::destroy() , 以及 eve::physics::Body3D::~Body3D().

◆ forgetJoint()

void eve::physics::World3D::forgetJoint ( Joint3D *  joint)

Internal: removes a joint wrapper from ownership bookkeeping.

在文件 World3D.cpp 第 714 行定义.

引用了 eve::RuntimeHandle< Tag >::isValid() , 以及 eve::physics::Joint3D::runtimeHandle().

被这些函数引用 eve::physics::Body3D::destroy(), eve::physics::Joint3D::destroy(), eve::physics::Joint3D::invalidate() , 以及 eve::physics::Body3D::~Body3D().

◆ forgetMechanism()

void eve::physics::World3D::forgetMechanism ( Mechanism3D *  mechanism)

Internal: removes a mechanism wrapper from ownership bookkeeping.

在文件 World3DJoints.cpp 第 115 行定义.

◆ forgetShape()

void eve::physics::World3D::forgetShape ( Shape3D *  shape)

◆ getAwakeBodyCount()

int eve::physics::World3D::getAwakeBodyCount ( ) const

Number of awake bodies.

在文件 World3D.cpp 第 388 行定义.

引用了 isValid().

◆ getAwakeContactCount()

int eve::physics::World3D::getAwakeContactCount ( ) const

Contacts processed by the latest collide pass.

◆ getBeginContactBodyAId()

int eve::physics::World3D::getBeginContactBodyAId ( int  index) const

Body ID on stable side A of a begin-contact event.

◆ getBeginContactBodyBId()

int eve::physics::World3D::getBeginContactBodyBId ( int  index) const

Body ID on stable side B of a begin-contact event.

◆ getBeginContactCount()

int eve::physics::World3D::getBeginContactCount ( ) const
inline

Number of non-sensor contacts that began during the latest step.

在文件 World3D.h 第 785 行定义.

◆ getBeginContactShapeAId()

int eve::physics::World3D::getBeginContactShapeAId ( int  index) const

Shape ID on stable side A of a begin-contact event.

◆ getBeginContactShapeATag()

int eve::physics::World3D::getBeginContactShapeATag ( int  index) const

Shape Tag on stable side A of a begin-contact event.

◆ getBeginContactShapeBId()

int eve::physics::World3D::getBeginContactShapeBId ( int  index) const

Shape ID on stable side B of a begin-contact event.

◆ getBeginContactShapeBTag()

int eve::physics::World3D::getBeginContactShapeBTag ( int  index) const

Shape Tag on stable side B of a begin-contact event.

◆ getBeginTriggerCount()

int eve::physics::World3D::getBeginTriggerCount ( ) const
inline

Number of sensor overlaps that began during the latest step.

在文件 World3D.h 第 814 行定义.

◆ getBeginTriggerSensorBodyId()

int eve::physics::World3D::getBeginTriggerSensorBodyId ( int  index) const

Sensor body ID of a begin-trigger event.

◆ getBeginTriggerSensorShapeId()

int eve::physics::World3D::getBeginTriggerSensorShapeId ( int  index) const

Sensor shape ID of a begin-trigger event.

◆ getBeginTriggerSensorShapeTag()

int eve::physics::World3D::getBeginTriggerSensorShapeTag ( int  index) const

Sensor Shape Tag of a begin-trigger event.

◆ getBeginTriggerVisitorBodyId()

int eve::physics::World3D::getBeginTriggerVisitorBodyId ( int  index) const

Visitor body ID of a begin-trigger event.

◆ getBeginTriggerVisitorShapeId()

int eve::physics::World3D::getBeginTriggerVisitorShapeId ( int  index) const

Visitor shape ID of a begin-trigger event.

◆ getBeginTriggerVisitorShapeTag()

int eve::physics::World3D::getBeginTriggerVisitorShapeTag ( int  index) const

Visitor Shape Tag of a begin-trigger event.

◆ getBodyCount()

int eve::physics::World3D::getBodyCount ( ) const

Current backend body count.

◆ getBoundsMaxX()

float eve::physics::World3D::getBoundsMaxX ( ) const

Maximum world-space X covered by current broad-phase bounds.

在文件 World3D.cpp 第 363 行定义.

引用了 isValid().

◆ getBoundsMaxY()

float eve::physics::World3D::getBoundsMaxY ( ) const

Maximum world-space Y covered by current broad-phase bounds.

在文件 World3D.cpp 第 366 行定义.

引用了 isValid().

◆ getBoundsMaxZ()

float eve::physics::World3D::getBoundsMaxZ ( ) const

Maximum world-space Z covered by current broad-phase bounds.

在文件 World3D.cpp 第 369 行定义.

引用了 isValid().

◆ getBoundsMinX()

float eve::physics::World3D::getBoundsMinX ( ) const

Minimum world-space X covered by current broad-phase bounds.

在文件 World3D.cpp 第 354 行定义.

引用了 isValid().

◆ getBoundsMinY()

float eve::physics::World3D::getBoundsMinY ( ) const

Minimum world-space Y covered by current broad-phase bounds.

在文件 World3D.cpp 第 357 行定义.

引用了 isValid().

◆ getBoundsMinZ()

float eve::physics::World3D::getBoundsMinZ ( ) const

Minimum world-space Z covered by current broad-phase bounds.

在文件 World3D.cpp 第 360 行定义.

引用了 isValid().

◆ getClosestBodyId()

int eve::physics::World3D::getClosestBodyId ( ) const
inline

Stable body id from the latest closestPoint call, or -1.

在文件 World3D.h 第 657 行定义.

◆ getClosestDistance()

float eve::physics::World3D::getClosestDistance ( ) const
inline

Non-negative distance from the target to the closest shape.

在文件 World3D.h 第 675 行定义.

◆ getClosestNormalX()

float eve::physics::World3D::getClosestNormalX ( ) const
inline

Surface-to-target normal X, or zero for an inside/on-surface target.

在文件 World3D.h 第 669 行定义.

◆ getClosestNormalY()

float eve::physics::World3D::getClosestNormalY ( ) const
inline

Surface-to-target normal Y, or zero for an inside/on-surface target.

在文件 World3D.h 第 671 行定义.

◆ getClosestNormalZ()

float eve::physics::World3D::getClosestNormalZ ( ) const
inline

Surface-to-target normal Z, or zero for an inside/on-surface target.

在文件 World3D.h 第 673 行定义.

◆ getClosestShapeId()

int eve::physics::World3D::getClosestShapeId ( ) const
inline

Stable shape id from the latest closestPoint call, or -1.

在文件 World3D.h 第 659 行定义.

◆ getClosestShapeTag()

int eve::physics::World3D::getClosestShapeTag ( ) const
inline

User tag of the shape from the latest closestPoint call, or zero.

在文件 World3D.h 第 661 行定义.

◆ getClosestX()

float eve::physics::World3D::getClosestX ( ) const
inline

Closest surface point X.

在文件 World3D.h 第 663 行定义.

◆ getClosestY()

float eve::physics::World3D::getClosestY ( ) const
inline

Closest surface point Y.

在文件 World3D.h 第 665 行定义.

◆ getClosestZ()

float eve::physics::World3D::getClosestZ ( ) const
inline

Closest surface point Z.

在文件 World3D.h 第 667 行定义.

◆ getContactCount()

int eve::physics::World3D::getContactCount ( ) const

Current backend contact count.

◆ getContactDampingRatio()

float eve::physics::World3D::getContactDampingRatio ( ) const
inline

Current contact damping ratio.

在文件 World3D.h 第 220 行定义.

◆ getContactHertz()

float eve::physics::World3D::getContactHertz ( ) const
inline

Current contact stiffness frequency.

在文件 World3D.h 第 218 行定义.

◆ getContactPointCount()

int eve::physics::World3D::getContactPointCount ( ) const
inline

Number of points cached by queryBodyContacts.

在文件 World3D.h 第 852 行定义.

◆ getContactPointNormalImpulse()

float eve::physics::World3D::getContactPointNormalImpulse ( int  index) const

Normal impulse from the final physics substep.

◆ getContactPointNormalVelocity()

float eve::physics::World3D::getContactPointNormalVelocity ( int  index) const

Pre-solve relative normal velocity; negative means approaching.

◆ getContactPointNormalX()

float eve::physics::World3D::getContactPointNormalX ( int  index) const

Contact normal X from queried body toward the other body.

◆ getContactPointNormalY()

float eve::physics::World3D::getContactPointNormalY ( int  index) const

Contact normal Y from queried body toward the other body.

◆ getContactPointNormalZ()

float eve::physics::World3D::getContactPointNormalZ ( int  index) const

Contact normal Z from queried body toward the other body.

◆ getContactPointOtherBodyId()

int eve::physics::World3D::getContactPointOtherBodyId ( int  index) const

Other Body ID of a contact point.

◆ getContactPointOtherShapeId()

int eve::physics::World3D::getContactPointOtherShapeId ( int  index) const

Other Shape ID of a contact point.

◆ getContactPointOtherShapeTag()

int eve::physics::World3D::getContactPointOtherShapeTag ( int  index) const

Other Shape Tag of a contact point.

◆ getContactPointSeparation()

float eve::physics::World3D::getContactPointSeparation ( int  index) const

Signed surface separation; negative values indicate penetration.

◆ getContactPointShapeId()

int eve::physics::World3D::getContactPointShapeId ( int  index) const

Queried-body Shape ID of a contact point.

◆ getContactPointShapeTag()

int eve::physics::World3D::getContactPointShapeTag ( int  index) const

Queried-body Shape Tag of a contact point.

◆ getContactPointTotalNormalImpulse()

float eve::physics::World3D::getContactPointTotalNormalImpulse ( int  index) const

Total normal impulse accumulated across all physics substeps.

◆ getContactPointX()

float eve::physics::World3D::getContactPointX ( int  index) const

World-space contact point X on the queried body.

◆ getContactPointY()

float eve::physics::World3D::getContactPointY ( int  index) const

World-space contact point Y on the queried body.

◆ getContactPointZ()

float eve::physics::World3D::getContactPointZ ( int  index) const

World-space contact point Z on the queried body.

◆ getContactPushOutSpeed()

float eve::physics::World3D::getContactPushOutSpeed ( ) const
inline

Current maximum contact push-out speed in m/s.

在文件 World3D.h 第 222 行定义.

◆ getContactRecycleDistance()

float eve::physics::World3D::getContactRecycleDistance ( ) const

Current contact-point persistence distance in meters.

在文件 World3D.cpp 第 258 行定义.

引用了 isValid().

◆ getDynamicTreeHeight()

int eve::physics::World3D::getDynamicTreeHeight ( ) const

Dynamic broad-phase tree height.

◆ getEndContactBodyAId()

int eve::physics::World3D::getEndContactBodyAId ( int  index) const

Body ID on stable side A of an end-contact event.

◆ getEndContactBodyBId()

int eve::physics::World3D::getEndContactBodyBId ( int  index) const

Body ID on stable side B of an end-contact event.

◆ getEndContactCount()

int eve::physics::World3D::getEndContactCount ( ) const
inline

Number of non-sensor contacts that ended during the latest step.

在文件 World3D.h 第 799 行定义.

◆ getEndContactShapeAId()

int eve::physics::World3D::getEndContactShapeAId ( int  index) const

Shape ID on stable side A of an end-contact event.

◆ getEndContactShapeATag()

int eve::physics::World3D::getEndContactShapeATag ( int  index) const

Shape Tag on stable side A of an end-contact event.

◆ getEndContactShapeBId()

int eve::physics::World3D::getEndContactShapeBId ( int  index) const

Shape ID on stable side B of an end-contact event.

◆ getEndContactShapeBTag()

int eve::physics::World3D::getEndContactShapeBTag ( int  index) const

Shape Tag on stable side B of an end-contact event.

◆ getEndTriggerCount()

int eve::physics::World3D::getEndTriggerCount ( ) const
inline

Number of sensor overlaps that ended during the latest step.

在文件 World3D.h 第 828 行定义.

◆ getEndTriggerSensorBodyId()

int eve::physics::World3D::getEndTriggerSensorBodyId ( int  index) const

Sensor body ID of an end-trigger event.

◆ getEndTriggerSensorShapeId()

int eve::physics::World3D::getEndTriggerSensorShapeId ( int  index) const

Sensor shape ID of an end-trigger event.

◆ getEndTriggerSensorShapeTag()

int eve::physics::World3D::getEndTriggerSensorShapeTag ( int  index) const

Sensor Shape Tag of an end-trigger event.

◆ getEndTriggerVisitorBodyId()

int eve::physics::World3D::getEndTriggerVisitorBodyId ( int  index) const

Visitor body ID of an end-trigger event.

◆ getEndTriggerVisitorShapeId()

int eve::physics::World3D::getEndTriggerVisitorShapeId ( int  index) const

Visitor shape ID of an end-trigger event.

◆ getEndTriggerVisitorShapeTag()

int eve::physics::World3D::getEndTriggerVisitorShapeTag ( int  index) const

Visitor Shape Tag of an end-trigger event.

◆ getExplosionResultBodyId()

int eve::physics::World3D::getExplosionResultBodyId ( int  index) const

Stable Body ID of an affected body, sorted ascending.

◆ getExplosionResultCount()

int eve::physics::World3D::getExplosionResultCount ( ) const
inline

Number of bodies affected by the latest explosion.

在文件 World3D.h 第 249 行定义.

◆ getExplosionResultDeltaAngularVelocityX()

float eve::physics::World3D::getExplosionResultDeltaAngularVelocityX ( int  index) const

Explosion-induced angular velocity delta X.

◆ getExplosionResultDeltaAngularVelocityY()

float eve::physics::World3D::getExplosionResultDeltaAngularVelocityY ( int  index) const

Explosion-induced angular velocity delta Y.

◆ getExplosionResultDeltaAngularVelocityZ()

float eve::physics::World3D::getExplosionResultDeltaAngularVelocityZ ( int  index) const

Explosion-induced angular velocity delta Z.

◆ getExplosionResultDeltaVelocityX()

float eve::physics::World3D::getExplosionResultDeltaVelocityX ( int  index) const

Explosion-induced linear velocity delta X.

◆ getExplosionResultDeltaVelocityY()

float eve::physics::World3D::getExplosionResultDeltaVelocityY ( int  index) const

Explosion-induced linear velocity delta Y.

◆ getExplosionResultDeltaVelocityZ()

float eve::physics::World3D::getExplosionResultDeltaVelocityZ ( int  index) const

Explosion-induced linear velocity delta Z.

◆ getGravityX()

float eve::physics::World3D::getGravityX ( ) const

在文件 World3D.cpp 第 780 行定义.

引用了 isValid().

◆ getGravityY()

float eve::physics::World3D::getGravityY ( ) const

在文件 World3D.cpp 第 785 行定义.

引用了 isValid().

◆ getGravityZ()

float eve::physics::World3D::getGravityZ ( ) const

在文件 World3D.cpp 第 790 行定义.

引用了 isValid().

◆ getHitApproachSpeed()

float eve::physics::World3D::getHitApproachSpeed ( int  index) const

Positive pre-solve approach speed in m/s.

◆ getHitBodyAId()

int eve::physics::World3D::getHitBodyAId ( int  index) const

Stable body ID on side A of a hit.

◆ getHitBodyBId()

int eve::physics::World3D::getHitBodyBId ( int  index) const

Stable body ID on side B of a hit.

◆ getHitCount()

int eve::physics::World3D::getHitCount ( ) const
inline

Number of significant collision hits generated during the latest step.

在文件 World3D.h 第 887 行定义.

◆ getHitEventThreshold()

float eve::physics::World3D::getHitEventThreshold ( ) const

Current significant-hit speed threshold in m/s.

在文件 World3D.cpp 第 801 行定义.

引用了 isValid().

◆ getHitNormalImpulse()

float eve::physics::World3D::getHitNormalImpulse ( int  index) const

Total normal impulse accumulated across all manifolds and substeps.

◆ getHitNormalX()

float eve::physics::World3D::getHitNormalX ( int  index) const

Hit normal X, pointing from stable side A to B.

◆ getHitNormalY()

float eve::physics::World3D::getHitNormalY ( int  index) const

Hit normal Y, pointing from stable side A to B.

◆ getHitNormalZ()

float eve::physics::World3D::getHitNormalZ ( int  index) const

Hit normal Z, pointing from stable side A to B.

◆ getHitPointX()

float eve::physics::World3D::getHitPointX ( int  index) const

World-space impact point X.

◆ getHitPointY()

float eve::physics::World3D::getHitPointY ( int  index) const

World-space impact point Y.

◆ getHitPointZ()

float eve::physics::World3D::getHitPointZ ( int  index) const

World-space impact point Z.

◆ getHitShapeAId()

int eve::physics::World3D::getHitShapeAId ( int  index) const

Stable Shape ID on side A of a hit.

◆ getHitShapeATag()

int eve::physics::World3D::getHitShapeATag ( int  index) const

Shape Tag on side A of a hit.

◆ getHitShapeBId()

int eve::physics::World3D::getHitShapeBId ( int  index) const

Stable Shape ID on side B of a hit.

◆ getHitShapeBTag()

int eve::physics::World3D::getHitShapeBTag ( int  index) const

Shape Tag on side B of a hit.

◆ getIslandCount()

int eve::physics::World3D::getIslandCount ( ) const

Current solver-island count.

◆ getJointCount()

int eve::physics::World3D::getJointCount ( ) const

Current backend joint count.

◆ getJointStressBodyAId()

int eve::physics::World3D::getJointStressBodyAId ( int  index) const

Stable body A ID of a stress event.

◆ getJointStressBodyBId()

int eve::physics::World3D::getJointStressBodyBId ( int  index) const

Stable body B ID of a stress event.

◆ getJointStressCount()

int eve::physics::World3D::getJointStressCount ( ) const
inline

Number of joints exceeding force/torque thresholds in the latest step.

在文件 World3D.h 第 917 行定义.

◆ getJointStressForceX()

float eve::physics::World3D::getJointStressForceX ( int  index) const

Constraint force X of a stress event.

◆ getJointStressForceY()

float eve::physics::World3D::getJointStressForceY ( int  index) const

Constraint force Y of a stress event.

◆ getJointStressForceZ()

float eve::physics::World3D::getJointStressForceZ ( int  index) const

Constraint force Z of a stress event.

◆ getJointStressJointId()

int eve::physics::World3D::getJointStressJointId ( int  index) const

Stable Joint3D ID of a stress event.

◆ getJointStressKind()

int eve::physics::World3D::getJointStressKind ( int  index) const

Joint kind code: 0 distance, 1 revolute, 2 prismatic, 3 spherical, 4 wheel.

◆ getJointStressTorqueX()

float eve::physics::World3D::getJointStressTorqueX ( int  index) const

Constraint torque X of a stress event.

◆ getJointStressTorqueY()

float eve::physics::World3D::getJointStressTorqueY ( int  index) const

Constraint torque Y of a stress event.

◆ getJointStressTorqueZ()

float eve::physics::World3D::getJointStressTorqueZ ( int  index) const

Constraint torque Z of a stress event.

◆ getMaximumLinearSpeed()

float eve::physics::World3D::getMaximumLinearSpeed ( ) const

Current world-wide maximum linear speed in m/s.

在文件 World3D.cpp 第 268 行定义.

引用了 isValid().

◆ getMemoryByteCount()

int eve::physics::World3D::getMemoryByteCount ( ) const

Approximate Box3D world allocation in bytes.

◆ getMoverDeltaX()

float eve::physics::World3D::getMoverDeltaX ( ) const
inline

Resolved translation X from the last moveCapsule call.

在文件 World3D.h 第 749 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getMoverDeltaY()

float eve::physics::World3D::getMoverDeltaY ( ) const
inline

Resolved translation Y from the last moveCapsule call.

在文件 World3D.h 第 751 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getMoverDeltaZ()

float eve::physics::World3D::getMoverDeltaZ ( ) const
inline

Resolved translation Z from the last moveCapsule call.

在文件 World3D.h 第 753 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getMoverGroundDot()

float eve::physics::World3D::getMoverGroundDot ( ) const
inline

Largest dot product between mover up and a contact normal.

在文件 World3D.h 第 771 行定义.

◆ getMoverIterations()

int eve::physics::World3D::getMoverIterations ( ) const
inline

Number of outer solver passes used by the last move.

在文件 World3D.h 第 763 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getMoverNormalX()

float eve::physics::World3D::getMoverNormalX ( ) const
inline

Representative blocking normal X from the last move.

在文件 World3D.h 第 755 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getMoverNormalY()

float eve::physics::World3D::getMoverNormalY ( ) const
inline

Representative blocking normal Y from the last move.

在文件 World3D.h 第 757 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getMoverNormalZ()

float eve::physics::World3D::getMoverNormalZ ( ) const
inline

Representative blocking normal Z from the last move.

在文件 World3D.h 第 759 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getMoverPlaneCount()

int eve::physics::World3D::getMoverPlaneCount ( ) const
inline

Number of collision planes considered during the last move.

在文件 World3D.h 第 761 行定义.

被这些函数引用 moveCapsuleOwned().

◆ getProfileBulletsMs()

float eve::physics::World3D::getProfileBulletsMs ( ) const

Latest continuous-collision bullet time in milliseconds.

◆ getProfileCollideMs()

float eve::physics::World3D::getProfileCollideMs ( ) const

Latest narrow-phase collision time in milliseconds.

◆ getProfilePairsMs()

float eve::physics::World3D::getProfilePairsMs ( ) const

Latest broad-phase pair generation time in milliseconds.

◆ getProfileSensorsMs()

float eve::physics::World3D::getProfileSensorsMs ( ) const

Latest sensor processing time in milliseconds.

◆ getProfileSolveMs()

float eve::physics::World3D::getProfileSolveMs ( ) const

Latest constraint solver time in milliseconds.

◆ getProfileStepMs()

float eve::physics::World3D::getProfileStepMs ( ) const

Latest complete physics step time in milliseconds.

◆ getQueryBodyId()

int eve::physics::World3D::getQueryBodyId ( int  index) const

Body id of the i-th query hit.

在文件 World3D.cpp 第 2074 行定义.

引用了 index.

◆ getQueryCategoryBits()

int eve::physics::World3D::getQueryCategoryBits ( ) const
inline

Query category bits currently in use.

在文件 World3D.h 第 943 行定义.

◆ getQueryCount()

int eve::physics::World3D::getQueryCount ( ) const
inline

Number of bodies hit by the last overlap query.

在文件 World3D.h 第 774 行定义.

◆ getQueryIgnoredBodyId()

int eve::physics::World3D::getQueryIgnoredBodyId ( ) const
inline

Stable Body3D ID currently ignored by queries, or -1.

在文件 World3D.h 第 951 行定义.

◆ getQueryIgnoredShapeId()

int eve::physics::World3D::getQueryIgnoredShapeId ( ) const
inline

Stable Shape3D ID currently ignored by queries, or -1.

在文件 World3D.h 第 953 行定义.

◆ getQueryMaskBits()

int eve::physics::World3D::getQueryMaskBits ( ) const
inline

Query mask bits currently in use.

在文件 World3D.h 第 945 行定义.

◆ getQueryShapeCount()

int eve::physics::World3D::getQueryShapeCount ( ) const
inline

Number of individual shapes hit by the last overlap query.

在文件 World3D.h 第 778 行定义.

◆ getQueryShapeId()

int eve::physics::World3D::getQueryShapeId ( int  index) const

Stable shape id of the i-th shape hit, sorted ascending.

在文件 World3D.cpp 第 2182 行定义.

引用了 first , 以及 index.

◆ getQueryShapeTag()

int eve::physics::World3D::getQueryShapeTag ( int  index) const

User tag paired with the i-th shape hit.

在文件 World3D.cpp 第 2188 行定义.

引用了 index , 以及 second.

◆ getRayHitBodyId()

int eve::physics::World3D::getRayHitBodyId ( ) const
inline

在文件 World3D.h 第 515 行定义.

◆ getRayHitFraction()

float eve::physics::World3D::getRayHitFraction ( ) const
inline

在文件 World3D.h 第 530 行定义.

◆ getRayHitMaterialId()

int eve::physics::World3D::getRayHitMaterialId ( ) const
inline

Surface material ID at the last ray intersection, or zero.

在文件 World3D.h 第 521 行定义.

◆ getRayHitNormalX()

float eve::physics::World3D::getRayHitNormalX ( ) const
inline

在文件 World3D.h 第 527 行定义.

◆ getRayHitNormalY()

float eve::physics::World3D::getRayHitNormalY ( ) const
inline

在文件 World3D.h 第 528 行定义.

◆ getRayHitNormalZ()

float eve::physics::World3D::getRayHitNormalZ ( ) const
inline

在文件 World3D.h 第 529 行定义.

◆ getRayHitShapeId()

int eve::physics::World3D::getRayHitShapeId ( ) const
inline

Stable shape id from the last ray cast, or -1.

在文件 World3D.h 第 517 行定义.

◆ getRayHitShapeTag()

int eve::physics::World3D::getRayHitShapeTag ( ) const
inline

User tag of the shape from the last ray cast, or zero on no hit.

在文件 World3D.h 第 519 行定义.

◆ getRayHitTriangleIndex()

int eve::physics::World3D::getRayHitTriangleIndex ( ) const
inline

Mesh/height-field triangle index from the last ray cast, otherwise -1.

在文件 World3D.h 第 523 行定义.

◆ getRayHitX()

float eve::physics::World3D::getRayHitX ( ) const
inline

在文件 World3D.h 第 524 行定义.

◆ getRayHitY()

float eve::physics::World3D::getRayHitY ( ) const
inline

在文件 World3D.h 第 525 行定义.

◆ getRayHitZ()

float eve::physics::World3D::getRayHitZ ( ) const
inline

在文件 World3D.h 第 526 行定义.

◆ getRayResultBodyId()

int eve::physics::World3D::getRayResultBodyId ( int  index) const

Body ID of a sorted ray result.

◆ getRayResultCount()

int eve::physics::World3D::getRayResultCount ( ) const
inline

Number of results cached by the latest rayCast or rayCastAll call.

在文件 World3D.h 第 532 行定义.

◆ getRayResultFraction()

float eve::physics::World3D::getRayResultFraction ( int  index) const

Segment fraction in [0,1] of a sorted ray result.

◆ getRayResultMaterialId()

int eve::physics::World3D::getRayResultMaterialId ( int  index) const

Surface material ID at a sorted ray intersection.

◆ getRayResultNormalX()

float eve::physics::World3D::getRayResultNormalX ( int  index) const

Surface normal X of a sorted ray result.

◆ getRayResultNormalY()

float eve::physics::World3D::getRayResultNormalY ( int  index) const

Surface normal Y of a sorted ray result.

◆ getRayResultNormalZ()

float eve::physics::World3D::getRayResultNormalZ ( int  index) const

Surface normal Z of a sorted ray result.

◆ getRayResultShapeId()

int eve::physics::World3D::getRayResultShapeId ( int  index) const

Shape ID of a sorted ray result.

◆ getRayResultShapeTag()

int eve::physics::World3D::getRayResultShapeTag ( int  index) const

Shape Tag of a sorted ray result.

◆ getRayResultTriangleIndex()

int eve::physics::World3D::getRayResultTriangleIndex ( int  index) const

Mesh/height-field triangle index of a sorted ray result, otherwise -1.

◆ getRayResultX()

float eve::physics::World3D::getRayResultX ( int  index) const

World-space hit point X of a sorted ray result.

◆ getRayResultY()

float eve::physics::World3D::getRayResultY ( int  index) const

World-space hit point Y of a sorted ray result.

◆ getRayResultZ()

float eve::physics::World3D::getRayResultZ ( int  index) const

World-space hit point Z of a sorted ray result.

◆ getRecycledContactCount()

int eve::physics::World3D::getRecycledContactCount ( ) const

Contact points recycled during the latest step.

◆ getRestitutionThreshold()

float eve::physics::World3D::getRestitutionThreshold ( ) const

Current restitution speed threshold in m/s.

在文件 World3D.cpp 第 235 行定义.

引用了 isValid().

◆ getShapeCastBodyId()

int eve::physics::World3D::getShapeCastBodyId ( ) const
inline

Stable body id from the last shape cast, or -1.

在文件 World3D.h 第 680 行定义.

◆ getShapeCastFraction()

float eve::physics::World3D::getShapeCastFraction ( ) const
inline

Translation fraction in [0,1] at the earliest hit.

在文件 World3D.h 第 702 行定义.

◆ getShapeCastMaterialId()

int eve::physics::World3D::getShapeCastMaterialId ( ) const
inline

Surface material ID at the last shape-cast intersection, or zero.

在文件 World3D.h 第 686 行定义.

◆ getShapeCastNormalX()

float eve::physics::World3D::getShapeCastNormalX ( ) const
inline

Contact normal X from the last shape cast.

在文件 World3D.h 第 696 行定义.

◆ getShapeCastNormalY()

float eve::physics::World3D::getShapeCastNormalY ( ) const
inline

Contact normal Y from the last shape cast.

在文件 World3D.h 第 698 行定义.

◆ getShapeCastNormalZ()

float eve::physics::World3D::getShapeCastNormalZ ( ) const
inline

Contact normal Z from the last shape cast.

在文件 World3D.h 第 700 行定义.

◆ getShapeCastResultBodyId()

int eve::physics::World3D::getShapeCastResultBodyId ( int  index) const

Body ID of a sorted Shape Cast result.

◆ getShapeCastResultCount()

int eve::physics::World3D::getShapeCastResultCount ( ) const
inline

Number of results cached by the latest single or multi Shape Cast.

在文件 World3D.h 第 704 行定义.

◆ getShapeCastResultFraction()

float eve::physics::World3D::getShapeCastResultFraction ( int  index) const

Translation fraction in [0,1] of a Shape Cast result.

◆ getShapeCastResultMaterialId()

int eve::physics::World3D::getShapeCastResultMaterialId ( int  index) const

Surface material ID at a sorted Shape Cast intersection.

◆ getShapeCastResultNormalX()

float eve::physics::World3D::getShapeCastResultNormalX ( int  index) const

Contact normal X of a Shape Cast result.

◆ getShapeCastResultNormalY()

float eve::physics::World3D::getShapeCastResultNormalY ( int  index) const

Contact normal Y of a Shape Cast result.

◆ getShapeCastResultNormalZ()

float eve::physics::World3D::getShapeCastResultNormalZ ( int  index) const

Contact normal Z of a Shape Cast result.

◆ getShapeCastResultShapeId()

int eve::physics::World3D::getShapeCastResultShapeId ( int  index) const

Shape ID of a sorted Shape Cast result.

◆ getShapeCastResultShapeTag()

int eve::physics::World3D::getShapeCastResultShapeTag ( int  index) const

Shape Tag of a sorted Shape Cast result.

◆ getShapeCastResultTriangleIndex()

int eve::physics::World3D::getShapeCastResultTriangleIndex ( int  index) const

Mesh/height-field triangle index of a Shape Cast result, otherwise -1.

◆ getShapeCastResultX()

float eve::physics::World3D::getShapeCastResultX ( int  index) const

World-space contact point X of a Shape Cast result.

◆ getShapeCastResultY()

float eve::physics::World3D::getShapeCastResultY ( int  index) const

World-space contact point Y of a Shape Cast result.

◆ getShapeCastResultZ()

float eve::physics::World3D::getShapeCastResultZ ( int  index) const

World-space contact point Z of a Shape Cast result.

◆ getShapeCastShapeId()

int eve::physics::World3D::getShapeCastShapeId ( ) const
inline

Stable shape id from the last shape cast, or -1.

在文件 World3D.h 第 682 行定义.

◆ getShapeCastShapeTag()

int eve::physics::World3D::getShapeCastShapeTag ( ) const
inline

User tag of the shape from the last shape cast, or zero on no hit.

在文件 World3D.h 第 684 行定义.

◆ getShapeCastTriangleIndex()

int eve::physics::World3D::getShapeCastTriangleIndex ( ) const
inline

Mesh/height-field triangle index from the latest shape cast, otherwise -1.

在文件 World3D.h 第 688 行定义.

◆ getShapeCastX()

float eve::physics::World3D::getShapeCastX ( ) const
inline

World-space contact point X from the last shape cast.

在文件 World3D.h 第 690 行定义.

◆ getShapeCastY()

float eve::physics::World3D::getShapeCastY ( ) const
inline

World-space contact point Y from the last shape cast.

在文件 World3D.h 第 692 行定义.

◆ getShapeCastZ()

float eve::physics::World3D::getShapeCastZ ( ) const
inline

World-space contact point Z from the last shape cast.

在文件 World3D.h 第 694 行定义.

◆ getShapeCount()

int eve::physics::World3D::getShapeCount ( ) const

Current backend shape count.

◆ getStaticTreeHeight()

int eve::physics::World3D::getStaticTreeHeight ( ) const

Static broad-phase tree height.

◆ hasClosestPoint()

bool eve::physics::World3D::hasClosestPoint ( ) const
inline

Whether the latest closestPoint call found a shape.

在文件 World3D.h 第 655 行定义.

◆ hasRayHit()

bool eve::physics::World3D::hasRayHit ( ) const
inline

在文件 World3D.h 第 514 行定义.

被这些函数引用 eve::physics::TargetingLineOfSightAdapter::query().

◆ hasShapeCastHit()

bool eve::physics::World3D::hasShapeCastHit ( ) const
inline

Whether the last sphere, capsule, or box cast hit a body.

在文件 World3D.h 第 678 行定义.

◆ isBodyPairCollisionEnabled()

bool eve::physics::World3D::isBodyPairCollisionEnabled ( Body3D *  bodyA,
Body3D *  bodyB 
) const

Whether a body pair is permitted by the runtime contact override.

在文件 World3D.cpp 第 827 行定义.

引用了 eve::physics::Body3D::getId(), eve::physics::Body3D::getWorld() , 以及 eve::physics::Body3D::isValid().

◆ isContactPointPersisted()

bool eve::physics::World3D::isContactPointPersisted ( int  index) const

Whether this manifold point existed in the previous step.

在文件 World3D.cpp 第 2339 行定义.

引用了 index.

◆ isContinuousCollisionEnabled()

bool eve::physics::World3D::isContinuousCollisionEnabled ( ) const

Whether world-level continuous collision is enabled.

在文件 World3D.cpp 第 225 行定义.

引用了 isValid().

◆ isMoverGrounded()

bool eve::physics::World3D::isMoverGrounded ( ) const
inline

True when the last move touched a walkable plane.

在文件 World3D.h 第 769 行定义.

被这些函数引用 moveCapsuleOwned().

◆ isShapePairCollisionEnabled()

bool eve::physics::World3D::isShapePairCollisionEnabled ( Shape3D *  shapeA,
Shape3D *  shapeB 
) const

Whether a shape pair is permitted by the runtime contact override.

在文件 World3D.cpp 第 849 行定义.

引用了 eve::physics::Shape3D::getBody(), eve::physics::Shape3D::getId(), eve::physics::Body3D::getWorld() , 以及 eve::physics::Shape3D::isValid().

◆ isValid()

◆ isWarmStartingEnabled()

bool eve::physics::World3D::isWarmStartingEnabled ( ) const

Whether constraint warm starting is enabled.

在文件 World3D.cpp 第 276 行定义.

引用了 isValid().

◆ lifetimeToken()

std::weak_ptr< const void > eve::physics::World3D::lifetimeToken ( ) const
inlinenoexcept

Return a weak lifetime token for owner-thread runtime integrations.

返回
Weak token that expires before this world invalidates backend objects. @ownership The world owns the token; callers may retain only the weak reference. @lifetime The token expires on destroy() or world destruction and is never renewed. @thread Capture and inspect on the world's owning simulation thread. @reentrancy This query invokes no callbacks.

在文件 World3D.h 第 150 行定义.

◆ moveCapsule()

bool eve::physics::World3D::moveCapsule ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz,
float  radius,
float  dx,
float  dy,
float  dz 
)

Move a capsule with continuous collision and multi-plane sliding. Existing penetration is recovered before the desired translation is applied.

返回
true when collision planes constrained the movement

在文件 World3D.cpp 第 1935 行定义.

引用了 ax, ay, az, bx, by, bz, callback, collector, context, count, current, d, dx, dy, dz, filter, isValid(), planes, radius, start, target, up , 以及 world.

被这些函数引用 moveCapsuleOwned().

◆ moveCapsuleOwned()

eve::Result< CapsuleMove3D > eve::physics::World3D::moveCapsuleOwned ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz,
float  radius,
float  dx,
float  dy,
float  dz,
QueryFilter3D  filter = {},
CapsuleMovePolicy3D  policy = {} 
)

◆ newBody()

Body3D * eve::physics::World3D::newBody ( const std::string &  bodyType,
float  x,
float  y,
float  z 
)

Creates a body in meter-space units.

返回
Borrowed nullable body owned by this world; null means creation failed. @ownership World3D owns the body and its shapes; callers must destroy it through this API. @lifetime Valid until Body3D::destroy(), World3D::destroy(), or world teardown; use PhysicsBodyHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not re-enter structural world mutation while using the result.

在文件 World3D.cpp 第 902 行定义.

引用了 body, Body3D, isValid(), nextBodyId(), nextBodyRuntimeHandle(), raw(), runtimeHandle(), x, y , 以及 z.

被这些函数引用 eve::physics::PhysicsArtifactProvider::prepare().

◆ newCrankSlider()

Mechanism3D * eve::physics::World3D::newCrankSlider ( Body3D *  frame,
Body3D *  crank,
Body3D *  rod,
Body3D *  slider,
float  crankAnchorX,
float  crankAnchorY,
float  crankAnchorZ,
float  axisX,
float  axisY,
float  axisZ,
float  crankPinX,
float  crankPinY,
float  crankPinZ,
float  sliderPinX,
float  sliderPinY,
float  sliderPinZ,
float  slideAxisX,
float  slideAxisY,
float  slideAxisZ,
bool  collideConnected = false 
)

Builds a planar crank-slider from frame, crank, connecting rod and slider bodies.

返回
Borrowed mechanism owned by this world. @ownership World3D owns the mechanism and its joints; body pointers are borrowed inputs. @lifetime Valid until Mechanism3D::destroy() or World3D::destroy(). @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate the input bodies re-entrantly.
异常
eve::Exceptionfor invalid body chains or parallel hinge/slide axes.

在文件 World3DJoints.cpp 第 155 行定义.

引用了 axisX, axisY, axisZ, eve::physics::Mechanism3D::CrankSlider, Mechanism3D, newPrismaticJoint(), newRevoluteJoint(), nextMechanismId() , 以及 values.

◆ newDistanceJoint()

Joint3D * eve::physics::World3D::newDistanceJoint ( Body3D *  bodyA,
Body3D *  bodyB,
float  anchorAX,
float  anchorAY,
float  anchorAZ,
float  anchorBX,
float  anchorBY,
float  anchorBZ,
float  length,
bool  collideConnected = false 
)

Connects two world-space anchor points with a rigid distance constraint.

返回
Borrowed nullable joint owned by this world; null means creation failed. @ownership World3D owns the joint; body pointers are borrowed inputs and are never retained after validation. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.
异常
eve::Exceptionfor invalid bodies, anchors, length, or cross-world bodies.

在文件 World3D.cpp 第 532 行定义.

引用了 eve::physics::Joint3D::Distance, eve::physics::Body3D::getWorld(), eve::physics::Body3D::isValid(), isValid(), Joint3D, length, nextJointId(), nextJointRuntimeHandle(), eve::physics::Body3D::raw(), runtimeHandle(), value , 以及 values.

◆ newFilterJoint()

Joint3D * eve::physics::World3D::newFilterJoint ( Body3D *  bodyA,
Body3D *  bodyB 
)

Disables collision between two specific bodies (filter joint).

返回
Borrowed nullable joint owned by this world. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.
异常
eve::Exceptionfor invalid/cross-world bodies.

在文件 World3DJoints.cpp 第 100 行定义.

引用了 eve::physics::Joint3D::Filter, Joint3D, nextJointId(), nextJointRuntimeHandle(), eve::physics::Body3D::raw() , 以及 runtimeHandle().

◆ newMotorJoint()

Joint3D * eve::physics::World3D::newMotorJoint ( Body3D *  bodyA,
Body3D *  bodyB,
bool  collideConnected = false 
)

Creates a motor joint that drives relative linear/angular velocity between bodies.

返回
Borrowed nullable joint owned by this world. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.
异常
eve::Exceptionfor invalid/cross-world bodies.

在文件 World3DJoints.cpp 第 61 行定义.

引用了 Joint3D, eve::physics::Joint3D::Motor, nextJointId(), nextJointRuntimeHandle(), eve::physics::Body3D::raw() , 以及 runtimeHandle().

◆ newParallelJoint()

Joint3D * eve::physics::World3D::newParallelJoint ( Body3D *  bodyA,
Body3D *  bodyB,
float  axisX,
float  axisY,
float  axisZ,
bool  collideConnected = false 
)

Creates a parallel joint that spring-aligns body local Z axes to a world axis.

返回
Borrowed nullable joint owned by this world. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.
异常
eve::Exceptionfor invalid bodies or a zero/non-finite axis.

在文件 World3DJoints.cpp 第 76 行定义.

引用了 axisX, axisY, axisZ, Joint3D, nextJointId(), nextJointRuntimeHandle(), eve::physics::Joint3D::Parallel, eve::physics::Body3D::raw(), runtimeHandle() , 以及 values.

◆ newPrismaticJoint()

Joint3D * eve::physics::World3D::newPrismaticJoint ( Body3D *  bodyA,
Body3D *  bodyB,
float  anchorX,
float  anchorY,
float  anchorZ,
float  axisX,
float  axisY,
float  axisZ,
bool  collideConnected = false 
)

Creates a slider whose permitted world-space translation follows axis.

返回
Borrowed nullable joint owned by this world; null means creation failed. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.

在文件 World3D.cpp 第 597 行定义.

引用了 anchor, axisX, axisY, axisZ, eve::physics::Body3D::getWorld(), eve::physics::Body3D::isValid(), isValid(), Joint3D, nextJointId(), nextJointRuntimeHandle(), eve::physics::Joint3D::Prismatic, eve::physics::Body3D::raw(), runtimeHandle(), value , 以及 values.

被这些函数引用 newCrankSlider().

◆ newRatchet()

Mechanism3D * eve::physics::World3D::newRatchet ( Body3D *  frame,
Body3D *  wheel,
float  anchorX,
float  anchorY,
float  anchorZ,
float  axisX,
float  axisY,
float  axisZ,
int  direction,
float  engagementTorque,
bool  collideConnected = false 
)

Builds a one-way ratchet around a revolute axis.

参数
directionFreewheel direction along the axis: +1 or -1.
engagementTorqueMaximum reverse-lock torque in newton-metres.
返回
Borrowed mechanism owned by this world. @ownership World3D owns the mechanism and its joints; body pointers are borrowed inputs. @lifetime Valid until Mechanism3D::destroy() or World3D::destroy(). @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.

在文件 World3DJoints.cpp 第 136 行定义.

引用了 axisX, axisY, axisZ, direction, Mechanism3D, newRevoluteJoint(), nextMechanismId() , 以及 eve::physics::Mechanism3D::Ratchet.

◆ newRevoluteJoint()

Joint3D * eve::physics::World3D::newRevoluteJoint ( Body3D *  bodyA,
Body3D *  bodyB,
float  anchorX,
float  anchorY,
float  anchorZ,
float  axisX,
float  axisY,
float  axisZ,
bool  collideConnected = false 
)

Creates a hinge around a normalized world-space axis at a shared anchor.

返回
Borrowed nullable joint owned by this world; null means creation failed. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.
异常
eve::Exceptionfor invalid/cross-world bodies or a zero/non-finite axis.

在文件 World3D.cpp 第 562 行定义.

引用了 anchor, axisX, axisY, axisZ, eve::physics::Body3D::getWorld(), eve::physics::Body3D::isValid(), isValid(), Joint3D, nextJointId(), nextJointRuntimeHandle(), eve::physics::Body3D::raw(), eve::physics::Joint3D::Revolute, runtimeHandle(), value , 以及 values.

被这些函数引用 newCrankSlider(), newRatchet() , 以及 newShaft().

◆ newShaft()

Mechanism3D * eve::physics::World3D::newShaft ( Body3D *  support,
Body3D *  rotor,
float  anchorX,
float  anchorY,
float  anchorZ,
float  axisX,
float  axisY,
float  axisZ,
bool  collideConnected = false 
)

Builds a shaft (support↔rotor revolute) with optional drive motor helpers.

返回
Borrowed mechanism owned by this world. @ownership World3D owns the mechanism and its joints; body pointers are borrowed inputs. @lifetime Valid until Mechanism3D::destroy() or World3D::destroy(). @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.

在文件 World3DJoints.cpp 第 122 行定义.

引用了 axisX, axisY, axisZ, Mechanism3D, newRevoluteJoint(), nextMechanismId() , 以及 eve::physics::Mechanism3D::Shaft.

◆ newSphericalJoint()

Joint3D * eve::physics::World3D::newSphericalJoint ( Body3D *  bodyA,
Body3D *  bodyB,
float  anchorX,
float  anchorY,
float  anchorZ,
float  axisX,
float  axisY,
float  axisZ,
bool  collideConnected = false 
)

Creates a ball-and-socket joint with a world-space twist/cone axis.

返回
Borrowed nullable joint owned by this world; null means creation failed. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.

在文件 World3D.cpp 第 632 行定义.

引用了 anchor, axisX, axisY, axisZ, eve::physics::Body3D::getWorld(), eve::physics::Body3D::isValid(), isValid(), Joint3D, nextJointId(), nextJointRuntimeHandle(), eve::physics::Body3D::raw(), runtimeHandle(), eve::physics::Joint3D::Spherical, value , 以及 values.

◆ newWeldJoint()

Joint3D * eve::physics::World3D::newWeldJoint ( Body3D *  bodyA,
Body3D *  bodyB,
float  anchorX,
float  anchorY,
float  anchorZ,
bool  collideConnected = false 
)

Welds two bodies at a shared world-space anchor, preserving current relative pose.

返回
Borrowed nullable joint owned by this world. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.
异常
eve::Exceptionfor invalid/cross-world bodies or non-finite anchors.

在文件 World3DJoints.cpp 第 36 行定义.

引用了 anchor, Joint3D, nextJointId(), nextJointRuntimeHandle(), eve::physics::Body3D::raw(), runtimeHandle(), values , 以及 eve::physics::Joint3D::Weld.

◆ newWheelJoint()

Joint3D * eve::physics::World3D::newWheelJoint ( Body3D *  bodyA,
Body3D *  bodyB,
float  anchorX,
float  anchorY,
float  anchorZ,
float  suspensionAxisX,
float  suspensionAxisY,
float  suspensionAxisZ,
float  wheelAxisX,
float  wheelAxisY,
float  wheelAxisZ,
bool  collideConnected = false 
)

Creates a vehicle wheel joint with independent world suspension and spin axes.

返回
Borrowed nullable joint owned by this world; null means creation failed. @ownership World3D owns the joint; body pointers are borrowed inputs and are not retained as caller ownership. @lifetime Valid until Joint3D::destroy(), World3D::destroy(), or dependent body destruction; use PhysicsJointHandle across frames. @thread Call on the owning physics thread. @reentrancy Creation does not invoke callbacks; do not mutate either body re-entrantly.

在文件 World3D.cpp 第 667 行定义.

引用了 anchor, eve::physics::Body3D::getWorld(), eve::physics::Body3D::isValid(), isValid(), Joint3D, nextJointId(), nextJointRuntimeHandle(), eve::physics::Body3D::raw(), runtimeHandle(), value, values , 以及 eve::physics::Joint3D::Wheel.

◆ nextBodyId()

int eve::physics::World3D::nextBodyId ( )

Internal: next stable body id.

在文件 World3D.cpp 第 882 行定义.

被这些函数引用 newBody().

◆ nextBodyRuntimeHandle()

PhysicsBodyHandle eve::physics::World3D::nextBodyRuntimeHandle ( )

Internal: next generation-qualified body handle.

在文件 World3D.cpp 第 884 行定义.

引用了 eve::RuntimeHandle< PhysicsBodyHandleTag >::invalidIndex.

被这些函数引用 newBody().

◆ nextJointId()

int eve::physics::World3D::nextJointId ( )
inline

◆ nextJointRuntimeHandle()

PhysicsJointHandle eve::physics::World3D::nextJointRuntimeHandle ( )

◆ nextMechanismId()

int eve::physics::World3D::nextMechanismId ( )

Internal: next stable mechanism id.

在文件 World3DJoints.cpp 第 120 行定义.

被这些函数引用 newCrankSlider(), newRatchet() , 以及 newShaft().

◆ nextShapeId()

int eve::physics::World3D::nextShapeId ( )
inline

Internal: next stable shape id.

在文件 World3D.h 第 992 行定义.

◆ nextShapeRuntimeHandle()

◆ operator=()

World3D & eve::physics::World3D::operator= ( const World3D &  )
delete

◆ persistentId()

eve::PersistentId eve::physics::World3D::persistentId ( ) const
inlinenoexcept

Stable non-nil identity written to snapshot envelopes.

在文件 World3D.h 第 152 行定义.

◆ pointProbe()

bool eve::physics::World3D::pointProbe ( float  x,
float  y,
float  z,
float  radius,
ClothContact3D *  out 
) const

Probe the deepest non-sensor shape within radius of a meter-space point. Returns false when nothing is hit. Used by Cloth3D for particle-vs-body collision.

在文件 World3D.cpp 第 2080 行定义.

引用了 eve::physics::Hit, pointProbeFiltered(), radius, x, y , 以及 z.

◆ pointProbeFiltered()

ClothProbeStatus eve::physics::World3D::pointProbeFiltered ( float  x,
float  y,
float  z,
float  radius,
ClothContact3D *  out,
uint64_t  categoryBits,
uint64_t  maskBits 
) const

◆ queryAABB()

int eve::physics::World3D::queryAABB ( float  minX,
float  minY,
float  minZ,
float  maxX,
float  maxY,
float  maxZ 
)

Query shapes overlapping an AABB in meters (min/max corners). Returns match count; read ids with getQueryBodyId(i).

在文件 World3D.cpp 第 1502 行定义.

引用了 b, callback, context, filter, isValid(), shape , 以及 world.

◆ queryAabbBroadPhaseOwned()

eve::Result< BroadPhaseAabb3D > eve::physics::World3D::queryAabbBroadPhaseOwned ( float  minX,
float  minY,
float  minZ,
float  maxX,
float  maxY,
float  maxZ,
QueryFilter3D  filter = {} 
)

Queries one AABB into a fixed owning result without using the legacy query cache.

参数
filterFilter and exclusions scoped to this operation.
返回
Stable-id-sorted nearest-set evidence; truncated is observable when capacity is exceeded. @thread Call on the owning physics simulation thread. @reentrancy Does not invoke user callbacks; do not concurrently mutate this world.

在文件 World3D.cpp 第 1539 行定义.

引用了 body, eve::physics::BroadPhaseHit3D::bodyId, bounds, callback, collector, context, eve::physics::BroadPhaseAabb3D::count, error, filter, hit, eve::physics::BroadPhaseAabb3D::hits, eve::InvalidArgument, isValid(), output, shape, eve::physics::BroadPhaseHit3D::shapeId, eve::StaleHandle, eve::Result< T >::success() , 以及 world.

◆ queryBodyContacts()

int eve::physics::World3D::queryBodyContacts ( int  bodyId,
int  maxPoints 
)

Caches current touching manifold points for one stable Body3D ID. Results are oriented from the queried body toward the other body.

参数
maxPointsMaximum cached points in [1,4096].
返回
Number of cached points.

在文件 World3D.cpp 第 1096 行定义.

引用了 a, b, body, capacity, eve::physics::Body3D::getId(), eve::physics::Shape3D::getId(), eve::physics::Shape3D::getTag(), isValid(), normal, point , 以及 target.

◆ queryBox()

int eve::physics::World3D::queryBox ( float  x,
float  y,
float  z,
float  width,
float  height,
float  depth,
float  qx,
float  qy,
float  qz,
float  qw 
)

Query shapes overlapping an oriented box.

参数
widthFull positive box width along its local X axis.
heightFull positive box height along its local Y axis.
depthFull positive box depth along its local Z axis.
qxQuaternion X component; the quaternion is normalized internally.
qyQuaternion Y component.
qzQuaternion Z component.
qwQuaternion scalar component.
返回
Number of unique bodies hit.

在文件 World3D.cpp 第 1692 行定义.

引用了 depth, height, points, qw, qx, qy, qz, rotation, width, x, y , 以及 z.

◆ queryCapsule()

int eve::physics::World3D::queryCapsule ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz,
float  radius 
)

Query shapes overlapping an arbitrarily oriented capsule. The endpoints are the centers of its hemispherical caps.

返回
number of unique bodies hit

在文件 World3D.cpp 第 1636 行定义.

引用了 ax, ay, az, bx, by, bz, points , 以及 radius.

◆ queryCapsuleOwned()

eve::Result< CapsuleOverlap3D > eve::physics::World3D::queryCapsuleOwned ( float  ax,
float  ay,
float  az,
float  bx,
float  by,
float  bz,
float  radius,
QueryFilter3D  filter = {} 
)

Performs one capsule overlap and returns an owning summary without exposing the query cache.

参数
filterFilter and exclusions scoped to this operation.
返回
Owning overlap summary, or a structured failure for invalid input/world state. @thread Call on the owning physics simulation thread. @reentrancy Does not invoke user callbacks; do not concurrently mutate this world.

在文件 World3D.cpp 第 1647 行定义.

引用了 ax, ay, az, body, eve::physics::CapsuleOverlap3D::bodyCount, bx, by, bz, callback, collector, context, count, error, filter, eve::InvalidArgument, isValid(), points, radius, eve::StaleHandle, eve::Result< T >::success(), eve::physics::CapsuleOverlap3D::world , 以及 world.

◆ querySphere()

int eve::physics::World3D::querySphere ( float  x,
float  y,
float  z,
float  radius 
)

Query shapes overlapping a sphere in world meters.

参数
xsphere center X
ysphere center Y
zsphere center Z
radiussphere radius, finite and non-negative
返回
number of unique bodies hit

在文件 World3D.cpp 第 1627 行定义.

引用了 point, radius, x, y , 以及 z.

◆ raw()

b3WorldId eve::physics::World3D::raw ( ) const
inline

Raw Box3D world id.

在文件 World3D.h 第 969 行定义.

被这些函数引用 newBody().

◆ rayCast()

int eve::physics::World3D::rayCast ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
)

Closest raycast from (x1,y1,z1) to (x2,y2,z2) in meters. Returns hit body id, or -1. Read hit details via getRayHit*.

在文件 World3D.cpp 第 1332 行定义.

引用了 rayCastAll().

被这些函数引用 eve::physics::TargetingLineOfSightAdapter::query().

◆ rayCastAll()

int eve::physics::World3D::rayCastAll ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2,
int  maxHits 
)

Collects the nearest maxHits ray intersections, sorted by fraction then Shape ID.

返回
Number of cached intersections; read them with getRayResult*.

在文件 World3D.cpp 第 1405 行定义.

被这些函数引用 rayCast().

◆ rayCastFiltered()

int eve::physics::World3D::rayCastFiltered ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2,
uint64_t  maskBits 
)

带形状类别掩码的最短射线查询(掩码为接受的 shape categoryBits)。

在文件 World3D.cpp 第 1337 行定义.

引用了 filter.

◆ rayCastOwned()

eve::Result< RayHit3D > eve::physics::World3D::rayCastOwned ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2,
QueryFilter3D  filter = {} 
)

Performs one ray query and returns an owning, generation-qualified snapshot.

参数
filterFilter and exclusions used only for this operation; prior world query state is restored.
返回
A successful snapshot whose hit field distinguishes a normal miss, or a structured failure. @ownership The returned value owns its scalar data and retains no body, shape, or world pointers. @lifetime Handles must be re-resolved before later use and become stale with their physics owners. @thread Call on the owning physics simulation thread. @reentrancy Does not invoke user callbacks; do not concurrently mutate this world.

在文件 World3D.cpp 第 1345 行定义.

引用了 body, eve::physics::RayHit3D::body, eve::physics::RayHit3D::bodyId, callback, collector, context, error, filter, eve::physics::RayHit3D::fraction, eve::physics::RayHit3D::hit, eve::InvalidArgument, eve::InvariantViolation, eve::RuntimeHandle< Tag >::isInvalid(), isValid(), eve::physics::RayHit3D::materialId, normal, eve::physics::RayHit3D::normalX, eve::physics::RayHit3D::normalY, eve::physics::RayHit3D::normalZ, point, shape, eve::physics::RayHit3D::shape, eve::physics::RayHit3D::shapeId, eve::physics::RayHit3D::shapeTag, eve::StaleHandle, eve::Result< T >::success(), eve::physics::RayHit3D::triangleIndex, eve::physics::RayHit3D::world, world, eve::physics::RayHit3D::x, eve::physics::RayHit3D::y , 以及 eve::physics::RayHit3D::z.

◆ registerShapeHandle()

void eve::physics::World3D::registerShapeHandle ( Shape3D *  shape)

Internal: snapshots a backend handle for destruction-safe end events.

在文件 World3D.cpp 第 1026 行定义.

引用了 handle , 以及 shape.

被这些函数引用 eve::physics::Shape3D::Shape3D().

◆ resetQueryFilter()

void eve::physics::World3D::resetQueryFilter ( )

Restore the query filter to accept all lower-32-bit categories.

在文件 World3D.cpp 第 975 行定义.

◆ restore()

eve::Result< void > eve::physics::World3D::restore ( const eve::SnapshotEnvelope &  snapshot,
const eve::SnapshotHashProvider &  hashProvider 
)

Restores a verified snapshot without exposing partial state.

参数
snapshotVersioned envelope produced for this world schema.
hashProviderProvider used to verify its content hash.
返回
Applied after replacing live bodies, supported shapes, and supported joint topology from detached prepared state.
备注
The snapshot is borrowed for this call and runtime handles are never persisted or reused from its payload. Preparation is detached and failure leaves the live world unchanged. Schema v2 reconstructs shape sources and joint kind/local frames; joint motor, spring, limit, threshold, and collide-connected runtime settings are not represented and therefore restore to constructor defaults.

在文件 WorldSnapshot.cpp 第 945 行定义.

引用了 eve::physics::WorldSnapshotAccess::adopt(), eve::Applied, eve::Value::arraySize(), clearContactEvents(), eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Value::getIf(), eve::SnapshotEnvelope::instanceId, eve::Value::isArray(), eve::detail::Id128< Tag >::isNil(), isValid(), eve::ParseError, eve::SnapshotEnvelope::payload, eve::PreconditionViolation, eve::SnapshotEnvelope::schemaVersion, eve::Status::success(), eve::Result< T >::success(), eve::detail::StrongUint64< Tag >::value() , 以及 eve::verifySnapshotEnvelope().

◆ runtimeHandle()

PhysicsWorldHandle eve::physics::World3D::runtimeHandle ( ) const
inlinenoexcept

◆ setBodyPairCollisionEnabled()

void eve::physics::World3D::setBodyPairCollisionEnabled ( Body3D *  bodyA,
Body3D *  bodyB,
bool  enabled 
)

Overrides collision for a live body pair without changing layer masks.

在文件 World3D.cpp 第 810 行定义.

引用了 enabled, eve::physics::Body3D::getId(), eve::physics::Body3D::getWorld(), eve::physics::Body3D::isValid(), key , 以及 shape.

◆ setContactRecycleDistance()

void eve::physics::World3D::setContactRecycleDistance ( float  distance)

Sets contact-point persistence distance in meters; zero disables recycling.

在文件 World3D.cpp 第 252 行定义.

引用了 distance , 以及 isValid().

◆ setContactTuning()

void eve::physics::World3D::setContactTuning ( float  hertz,
float  dampingRatio,
float  pushOutSpeed 
)

Configures contact overlap recovery.

参数
hertzPositive contact stiffness frequency in cycles per second.
dampingRatioNon-negative damping ratio; 1 is critical damping.
pushOutSpeedNon-negative maximum overlap recovery speed in m/s.

在文件 World3D.cpp 第 239 行定义.

引用了 isValid().

◆ setContinuousCollisionEnabled()

void eve::physics::World3D::setContinuousCollisionEnabled ( bool  enabled)

Enables world-level continuous collision against static geometry.

在文件 World3D.cpp 第 221 行定义.

引用了 enabled , 以及 isValid().

◆ setGravity()

void eve::physics::World3D::setGravity ( float  gx,
float  gy,
float  gz 
)

Gravity in m/s².

在文件 World3D.cpp 第 775 行定义.

引用了 isValid().

◆ setHitEventThreshold()

void eve::physics::World3D::setHitEventThreshold ( float  speed)

Minimum approach speed in m/s required for enabled Shape3D hit events.

在文件 World3D.cpp 第 795 行定义.

引用了 isValid().

◆ setMaximumLinearSpeed()

void eve::physics::World3D::setMaximumLinearSpeed ( float  speed)

Sets the finite positive world-wide linear velocity clamp in m/s.

在文件 World3D.cpp 第 262 行定义.

引用了 isValid().

◆ setMoverSlopeLimit()

void eve::physics::World3D::setMoverSlopeLimit ( float  degrees)

Set maximum walkable slope in degrees, clamped to [0, 89.9].

在文件 World3D.cpp 第 1928 行定义.

引用了 degrees.

◆ setMoverUp()

void eve::physics::World3D::setMoverUp ( float  x,
float  y,
float  z 
)

Set the up direction used for grounded and slope classification.

在文件 World3D.cpp 第 1918 行定义.

引用了 x, y , 以及 z.

◆ setQueryFilter()

void eve::physics::World3D::setQueryFilter ( int  categoryBits,
int  maskBits 
)

Set category/mask bits for subsequent ray, overlap, cast and mover queries.

在文件 World3D.cpp 第 970 行定义.

◆ setQueryIgnoredBodyId()

void eve::physics::World3D::setQueryIgnoredBodyId ( int  bodyId)

Ignores one stable Body3D ID in subsequent spatial queries; -1 disables.

在文件 World3D.cpp 第 980 行定义.

◆ setQueryIgnoredShapeId()

void eve::physics::World3D::setQueryIgnoredShapeId ( int  shapeId)

Ignores one stable Shape3D ID in subsequent spatial queries; -1 disables.

在文件 World3D.cpp 第 986 行定义.

◆ setRestitutionThreshold()

void eve::physics::World3D::setRestitutionThreshold ( float  speed)

Minimum impact speed that permits material restitution, in m/s.

在文件 World3D.cpp 第 229 行定义.

引用了 isValid().

◆ setShapePairCollisionEnabled()

void eve::physics::World3D::setShapePairCollisionEnabled ( Shape3D *  shapeA,
Shape3D *  shapeB,
bool  enabled 
)

Overrides collision for one live shape pair.

在文件 World3D.cpp 第 835 行定义.

引用了 enabled, eve::physics::Shape3D::getBody(), eve::physics::Shape3D::getId(), eve::physics::Body3D::getWorld(), eve::physics::Shape3D::isValid() , 以及 key.

◆ setWarmStartingEnabled()

void eve::physics::World3D::setWarmStartingEnabled ( bool  enabled)

Enables constraint warm starting for stable stacks and joints.

在文件 World3D.cpp 第 272 行定义.

引用了 enabled , 以及 isValid().

◆ simulationObservation()

SimulationObservation eve::physics::World3D::simulationObservation ( ) const
noexcept

Snapshot of completed backend steps and logical simulation time.

在文件 World3D.cpp 第 761 行定义.

被这些函数引用 snapshot().

◆ simulationTick()

eve::SimulationTick eve::physics::World3D::simulationTick ( ) const
inlinenoexcept

Current deterministic tick; save data should persist this value.

在文件 World3D.h 第 139 行定义.

被这些函数引用 snapshot().

◆ snapshot()

eve::Result< eve::SnapshotEnvelope > eve::physics::World3D::snapshot ( const eve::SnapshotHashProvider &  hashProvider) const

Captures a versioned, integrity-checked 3D world snapshot.

参数
hashProviderInjected digest provider used to seal the envelope.
返回
A snapshot containing bodies plus shape and joint topology, including mesh and height-field sources.
备注
Schema v2 rejects unknown fields. The provider is not retained; this call is owner-thread-only.

在文件 WorldSnapshot.cpp 第 929 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), isValid(), eve::makeSnapshotEnvelope(), eve::PreconditionViolation, simulationObservation() , 以及 simulationTick().

◆ sphereCast()

bool eve::physics::World3D::sphereCast ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2,
float  radius,
uint64_t  maskBits,
int  ignoredBodyId,
CameraSphereHit3D *  out 
) const

Internal camera query: swept sphere against non-sensor shapes.

在文件 World3D.cpp 第 493 行定义.

引用了 body, callback, collector, context, filter, eve::physics::CameraSphereHit3D::fraction, eve::physics::CameraSphereHit3D::hit, isValid(), normal, point , 以及 radius.

◆ step()

eve::Result< void > eve::physics::World3D::step ( const eve::SimulationStep &  step,
const SimulationSettings &  settings = {} 
)

Advances the 3D domain with an injected deterministic step.

参数
stepTick and fixed duration supplied by SimulationClock or replay.
settingsSolver policy; subStepCount controls Box3D substeps.
返回
Applied when the step completed, or a structured rejection/failure.
备注
A rejected step leaves solver state and the current tick unchanged.

在文件 World3D.cpp 第 739 行定义.

引用了 clearContactEvents(), emitContactEvents(), eve::Diagnostic::error(), eve::Result< T >::failure(), isValid(), eve::PreconditionViolation, settings, shape, eve::SimulationStep::tick , 以及 valid.

◆ update()

void eve::physics::World3D::update ( float  dt)

Steps the simulation by dt seconds (default substep count).

在文件 World3D.cpp 第 726 行定义.

引用了 updateFull().

◆ updateFull()

void eve::physics::World3D::updateFull ( float  dt,
int  subStepCount 
)

Steps with an explicit substep count.

在文件 World3D.cpp 第 728 行定义.

引用了 EV_PROFILE_MODULE , 以及 step.

被这些函数引用 update().

◆ updateShapeTag()

void eve::physics::World3D::updateShapeTag ( Shape3D *  shape)

Internal: refreshes the tag snapshot for a live shape handle.

在文件 World3D.cpp 第 1069 行定义.

引用了 key , 以及 shape.

被这些函数引用 eve::physics::Shape3D::setTag().

◆ usedBackendFallback()

bool eve::physics::World3D::usedBackendFallback ( ) const
inlinenoexcept

Whether optional accelerator selection fell back to CPU.

在文件 World3D.h 第 158 行定义.

友元及相关函数文档

◆ action_adapter::ActionCollisionIgnoreState

在文件 World3D.h 第 1002 行定义.

◆ Body3D

friend class Body3D
friend

在文件 World3D.h 第 1004 行定义.

被这些函数引用 newBody().

◆ Joint3D

◆ Mechanism3D

friend class Mechanism3D
friend

在文件 World3D.h 第 1006 行定义.

被这些函数引用 newCrankSlider(), newRatchet() , 以及 newShaft().

◆ registerCameraObstructionWorld

void registerCameraObstructionWorld ( World3D *  world)
friend

Registers camera obstruction world.

在文件 PhysicsCapabilities.cpp 第 177 行定义.

◆ Shape3D

friend class Shape3D
friend

在文件 World3D.h 第 1007 行定义.

◆ TargetingLineOfSightAdapter

friend class TargetingLineOfSightAdapter
friend

在文件 World3D.h 第 1008 行定义.

◆ WorldSnapshotAccess

friend struct WorldSnapshotAccess
friend

在文件 World3D.h 第 1003 行定义.


该类的文档由以下文件生成: