Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::physics3d_physx::Body Struct Reference

What the module knows about a body beyond what PhysX holds. More...

#include <PhysXWorld.hpp>

Public Attributes

uint32_t id = 0
uint32_t entity = 0
uint32_t layer = 0
physx::PxRigidActor * actor = nullptr
bool sensor = false
bool character = false
float gravityScale = 1.0f
physx::PxVec3 kinematicVelocity {0.0f}
bool hasKinematicVelocity = false

Detailed Description

What the module knows about a body beyond what PhysX holds.

Definition at line 50 of file PhysXWorld.hpp.

Member Data Documentation

◆ actor

physx::PxRigidActor* esengine::physics3d_physx::Body::actor = nullptr

◆ character

bool esengine::physics3d_physx::Body::character = false

Definition at line 56 of file PhysXWorld.hpp.

Referenced by physics3d_step().

◆ entity

uint32_t esengine::physics3d_physx::Body::entity = 0

Definition at line 52 of file PhysXWorld.hpp.

◆ gravityScale

float esengine::physics3d_physx::Body::gravityScale = 1.0f

PhysX has no per-body gravity factor, only on or off. A body whose scale is not 1 has gravity off and is given g * scale as an acceleration before every substep, which is the same integral.

Definition at line 60 of file PhysXWorld.hpp.

◆ hasKinematicVelocity

bool esengine::physics3d_physx::Body::hasKinematicVelocity = false

Definition at line 64 of file PhysXWorld.hpp.

Referenced by physics3d_setLinearVelocity().

◆ id

uint32_t esengine::physics3d_physx::Body::id = 0

Definition at line 51 of file PhysXWorld.hpp.

◆ kinematicVelocity

physx::PxVec3 esengine::physics3d_physx::Body::kinematicVelocity {0.0f}

A kinematic body moves by the velocity it was given, the way a Jolt one does; PhysX moves a kinematic body only to a target, set every substep.

Definition at line 63 of file PhysXWorld.hpp.

Referenced by physics3d_getBodyState(), and physics3d_setLinearVelocity().

◆ layer

uint32_t esengine::physics3d_physx::Body::layer = 0

Definition at line 53 of file PhysXWorld.hpp.

◆ sensor

bool esengine::physics3d_physx::Body::sensor = false

Definition at line 55 of file PhysXWorld.hpp.


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/bindings/modules/physics3d_physx/PhysXWorld.hpp