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

Functions

static constexpr JPH::ObjectLayer of (JPH::uint layer, bool moving)
static constexpr JPH::uint indexOf (JPH::ObjectLayer layer)
static constexpr bool isMoving (JPH::ObjectLayer layer)

Variables

static constexpr JPH::uint COUNT = 16
static constexpr JPH::ObjectLayer OBJECT_LAYER_COUNT = COUNT * 2

Function Documentation

◆ indexOf()

constexpr JPH::uint esengine::physics3d::Layers::indexOf ( JPH::ObjectLayer layer)
staticconstexpr

◆ isMoving()

◆ of()

constexpr JPH::ObjectLayer esengine::physics3d::Layers::of ( JPH::uint layer,
bool moving )
staticconstexpr

An ObjectLayer packs the layer index with whether the body moves: Jolt asks which broad-phase tree a layer belongs to, and a bare index cannot say.

Definition at line 50 of file Physics3DContext.hpp.

Referenced by physics3d_moveCharacter().

Variable Documentation

◆ COUNT

JPH::uint esengine::physics3d::Layers::COUNT = 16
staticconstexpr

How many collision layers a project can name. Sixteen, like the 2D world's mask bits, so a project describes its layers once for both.

Definition at line 47 of file Physics3DContext.hpp.

Referenced by esengine::physics3d::LayerMatrix::collide(), and physics3d_setLayerMask().

◆ OBJECT_LAYER_COUNT

JPH::ObjectLayer esengine::physics3d::Layers::OBJECT_LAYER_COUNT = COUNT * 2
staticconstexpr

Definition at line 55 of file Physics3DContext.hpp.