Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::sim::anonymous_namespace{physics_scene.cpp} Namespace Reference

Functions

int64_t HalfExtentFromMillimeters (int64_t sideMillimeters)
PhysicsSceneBody MakeGround ()
PhysicsSceneBody MakeMeterCube (uint64_t massKg, int64_t bottom)
std::array< int32_t, 4 > MultiplyQuaternion (const std::array< int32_t, 4 > &a, const std::array< int32_t, 4 > &b)
std::array< int32_t, 4 > AxisRotation (uint32_t axis, uint32_t angle)
std::array< int32_t, 4 > RandomRotation (uint64_t seed, uint64_t id)
void AddPen (PhysicsScene &scene, uint64_t removeTick)
PhysicsSceneBody MakeFallingBox (uint64_t seed, uint64_t index)

Variables

constexpr int64_t METER = (int64_t)1 << POSITION_FRACTION_BITS
constexpr uint64_t MILLIGRAMS_PER_KG = 1000000
constexpr uint32_t PURPOSE_SIZE = 0x50480001u
constexpr uint32_t PURPOSE_DENSITY = 0x50480002u
constexpr uint32_t PURPOSE_ANGLE = 0x50480003u
constexpr uint32_t PURPOSE_JITTER = 0x50480004u

Function Documentation

◆ AddPen()

void bicameral::sim::anonymous_namespace{physics_scene.cpp}::AddPen ( PhysicsScene & scene,
uint64_t removeTick )

Definition at line 79 of file physics_scene.cpp.

References AddPen(), bicameral::sim::PhysicsScene::bodies, and METER.

Referenced by AddPen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AxisRotation()

std::array< int32_t, 4 > bicameral::sim::anonymous_namespace{physics_scene.cpp}::AxisRotation ( uint32_t axis,
uint32_t angle )

Definition at line 58 of file physics_scene.cpp.

References AxisRotation().

Referenced by AxisRotation(), and RandomRotation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HalfExtentFromMillimeters()

int64_t bicameral::sim::anonymous_namespace{physics_scene.cpp}::HalfExtentFromMillimeters ( int64_t sideMillimeters)

Definition at line 23 of file physics_scene.cpp.

References HalfExtentFromMillimeters(), and METER.

Referenced by HalfExtentFromMillimeters(), and MakeFallingBox().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeFallingBox()

PhysicsSceneBody bicameral::sim::anonymous_namespace{physics_scene.cpp}::MakeFallingBox ( uint64_t seed,
uint64_t index )

Definition at line 100 of file physics_scene.cpp.

References HalfExtentFromMillimeters(), MakeFallingBox(), METER, PURPOSE_DENSITY, PURPOSE_JITTER, PURPOSE_SIZE, and RandomRotation().

Referenced by MakeFallingBox().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeGround()

PhysicsSceneBody bicameral::sim::anonymous_namespace{physics_scene.cpp}::MakeGround ( )

Definition at line 28 of file physics_scene.cpp.

References MakeGround(), and METER.

Referenced by MakeGround().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeMeterCube()

PhysicsSceneBody bicameral::sim::anonymous_namespace{physics_scene.cpp}::MakeMeterCube ( uint64_t massKg,
int64_t bottom )

Definition at line 36 of file physics_scene.cpp.

References MakeMeterCube(), METER, and MILLIGRAMS_PER_KG.

Referenced by MakeMeterCube().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MultiplyQuaternion()

std::array< int32_t, 4 > bicameral::sim::anonymous_namespace{physics_scene.cpp}::MultiplyQuaternion ( const std::array< int32_t, 4 > & a,
const std::array< int32_t, 4 > & b )

Definition at line 45 of file physics_scene.cpp.

References MultiplyQuaternion().

Referenced by MultiplyQuaternion(), and RandomRotation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RandomRotation()

std::array< int32_t, 4 > bicameral::sim::anonymous_namespace{physics_scene.cpp}::RandomRotation ( uint64_t seed,
uint64_t id )

Definition at line 67 of file physics_scene.cpp.

References AxisRotation(), MultiplyQuaternion(), PURPOSE_ANGLE, and RandomRotation().

Referenced by MakeFallingBox(), and RandomRotation().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ METER

int64_t bicameral::sim::anonymous_namespace{physics_scene.cpp}::METER = (int64_t)1 << POSITION_FRACTION_BITS
constexpr

◆ MILLIGRAMS_PER_KG

uint64_t bicameral::sim::anonymous_namespace{physics_scene.cpp}::MILLIGRAMS_PER_KG = 1000000
constexpr

Definition at line 14 of file physics_scene.cpp.

Referenced by MakeMeterCube().

◆ PURPOSE_ANGLE

uint32_t bicameral::sim::anonymous_namespace{physics_scene.cpp}::PURPOSE_ANGLE = 0x50480003u
constexpr

Definition at line 19 of file physics_scene.cpp.

Referenced by RandomRotation().

◆ PURPOSE_DENSITY

uint32_t bicameral::sim::anonymous_namespace{physics_scene.cpp}::PURPOSE_DENSITY = 0x50480002u
constexpr

Definition at line 18 of file physics_scene.cpp.

Referenced by MakeFallingBox().

◆ PURPOSE_JITTER

uint32_t bicameral::sim::anonymous_namespace{physics_scene.cpp}::PURPOSE_JITTER = 0x50480004u
constexpr

Definition at line 20 of file physics_scene.cpp.

Referenced by MakeFallingBox().

◆ PURPOSE_SIZE

uint32_t bicameral::sim::anonymous_namespace{physics_scene.cpp}::PURPOSE_SIZE = 0x50480001u
constexpr

Definition at line 17 of file physics_scene.cpp.

Referenced by MakeFallingBox().