Rotation Struct Reference

#include <Rotation.h>

Inheritance diagram for Rotation:
Object

# 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

- Private Member Functions inherited from Object
void constructor ()
 Class' constructor.
const void * getVTable ()
bool mutateTo (const void *targetClass)
- Static Private Member Functions inherited from Object
static Object getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod)
- Private Attributes inherited from Object
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()

static bool Rotation::areEqual ( Rotation a,
Rotation b )
inlinestatic

Test if two rotations are equal.

Parameters
aFirst rotation
bSecond rotation
Returns
True if all the components of both rotations are equal; false otherwise

Definition at line 255 of file Rotation.h.

# clamp()

static Rotation Rotation::clamp ( fixed_ext_t x,
fixed_ext_t y,
fixed_ext_t z )
inlinestatic

Clamp the rotation's components to 0-511 range.

Parameters
xRotation's x component to clamp
yRotation's y component to clamp
zRotation's z component to clamp
Returns
Clamped rotation

Definition at line 141 of file Rotation.h.

# getFromPixelRotation()

static Rotation Rotation::getFromPixelRotation ( PixelRotation pixelRotation)
inlinestatic

Transform the provided rotation in pixel coordinates into a normal rotation.

Parameters
pixelRotationRotation to transform
Returns
Transformed rotation

Definition at line 237 of file Rotation.h.

# getFromScreenPixelRotation()

static Rotation Rotation::getFromScreenPixelRotation ( ScreenPixelRotation pixelRotation)
inlinestatic

Transform the provided rotation in screen coordinates into a normal rotation.

Parameters
pixelRotationRotation to transform
Returns
Transformed rotation

Definition at line 244 of file Rotation.h.

# getRelativeToCamera()

static Rotation Rotation::getRelativeToCamera ( Rotation rotation)
inlinestatic

Compute the rotation relative to the camera's rotation.

Parameters
rotationRotation to compute the relative rotation of
Returns
Rotation relative to the camera's rotation

Definition at line 230 of file Rotation.h.

# getShortestDifferce()

static fixed_t Rotation::getShortestDifferce ( fixed_t angleFrom,
fixed_t angleTo )
inlinestatic

Compute the shortest angle differente between the provided angles.

Parameters
angleFromStarting angle
angleToEnd angle
Returns
Shortest angle between the provided angles

Definition at line 175 of file Rotation.h.

# intermediate()

static Rotation Rotation::intermediate ( Rotation a,
Rotation b )
inlinestatic

Compute the intermediate rotation between the provided ones.

Parameters
aFirst rotation
bSecond rotation
Returns
Intermediate rotation

Definition at line 197 of file Rotation.h.

# invert()

static Rotation Rotation::invert ( Rotation rotation)
inlinestatic

Invert the rotation's direction in all its components.

Parameters
rotationRotation to invert
Returns
Inverted rotation

Definition at line 133 of file Rotation.h.

# print()

static void Rotation::print ( Rotation rotation,
int32 x,
int32 y )
inlinestatic

Print the rotation's components.

Parameters
rotationRotation to print
xScreen x coordinate where to print
yScreen y coordinate where to print

Definition at line 25 of file Rotation.c.

# scalarDivision()

static Rotation Rotation::scalarDivision ( Rotation rotation,
int16 scalar )
inlinestatic

Apply a scalar division over the rotation's components

Parameters
rotationRotation to scale
scalarScalar divisor
Returns
Scaled rotation

Definition at line 217 of file Rotation.h.

# scalarProduct()

static Rotation Rotation::scalarProduct ( Rotation rotation,
int16 scalar )
inlinestatic

Apply a scalar product over the rotation's components

Parameters
rotationRotation to scale
scalarScalar to multiply
Returns
Scaled rotation

Definition at line 209 of file Rotation.h.

# sub()

static Rotation Rotation::sub ( Rotation a,
Rotation b )
inlinestatic

Susbtract a rotation from another.

Parameters
aMinuend rotation
bSubtrahend rotation
Returns
Substraction rotation

Definition at line 190 of file Rotation.h.

# sum()

static Rotation Rotation::sum ( Rotation a,
Rotation b )
inlinestatic

Add two rotations.

Parameters
aFirst rotation
bSecond rotation
Returns
Addition rotation

Definition at line 183 of file Rotation.h.

# zero()

static Rotation Rotation::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

int16 Rotation::x

Definition at line 155 of file Types.h.

# y

int16 Rotation::y

Definition at line 158 of file Types.h.

# z

int16 Rotation::z

Definition at line 161 of file Types.h.


The documentation for this struct was generated from the following files: