EGXPhys

Functions

void EGXPhys::Torque (const glm::vec3 &positionFromFulcrumInm, const glm::vec3 &forceInN, glm::vec3 &torqueInNm)
 Calculates the torque, \(\tau\), in Newton meters. Torque on an object is calculated from the force, \(F\), applied to an object at a position, \(r\), away from the fulcrum (pivot point):

\[\tau=r \times F \]

. More...

 

Detailed Description

Function Documentation

◆ Torque()

void EGXPhys::Torque ( const glm::vec3 &  positionFromFulcrumInm,
const glm::vec3 &  forceInN,
glm::vec3 &  torqueInNm 
)
inline

Calculates the torque, \(\tau\), in Newton meters. Torque on an object is calculated from the force, \(F\), applied to an object at a position, \(r\), away from the fulcrum (pivot point):

\[\tau=r \times F \]

.

See https://en.wikipedia.org/wiki/Torque

Parameters
positionFromFulcrumInm\(r\ (m)\) Position that the force is apply to object away from fulcrum(pivot point) in meters.
forceInN\(F\ (N)\) Force vector applied to object in Newtons.
torqueInNm\(\tau\ (N\ m)\) Torque in Newton meters.