Engine » Physics module

Creates and handles the physics simulation.

Resources

  • Damping - holds the damping value for integration.
  • Substeps - holds the amount of substeps for the physics update.

Components

  • PhysicsBundle - bundle that holds the physics information to give to a new entity.
  • Velocity - holds the information for moving an object straight.
  • AngularVelocity - holds the angular velocity of an object.
  • Force - holds forces applied on a particle.
  • Torque - holds torque applied on an object.
  • Impulse - holds impulses applied on a particle.
  • AngularImpulse - holds angular impulses applied on a particle.
  • Mass - holds the mass of an object.
  • Inertia - holds the inertia tensor of an object.
  • CenterOfMass - holds the center of mass of an object.
  • AccumulatedCorrection - holds the corrections accumulated from the constraints solving.
  • PhysicsMaterial - holds the friction and bounciness properties of the particle.

Dependencies

Modules

module Gravity
Adds gravity to particles.
module Solver
Adds solver for constraints.

Files

file accumulated_correction.hpp
Component cubos::engine::AccumulatedCorrection.
file angular_impulse.hpp
Component cubos::engine::AngularImpulse.
file angular_velocity.hpp
Component cubos::engine::AngularVelocity.
file center_of_mass.hpp
Component cubos::engine::CenterOfMass.
file force.hpp
Component cubos::engine::Force.
file impulse.hpp
Component cubos::engine::Impulse.
file inertia.hpp
Component cubos::engine::Inertia.
file mass.hpp
Component cubos::engine::Mass.
file physics_material.hpp
Component cubos::engine::PhysicsMaterial.
file torque.hpp
Component cubos::engine::Torque.
file velocity.hpp
Component cubos::engine::Velocity.
file physics_bundle.hpp
Component cubos::engine::PhysicsBundle.
file plugin.hpp
Plugin entry point.
file damping.hpp
Resource cubos::engine::Damping.
file gravity.hpp
Resource cubos::engine::Gravity.

Classes

struct cubos::engine::AccumulatedCorrection
Component which holds the corrections accumulated from the constraints solving.
struct cubos::engine::AngularImpulse
Component which holds angular impulses applied on a body.
struct cubos::engine::AngularVelocity
Component which holds angular velocity of a body.
struct cubos::engine::CenterOfMass
Component which defines the center of mass of a body.
struct cubos::engine::Force
Component which holds forces applied on a particle.
struct cubos::engine::Impulse
Component which holds impulses applied on a particle.
struct cubos::engine::Inertia
Component which defines the inertia of a body.
struct cubos::engine::Mass
Component which defines the mass of a particle.
struct cubos::engine::PhysicsMaterial
Component which defines the friction and bounciness of a body.
struct cubos::engine::Torque
Component which holds torque applied on a body.
struct cubos::engine::Velocity
Component which holds velocity and forces applied on a particle.
struct cubos::engine::PhysicsBundle
Component which encapsulates the creation all components required for physics.
struct cubos::engine::Damping
Resource which holds the damping value for integration.
struct cubos::engine::Gravity
Resource which holds the global value of gravity.

Functions

auto physicsPlugin(Cubos& cubos) -> CUBOS_ENGINE_API void
Plugin entry function.

Function documentation

CUBOS_ENGINE_API void physicsPlugin(Cubos& cubos)

Plugin entry function.

Parameters
cubos Cubos main class