Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
PhysXWorld.hpp File Reference

The one 3D world the PhysX backend steps. More...

#include <PxPhysicsAPI.h>
#include <cstdint>
#include <memory>
#include <unordered_map>
#include <vector>
Include dependency graph for PhysXWorld.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

namespace  esengine
namespace  esengine::physics3d_physx

Macros

#define EMSCRIPTEN_KEEPALIVE

Enumerations

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

Functions

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

Variables

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

Detailed Description

The one 3D world the PhysX backend steps.

The second implementation of Physics3DBindings.hpp, beside the Jolt one. The SDK cannot tell them apart by their entry points; what differs is the solver, which here is set up as follows: projected Gauss-Seidel, patch friction, Average combine, a 0.01 m contact offset, a 2 m/s bounce threshold, a 0.005 sleep energy, six position and one velocity iterations, and a maximum angular velocity of 50 rad/s.

Bodies are named by small integers the module hands out, the way Jolt's BodyIDs are; a PhysX actor pointer never crosses to the SDK.

Author
ESEngine Team
Date
2026

Definition in file PhysXWorld.hpp.

Macro Definition Documentation

◆ EMSCRIPTEN_KEEPALIVE

#define EMSCRIPTEN_KEEPALIVE

Definition at line 35 of file PhysXWorld.hpp.