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

#include <PhysicsContext.hpp>

Classes

struct  PausedMotion
struct  OneWayNormal

Public Member Functions

void reset ()

Public Attributes

b2WorldId worldId = b2_nullWorldId
float fixedTimestep = 1.0f / 60.0f
int subStepCount = 4
float accumulator = 0.0f
std::unordered_map< uint32_t, b2BodyId > entityToBody
std::unordered_map< uint32_t, std::vector< b2ShapeId > > entityToShapes
std::unordered_map< uint32_t, b2JointId > entityToJoint
std::vector< uint32_t > dynamicBodyEntities
std::unordered_map< uint32_t, PausedMotion > pausedMotion
std::unordered_map< uint32_t, OneWayNormal > oneWayNormals
b2BodyId mouseBodyId = b2_nullBodyId
b2JointId mouseJointId = b2_nullJointId
std::vector< float > dynamicTransformBuffer
std::vector< float > posePrev
std::vector< float > poseCur
std::vector< float > poseInterpolated
std::unordered_map< uint32_t, uint32_t > posePrevIndex
std::vector< float > collisionEnterBuffer
std::vector< float > collisionExitBuffer
std::vector< float > sensorEnterBuffer
std::vector< float > sensorExitBuffer
std::vector< float > hitEventBuffer
float velocityBuffer [2] = {}
float gravityBuffer [2] = {}

Detailed Description

Definition at line 27 of file PhysicsContext.hpp.

Member Function Documentation

◆ reset()

Member Data Documentation

◆ accumulator

float PhysicsContext::accumulator = 0.0f

Definition at line 31 of file PhysicsContext.hpp.

Referenced by reset().

◆ collisionEnterBuffer

std::vector<float> PhysicsContext::collisionEnterBuffer

Definition at line 73 of file PhysicsContext.hpp.

Referenced by reset().

◆ collisionExitBuffer

std::vector<float> PhysicsContext::collisionExitBuffer

Definition at line 74 of file PhysicsContext.hpp.

Referenced by reset().

◆ dynamicBodyEntities

std::vector<uint32_t> PhysicsContext::dynamicBodyEntities

Definition at line 36 of file PhysicsContext.hpp.

Referenced by reset().

◆ dynamicTransformBuffer

std::vector<float> PhysicsContext::dynamicTransformBuffer

Definition at line 59 of file PhysicsContext.hpp.

Referenced by reset().

◆ entityToBody

std::unordered_map<uint32_t, b2BodyId> PhysicsContext::entityToBody

Definition at line 33 of file PhysicsContext.hpp.

Referenced by reset().

◆ entityToJoint

std::unordered_map<uint32_t, b2JointId> PhysicsContext::entityToJoint

Definition at line 35 of file PhysicsContext.hpp.

Referenced by reset().

◆ entityToShapes

std::unordered_map<uint32_t, std::vector<b2ShapeId> > PhysicsContext::entityToShapes

Definition at line 34 of file PhysicsContext.hpp.

Referenced by reset().

◆ fixedTimestep

float PhysicsContext::fixedTimestep = 1.0f / 60.0f

Definition at line 29 of file PhysicsContext.hpp.

◆ gravityBuffer

float PhysicsContext::gravityBuffer[2] = {}

Definition at line 80 of file PhysicsContext.hpp.

◆ hitEventBuffer

std::vector<float> PhysicsContext::hitEventBuffer

Definition at line 77 of file PhysicsContext.hpp.

Referenced by reset().

◆ mouseBodyId

b2BodyId PhysicsContext::mouseBodyId = b2_nullBodyId

Definition at line 56 of file PhysicsContext.hpp.

Referenced by reset().

◆ mouseJointId

b2JointId PhysicsContext::mouseJointId = b2_nullJointId

Definition at line 57 of file PhysicsContext.hpp.

Referenced by reset().

◆ oneWayNormals

std::unordered_map<uint32_t, OneWayNormal> PhysicsContext::oneWayNormals

Definition at line 52 of file PhysicsContext.hpp.

Referenced by reset().

◆ pausedMotion

std::unordered_map<uint32_t, PausedMotion> PhysicsContext::pausedMotion

Definition at line 43 of file PhysicsContext.hpp.

Referenced by reset().

◆ poseCur

std::vector<float> PhysicsContext::poseCur

Definition at line 67 of file PhysicsContext.hpp.

Referenced by reset().

◆ poseInterpolated

std::vector<float> PhysicsContext::poseInterpolated

Definition at line 68 of file PhysicsContext.hpp.

Referenced by reset().

◆ posePrev

std::vector<float> PhysicsContext::posePrev

Definition at line 66 of file PhysicsContext.hpp.

Referenced by reset().

◆ posePrevIndex

std::unordered_map<uint32_t, uint32_t> PhysicsContext::posePrevIndex

Definition at line 71 of file PhysicsContext.hpp.

Referenced by reset().

◆ sensorEnterBuffer

std::vector<float> PhysicsContext::sensorEnterBuffer

Definition at line 75 of file PhysicsContext.hpp.

Referenced by reset().

◆ sensorExitBuffer

std::vector<float> PhysicsContext::sensorExitBuffer

Definition at line 76 of file PhysicsContext.hpp.

Referenced by reset().

◆ subStepCount

int PhysicsContext::subStepCount = 4

Definition at line 30 of file PhysicsContext.hpp.

◆ velocityBuffer

float PhysicsContext::velocityBuffer[2] = {}

Definition at line 79 of file PhysicsContext.hpp.

◆ worldId

b2WorldId PhysicsContext::worldId = b2_nullWorldId

Definition at line 28 of file PhysicsContext.hpp.

Referenced by reset().


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