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

Classes

struct  Body
 What the module knows about a body beyond what PhysX holds. More...
struct  Character
struct  Joint
struct  World

Enumerations

enum  FilterWord : uint32_t { kLayerWord = 0 , kKindWord = 1 }
enum class  JointKind : uint8_t {
  Point , Hinge , Slider , Distance ,
  Fixed , SwingTwist , SixDOF
}

Functions

World & world ()
PxPhysics & physics ()
PxMaterial * defaultMaterial ()
 Friction 0.6, no bounce: the default physics material.
uint32_t entityOf (const physx::PxActor *actor)
 The entity an actor speaks for, or 0.

Variables

constexpr uint32_t LAYER_COUNT = 16
 Sixteen layers, the same number the Jolt backend and the 2D world name.
constexpr uint32_t KIND_CHARACTER = 1u
 kKindWord bits.

Enumeration Type Documentation

◆ FilterWord

Filter data words. word0 holds the layer INDEX rather than its bit, so the shader reads the live matrix, the same matrix Jolt consults per pair.

Enumerator
kLayerWord 
kKindWord 

Definition at line 45 of file PhysXWorld.hpp.

◆ JointKind

enum class esengine::physics3d_physx::JointKind : uint8_t
strong

Which PxJoint an entity's component made, so a motor or a reading knows what it is holding without RTTI.

Enumerator
Point 
Hinge 
Slider 
Distance 
Fixed 
SwingTwist 
SixDOF 

Definition at line 84 of file PhysXWorld.hpp.

Function Documentation

◆ defaultMaterial()

physx::PxMaterial * esengine::physics3d_physx::defaultMaterial ( )

Friction 0.6, no bounce: the default physics material.

Definition at line 338 of file PhysXModuleEntry.cpp.

Referenced by physics3d_addCharacter().

◆ entityOf()

uint32_t esengine::physics3d_physx::entityOf ( const physx::PxActor * actor)
inline

The entity an actor speaks for, or 0.

Definition at line 143 of file PhysXWorld.hpp.

Referenced by physics3d_raycastWith(), and physics3d_sphereCast().

◆ physics()

physx::PxPhysics & esengine::physics3d_physx::physics ( )

◆ world()

World & esengine::physics3d_physx::world ( )

Definition at line 336 of file PhysXModuleEntry.cpp.

Variable Documentation

◆ KIND_CHARACTER

uint32_t esengine::physics3d_physx::KIND_CHARACTER = 1u
constexpr

kKindWord bits.

Definition at line 47 of file PhysXWorld.hpp.

Referenced by physics3d_addCharacter().

◆ LAYER_COUNT

uint32_t esengine::physics3d_physx::LAYER_COUNT = 16
constexpr

Sixteen layers, the same number the Jolt backend and the 2D world name.

Definition at line 41 of file PhysXWorld.hpp.

Referenced by esengine::physics3d_physx::World::collide(), and physics3d_setLayerMask().