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.
  • SolverConstants - holds the constants for the solver.

Bundles

  • RigidBodyBundle - encapsulates the creation all components required for a rigid body.
  • StaticBodyBundle - encapsulates the creation all components required for a static body.

Components

  • 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 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 plugin.hpp
Plugin entry point.
file damping.hpp
Resource cubos::engine::Damping.
file gravity.hpp
Resource cubos::engine::Gravity.
file solver_constants.hpp
Resource cubos::engine::SolverConstants.
file rigid_body_bundle.hpp
Component cubos::engine::RigidBodyBundle.
file static_body_bundle.hpp
Component cubos::engine::StaticBodyBundle.

Classes

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::Damping
Resource which holds the damping value for integration.
struct cubos::engine::Gravity
Resource which holds the global value of gravity.
struct cubos::engine::SolverConstants
Resource which allows configuration over constants in the solver plugin.
struct cubos::engine::RigidBodyBundle
Component which encapsulates the creation all physics components required for a rigid body. A rigid body has all physical properties.
struct cubos::engine::StaticBodyBundle
Component which encapsulates the creation all physics components required for a static body. A static body has all physical properties but is physically immovable (its mass is infinite).

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