|
EGXPhys
|
Functions | |
| template<typename T > | |
| T | EGXMath::CylinderSurfaceArea (const T radius, const T height) |
| Finds the surface area, \(A_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\): \[ A_{cyl}=2\pi r^2 + 2\pi r h \] . More... | |
| template<typename T > | |
| T | EGXMath::CylinderVolume (const T radius, const T height) |
| Finds the volume, \(V_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\): \[ V_{cyl}=\pi r^2 h\] . More... | |
| template<typename T , typename T2 > | |
| void | EGXMath::CylinderInertia (const T mass, const T height, const T radius, T2(&matrix)[9]) |
| Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane. \[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \] See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaCylinder.html. More... | |
| template<typename T , typename T2 > | |
| void | EGXMath::CylinderInertia (const T mass, const T height, const T radius, std::vector< T2 > &matrix) |
| Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane. \[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \] See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaCylinder.html. More... | |
| template<typename T , typename T2 > | |
| void | EGXMath::CylinderInertia (const T mass, const T height, const T radius, glm::mat3 &matrix) |
| Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane. \[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \] See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaCylinder.html. More... | |
| void EGXMath::CylinderInertia | ( | const T | mass, |
| const T | height, | ||
| const T | radius, | ||
| T2(&) | matrix[9] | ||
| ) |
Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.
\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]
See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaCylinder.html.
| mass | \( m\ (kg)\) Mass of cylinder in kilograms. |
| height | \( r\ (m)\) Height of cylinder in meters. |
| radius | \( r\ (m)\) Radius of cylinder in meters. |
| matrix | \( I_{cyl}\ (kg\ m^2)\) Inertia tensor matrix in kilograms meter squared. |
| void EGXMath::CylinderInertia | ( | const T | mass, |
| const T | height, | ||
| const T | radius, | ||
| std::vector< T2 > & | matrix | ||
| ) |
Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.
\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]
See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaCylinder.html.
| mass | \( m\ (kg)\) Mass of cylinder in kilograms. |
| height | \( r\ (m)\) Height of cylinder in meters. |
| radius | \( r\ (m)\) Radius of cylinder in meters. |
| matrix | \( I_{disk}\ (kg\ m^2)\) Inertia tensor matrix in kilograms meter squared. |
| void EGXMath::CylinderInertia | ( | const T | mass, |
| const T | height, | ||
| const T | radius, | ||
| glm::mat3 & | matrix | ||
| ) |
Finds the moment of inertia tensor, \(I_{cyl}\) of a cylinder with radius, \(r\), height, \(h\) and mass \(m\). The circular componet lays in the x,y plane.
\[ I_{cyl}=\begin{bmatrix} \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0 & 0\\ 0 & \frac{1}{12}m\ h^2 + \frac{1}{4}m\ r^2 & 0\\ 0 & 0 & \frac{1}{2}m\ r^2 \end{bmatrix} \]
See https://en.wikipedia.org/wiki/List_of_moments_of_inertia and http://scienceworld.wolfram.com/physics/MomentofInertiaCylinder.html.
| mass | \( m\ (kg)\) Mass of cylinder in kilograms. |
| height | \( r\ (m)\) Height of cylinder in meters. |
| radius | \( r\ (m)\) Radius of cylinder in meters. |
| matrix | \( I_{cyl}\ (kg\ m^2)\) Inertia tensor matrix in kilograms meter squared. |
| T EGXMath::CylinderSurfaceArea | ( | const T | radius, |
| const T | height | ||
| ) |
Finds the surface area, \(A_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\):
\[ A_{cyl}=2\pi r^2 + 2\pi r h \]
.
| radius | \( r\ (m)\) Radius of cylinder in meters. |
| height | \( r\ (m)\) Height of cylinder in meters. |
| T EGXMath::CylinderVolume | ( | const T | radius, |
| const T | height | ||
| ) |
Finds the volume, \(V_{cyl}\), in meter squared of a cylinder with radius \(r\) and height \(h\):
\[ V_{cyl}=\pi r^2 h\]
.
| radius | \( r\ (m)\) Radius of cylinder in meters. |
| height | \( r\ (m)\) Height of cylinder in meters. |