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

Velocity component for simple kinematic motion. More...

#include <Velocity.hpp>

Public Member Functions

 Velocity ()=default
 Default constructor (zero velocity).
 Velocity (const glm::vec3 &lin)
 Constructs with linear velocity only.
 Velocity (const glm::vec3 &lin, const glm::vec3 &ang)
 Constructs with both linear and angular velocity.

Public Attributes

glm::vec3 linear {0.0f}
 Linear velocity (units per second).
glm::vec3 angular {0.0f}
 Angular velocity (radians per second).

Detailed Description

Velocity component for simple kinematic motion.

Stores linear and angular velocity. The SDK's VelocitySystem integrates it into Transform every Update in play mode; entities owned by the physics solver (RigidBody2D) are skipped so the two never double-move an entity.

Note
Angular velocity is in radians per second around each axis.

Definition at line 41 of file Velocity.hpp.

Constructor & Destructor Documentation

◆ Velocity() [1/3]

esengine::ecs::Velocity::Velocity ( )
default

Default constructor (zero velocity).

◆ Velocity() [2/3]

esengine::ecs::Velocity::Velocity ( const glm::vec3 & lin)
inlineexplicit

Constructs with linear velocity only.

Parameters
linLinear velocity vector

Definition at line 57 of file Velocity.hpp.

References linear.

◆ Velocity() [3/3]

esengine::ecs::Velocity::Velocity ( const glm::vec3 & lin,
const glm::vec3 & ang )
inline

Constructs with both linear and angular velocity.

Parameters
linLinear velocity vector
angAngular velocity vector

Definition at line 64 of file Velocity.hpp.

References angular, and linear.

Member Data Documentation

◆ angular

glm::vec3 esengine::ecs::Velocity::angular {0.0f}

Angular velocity (radians per second).

Definition at line 48 of file Velocity.hpp.

Referenced by Velocity(), and EMSCRIPTEN_BINDINGS().

◆ linear

glm::vec3 esengine::ecs::Velocity::linear {0.0f}

Linear velocity (units per second).

Definition at line 44 of file Velocity.hpp.

Referenced by Velocity(), Velocity(), and EMSCRIPTEN_BINDINGS().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/ecs/components/Velocity.hpp