PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::d2::Velocity Struct Reference

2-D velocity related data structure. More...

#include <Velocity.hpp>

Collaboration diagram for playrho::d2::Velocity:
[legend]

Public Attributes

LinearVelocity2 linear
 Linear velocity.
 
AngularVelocity angular
 Angular velocity.
 

Related Functions

(Note that these are not member functions.)

constexpr bool operator== (const Velocity &lhs, const Velocity &rhs)
 Equality operator.
 
constexpr bool operator!= (const Velocity &lhs, const Velocity &rhs)
 Inequality operator.
 
constexpr Velocityoperator*= (Velocity &lhs, const Real rhs)
 Multiplication assignment operator.
 
constexpr Velocityoperator/= (Velocity &lhs, const Real rhs)
 Division assignment operator.
 
constexpr Velocityoperator+= (Velocity &lhs, const Velocity &rhs)
 Addition assignment operator.
 
constexpr Velocity operator+ (const Velocity &lhs, const Velocity &rhs)
 Addition operator.
 
constexpr Velocityoperator-= (Velocity &lhs, const Velocity &rhs)
 Subtraction assignment operator.
 
constexpr Velocity operator- (const Velocity &lhs, const Velocity &rhs)
 Subtraction operator.
 
constexpr Velocity operator- (const Velocity &value)
 Negation operator.
 
constexpr Velocity operator+ (const Velocity &value)
 Positive operator.
 
constexpr Velocity operator* (const Velocity &lhs, const Real rhs)
 Multiplication operator.
 
constexpr Velocity operator* (const Real lhs, const Velocity &rhs)
 Multiplication operator.
 
constexpr Velocity operator/ (const Velocity &lhs, const Real rhs)
 Division operator.
 
Velocity Cap (Velocity velocity, Time h, const MovementConf &conf) noexcept
 Caps velocity. More...
 
template<>
constexpr bool IsValid (const d2::Velocity &value) noexcept
 Determines if the given value is valid.
 

Detailed Description

2-D velocity related data structure.

Note
This data structure is 12-bytes (with 4-byte Real on at least one 64-bit platform).
Examples
Body.cpp, PulleyJoint.cpp, RevoluteJoint.cpp, TargetJoint.cpp, World.cpp, and WorldBody.cpp.

Friends And Related Function Documentation

◆ Cap()

Velocity Cap ( Velocity  velocity,
Time  h,
const MovementConf conf 
)
related

Caps velocity.

Enforces maximums on the given velocity.

Parameters
velocityVelocity to cap. Behavior is undefined if this value is invalid.
hTime elapsed to get velocity for. Behavior is undefined if this value is invalid.
confMovement configuration. This defines caps on linear and angular speeds.

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