Toast Engine
Loading...
Searching...
No Matches
physics::Body Struct Reference
Collaboration diagram for physics::Body:

Public Member Functions

auto worldCenterOfMass () const -> glm::vec3

Public Attributes

BodyType type = BodyType::dynamic_body
bool enabled = true
bool awake = true
bool allow_sleep = true
bool sleep_locked = false
float sleep_timer = 0.0f
float asleep_seconds = 0.0f
glm::vec3 sleep_anchor_center = {}
glm::quat sleep_anchor_rotation = glm::quat(1.0f, 0.0f, 0.0f, 0.0f)
glm::vec3 position = {}
glm::quat rotation = glm::quat(1.0f, 0.0f, 0.0f, 0.0f)
glm::vec3 previous_position = {}
glm::quat previous_rotation = glm::quat(1.0f, 0.0f, 0.0f, 0.0f)
glm::vec3 linear_velocity = {}
glm::vec3 angular_velocity = {}
float inverse_mass = 1.0f
float gravity_scale = 1.0f
glm::mat3 inverse_inertia_local = {0.0f}
glm::mat3 inverse_inertia_world = {0.0f}
glm::vec3 local_center_of_mass = {}
float extent_radius = 0.0f
glm::bvec3 lock_position = glm::bvec3(false)
 Distance to the center of mass.
glm::bvec3 lock_rotation = glm::bvec3(false)
float linear_damping = 0.0f
float angular_damping = 0.0f
float drag_scale = 1.0f
LayerFilter layers
float drag_coefficient = 0.0f
float drag_area_base = 0.0f
glm::vec3 drag_area_axis = {}

The documentation for this struct was generated from the following file: