Rotation Struct Reference
#include <Rotation.h>
![](../class_rotation.png)
# Static Public Member Functions | |
static Rotation | zero () |
static Rotation | invert (Rotation rotation) |
static Rotation | clamp (fixed_ext_t x, fixed_ext_t y, fixed_ext_t z) |
static fixed_t | getShortestDifferce (fixed_t angleFrom, fixed_t angleTo) |
static Rotation | sum (Rotation a, Rotation b) |
static Rotation | sub (Rotation a, Rotation b) |
static Rotation | intermediate (Rotation a, Rotation b) |
static Rotation | scalarProduct (Rotation rotation, int16 scalar) |
static Rotation | scalarDivision (Rotation rotation, int16 scalar) |
static Rotation | getRelativeToCamera (Rotation rotation) |
static Rotation | getFromPixelRotation (PixelRotation pixelRotation) |
static Rotation | getFromScreenPixelRotation (ScreenPixelRotation pixelRotation) |
static bool | areEqual (Rotation a, Rotation b) |
static void | print (Rotation rotation, int32 x, int32 y) |
# Public Attributes | |
int16 | x |
int16 | y |
int16 | z |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
const void * | getVTable () |
bool | mutateTo (const void *targetClass) |
![]() | |
static Object | getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod) |
![]() | |
void * | vTable |
Pointer to the class's virtual table. |
# Detailed Description
Class Rotation
Inherits from Object
Implements methods to operate on Rotation structs.
Definition at line 36 of file Rotation.h.
# Member Function Documentation
# areEqual()
Test if two rotations are equal.
- Parameters
-
a First rotation b Second rotation
- Returns
- True if all the components of both rotations are equal; false otherwise
Definition at line 255 of file Rotation.h.
# clamp()
|
inlinestatic |
Clamp the rotation's components to 0-511 range.
- Parameters
-
x Rotation's x component to clamp y Rotation's y component to clamp z Rotation's z component to clamp
- Returns
- Clamped rotation
Definition at line 141 of file Rotation.h.
# getFromPixelRotation()
|
inlinestatic |
Transform the provided rotation in pixel coordinates into a normal rotation.
- Parameters
-
pixelRotation Rotation to transform
- Returns
- Transformed rotation
Definition at line 237 of file Rotation.h.
# getFromScreenPixelRotation()
|
inlinestatic |
Transform the provided rotation in screen coordinates into a normal rotation.
- Parameters
-
pixelRotation Rotation to transform
- Returns
- Transformed rotation
Definition at line 244 of file Rotation.h.
# getRelativeToCamera()
Compute the rotation relative to the camera's rotation.
- Parameters
-
rotation Rotation to compute the relative rotation of
- Returns
- Rotation relative to the camera's rotation
Definition at line 230 of file Rotation.h.
# getShortestDifferce()
Compute the shortest angle differente between the provided angles.
- Parameters
-
angleFrom Starting angle angleTo End angle
- Returns
- Shortest angle between the provided angles
Definition at line 175 of file Rotation.h.
# intermediate()
Compute the intermediate rotation between the provided ones.
- Parameters
-
a First rotation b Second rotation
- Returns
- Intermediate rotation
Definition at line 197 of file Rotation.h.
# invert()
Invert the rotation's direction in all its components.
- Parameters
-
rotation Rotation to invert
- Returns
- Inverted rotation
Definition at line 133 of file Rotation.h.
# print()
Print the rotation's components.
- Parameters
-
rotation Rotation to print x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 25 of file Rotation.c.
# scalarDivision()
Apply a scalar division over the rotation's components
- Parameters
-
rotation Rotation to scale scalar Scalar divisor
- Returns
- Scaled rotation
Definition at line 217 of file Rotation.h.
# scalarProduct()
Apply a scalar product over the rotation's components
- Parameters
-
rotation Rotation to scale scalar Scalar to multiply
- Returns
- Scaled rotation
Definition at line 209 of file Rotation.h.
# sub()
Susbtract a rotation from another.
- Parameters
-
a Minuend rotation b Subtrahend rotation
- Returns
- Substraction rotation
Definition at line 190 of file Rotation.h.
# sum()
Add two rotations.
- Parameters
-
a First rotation b Second rotation
- Returns
- Addition rotation
Definition at line 183 of file Rotation.h.
# zero()
|
inlinestatic |
Get a rotation with all its members initialized to zero.
- Returns
- Rotation with all its members initialized to zero
# Member Data Documentation
# x
# y
# z
The documentation for this struct was generated from the following files:
- VUEngine-Core/source/Misc/Math/Rotation.h
- VUEngine-Core/source/Misc/Types.h
- VUEngine-Core/source/Misc/Math/Rotation.c