Scale Struct Reference

#include <Scale.h>

Inheritance diagram for Scale:
Object

# Static Public Member Functions

static Scale zero ()
static Scale unit ()
static Scale sum (Scale a, Scale b)
static Scale sub (Scale a, Scale b)
static Scale intermediate (Scale a, Scale b)
static Scale product (Scale a, Scale b)
static Scale division (Scale a, Scale b)
static Scale scalarProduct (Scale scale, int16 scalar)
static Scale scalarDivision (Scale scale, int16 scalar)
static Scale getFromScreenPixelScale (ScreenPixelScale screenPixelScale)
static bool areEqual (Scale a, Scale b)
static void print (Scale scale, 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 Scale

Inherits from Object

Implements methods to operate on Scale structs.

Definition at line 29 of file Scale.h.

# Member Function Documentation

# areEqual()

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

Test if two scales are equal.

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

Definition at line 187 of file Scale.h.

# division()

static Scale Scale::division ( Scale a,
Scale b )
inlinestatic

Compute the division scale between two provided scales.

Parameters
aDividend scale
bDivisor scale
Returns
Division scale between the provided scales

Definition at line 154 of file Scale.h.

# getFromScreenPixelScale()

static Scale Scale::getFromScreenPixelScale ( ScreenPixelScale screenPixelScale)
inlinestatic

Transform the provided scale in screen coordinates into a normal 3D scale.

Parameters
screenPixelScaleScale to transform
Returns
3D scale

Definition at line 180 of file Scale.h.

# intermediate()

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

Compute the intermediate scale between two provided scales.

Parameters
aFirst scale
bSecond scale
Returns
Intermediate scale between the provided scales

Definition at line 135 of file Scale.h.

# print()

static void Scale::print ( Scale scale,
int32 x,
int32 y )
inlinestatic

Print the scale's components.

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

Definition at line 25 of file Scale.c.

# product()

static Scale Scale::product ( Scale a,
Scale b )
inlinestatic

Compute the product scale between two provided scales.

Parameters
aFirst scale
bSecond scale
Returns
Product scale between the provided scales

Definition at line 147 of file Scale.h.

# scalarDivision()

static Scale Scale::scalarDivision ( Scale scale,
int16 scalar )
inlinestatic

Apply a scalar product over the scale's components

Parameters
scaleScale to scale
scalarScalar divisor
Returns
Scaled scale

Definition at line 168 of file Scale.h.

# scalarProduct()

static Scale Scale::scalarProduct ( Scale scale,
int16 scalar )
inlinestatic

Apply a scalar product over the scale's components

Parameters
scaleScale to scale
scalarScalar to multiply
Returns
Scaled scale

Definition at line 161 of file Scale.h.

# sub()

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

Compute the difference scale between two provided scales.

Parameters
aMinuend scale
bSubstraend scale
Returns
Difference scale between the provided scales

Definition at line 128 of file Scale.h.

# sum()

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

Compute the addition scale between other two provided scales.

Parameters
aFirst scale
bSecond scale
Returns
Addition scale between the provided scales

Definition at line 121 of file Scale.h.

# unit()

static Scale Scale::unit ( )
inlinestatic

Get a unit scale with all its members are initialized to 1.

Returns
Unit scale

Definition at line 114 of file Scale.h.

# zero()

static Scale Scale::zero ( )
inlinestatic

Get a scale with all its members initialized to zero.

Returns
Scale with all its members initialized to zero

# Member Data Documentation

# x

int16 Scale::x

Definition at line 251 of file Types.h.

# y

int16 Scale::y

Definition at line 252 of file Types.h.

# z

int16 Scale::z

Definition at line 253 of file Types.h.


The documentation for this struct was generated from the following files:
  • VUEngine-Core/source/Misc/Math/Scale.h
  • VUEngine-Core/source/Misc/Types.h
  • VUEngine-Core/source/Misc/Math/Scale.c