Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Burger::FixedVector2D_t Struct Reference

2 dimensional fixed point vector More...

Public Member Functions

void Zero (void)
 Initialize the vector elements to zero.
 
void One (void)
 Initialize the vector elements to 1.0f (Fixed)
 
Fixed32 GetX (void) const
 Return the x component of the vector.
 
Fixed32 GetY (void) const
 Return the y component of the vector.
 
void SetX (Fixed32 fX)
 Set the x component of the vector.
 
void SetY (Fixed32 fY)
 Set the y component of the vector.
 
void Set (Fixed32 fX, Fixed32 fY)
 Initialize the vector elements to specific values,.
 
void Negate (void)
 Negate a 2D vector.
 
void Negate (Fixed32 fX, Fixed32 fY)
 Negate the input and store it in this structure.
 
void Negate (const FixedVector2D_t *pInput)
 Make a copy of the input after it's been negated.
 

Public Attributes

Fixed32 x
 32 bit fixed point X value for the 2D Vector
 
Fixed32 y
 32 bit fixed point Y value for the 2D Vector
 

Detailed Description

2 dimensional fixed point vector


This 8 byte vector contains x and y 32 bit fixed point coordinates. A set of common functions for simple 2 dimensional math are part of the structure.

It is expected to be 4 byte aligned and use scalar math. The members are hard coded to be "x" and "y" for maximum compatibility

Note
Since this is a structure, there is no constructor or destructor, so assume the data is uninitialized when creating this data type.
See also
Burger::FixedVector3D_t, Burger::FixedVector4D_t or Burger::Vector2D_t

Member Function Documentation

◆ GetX()

Fixed32 Burger::FixedVector2D_t::GetX ( void ) const
inline

Return the x component of the vector.


Returns
The x component of the vector.
See also
GetY(void) const or SetX(Fixed32)

◆ GetY()

Fixed32 Burger::FixedVector2D_t::GetY ( void ) const
inline

Return the y component of the vector.


Returns
The y component of the vector.
See also
GetX(void) const or SetY(Fixed32)

◆ Negate() [1/3]

void Burger::FixedVector2D_t::Negate ( const FixedVector2D_t * pInput)
inline

Make a copy of the input after it's been negated.


Copy the input data and negate it.

Parameters
pInputValid pointer to a FixedVector2D_t structure to copy and negate
See also
Negate(Fixed32,Fixed32) or Negate(void)

◆ Negate() [2/3]

void Burger::FixedVector2D_t::Negate ( Fixed32 fX,
Fixed32 fY )
inline

Negate the input and store it in this structure.


Set the x and y value to -fX and -fY respectively

Parameters
fXX value to negate
fYY value to negate
See also
Negate(const FixedVector2D_t *) or Negate(void)

◆ Negate() [3/3]

void Burger::FixedVector2D_t::Negate ( void )
inline

Negate a 2D vector.


Set the x and y value to -x and -y respectively

See also
Negate(const FixedVector2D_t *) or Negate(Fixed32,Fixed32)

◆ One()

void Burger::FixedVector2D_t::One ( void )
inline

Initialize the vector elements to 1.0f (Fixed)


Fills in all of the entries with zero, thereby initializing the structure to a known state.

See also
Set(Fixed32,Fixed32), SetX(Fixed32) or SetY(Fixed32)

◆ Set()

void Burger::FixedVector2D_t::Set ( Fixed32 fX,
Fixed32 fY )
inline

Initialize the vector elements to specific values,.


Given the new values for x and y, store them into the structure.

Parameters
fXThe new x component to store in the vector.
fYThe new y component to store in the vector.
See also
Zero(void), SetX(Fixed32) or SetY(Fixed32)

◆ SetX()

void Burger::FixedVector2D_t::SetX ( Fixed32 fX)
inline

Set the x component of the vector.


Parameters
fXThe new x component of the vector.
See also
GetX(void) const or SetY(Fixed32)

◆ SetY()

void Burger::FixedVector2D_t::SetY ( Fixed32 fY)
inline

Set the y component of the vector.


Parameters
fYThe new y component of the vector.
See also
GetY(void) const or SetX(Fixed32)

◆ Zero()

void Burger::FixedVector2D_t::Zero ( void )
inline

Initialize the vector elements to zero.


Fills in all of the entries with zero, thereby initializing the structure to a known state.

See also
Set(Fixed32,Fixed32), SetX(Fixed32) or SetY(Fixed32)

Member Data Documentation

◆ x

Fixed32 Burger::FixedVector2D_t::x

32 bit fixed point X value for the 2D Vector

◆ y

Fixed32 Burger::FixedVector2D_t::y

32 bit fixed point Y value for the 2D Vector