Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
Loading...
Searching...
No Matches
UYasiuMathFL_Rotation Class Reference

BP Function library related to rotation and angles. More...

#include <BPFunLib_Rotation.h>

Inheritance diagram for UYasiuMathFL_Rotation:
UYasiuMathFunctionLibrary

Static Public Member Functions

static double ClipAngleToCycle (double angle, double period)
 Normalize angle to range <0, period>. Unit independent.
static FVector RotateBoundingBox (const FVector &BoxSize, const FQuat &Rotation)
 Rotate Box and calculate new bounding box along same axes to fix old box inside.213123.
static FRotator RotateCamera (const FRotator &CurrentRotator, float YawChange, float PitchChange, const float PitchLimit=85)
 Adjust rotator yaw and pitch and keeps roll 0.

Detailed Description

BP Function library related to rotation and angles.

Member Function Documentation

◆ ClipAngleToCycle()

double UYasiuMathFL_Rotation::ClipAngleToCycle ( double angle,
double period )
static

Normalize angle to range <0, period>. Unit independent.

Normalization removes any excess periods.

Angle can be negative. Period must be > 0

Note
Example:
Angle = -12, Period = 10
Result -> 8

◆ RotateBoundingBox()

FVector UYasiuMathFL_Rotation::RotateBoundingBox ( const FVector & BoxSize,
const FQuat & Rotation )
static

Rotate Box and calculate new bounding box along same axes to fix old box inside.213123.

Helps find suboptimal bounding box for rotated meshes

Note
Function can take both Dimensions and Box Extent.
Parameters
BoxSizeDimension of Bounding box
RotationRotation to calculate
Returns
Returns size in same units as passed BoxSize

◆ RotateCamera()

FRotator UYasiuMathFL_Rotation::RotateCamera ( const FRotator & CurrentRotator,
float YawChange,
float PitchChange,
const float PitchLimit = 85 )
static

Adjust rotator yaw and pitch and keeps roll 0.

Parameters
CurrentRotator
YawChange
PitchChange
PitchLimitLimits pitch value to <-PitchLimit, PitchLimit>
Returns
New Rotator

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