|
Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
|
Manipulation of rotation or angles. More...
Functions | |
| template<typename T> | |
| T | NormalizeAngleToPeriod (T angle, T period=360.f) |
| Normalize angle to range <0, period>. Unit independent. | |
| FVector YASIUMATH_API | RotateBoundingBox (const FVector &Box, const FQuat &Rotation) |
| Rotate Box and calculate new bounding box along same axes to fit old box inside. | |
| void YASIUMATH_API | RotateCameraWithoutRoll (FRotator &CurrentRotator, float YawChange, float PitchChange, const float PitchLimit=85) |
| Adjust rotator yaw and pitch and keeps roll 0. | |
Manipulation of rotation or angles.
| T YasiuMath::Rotation::NormalizeAngleToPeriod | ( | T | angle, |
| T | period = 360.f ) |
Normalize angle to range <0, period>. Unit independent.
Normalization removes any excess periods.
Angle can be negative. Period must be > 0
| FVector YASIUMATH_API YasiuMath::Rotation::RotateBoundingBox | ( | const FVector & | Box, |
| const FQuat & | Rotation ) |
Rotate Box and calculate new bounding box along same axes to fit old box inside.
Helps find suboptimal bounding box for rotated meshes
| Box | Dimension of Bounding box |
| Rotation | Rotation to calculate |
| void YASIUMATH_API YasiuMath::Rotation::RotateCameraWithoutRoll | ( | FRotator & | CurrentRotator, |
| float | YawChange, | ||
| float | PitchChange, | ||
| const float | PitchLimit = 85 ) |
Adjust rotator yaw and pitch and keeps roll 0.
| CurrentRotator | |
| YawChange | |
| PitchChange | |
| PitchLimit | Limits pitch value to <-PitchLimit, PitchLimit> |