Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::Vector2 Class Reference

2D vector class. More...

#include <aeongames/Vector2.hpp>

Collaboration diagram for AeonGames::Vector2:
Collaboration graph

Public Member Functions

DLL Vector2 ()
 Default constructor.
DLL Vector2 (const float *const aVector)
 Constructor.
DLL Vector2 (float aX, float aY)
 Constructor.
DLL ~Vector2 ()
 destructor.
DLL const float *const GetVector () const
 Get a pointer to the internal vector data.
DLL const float & GetX () const
 Get the X component.
DLL const float & GetY () const
 Get the Y component.

Protected Attributes

float mVector [2]
 X and Y components.

Detailed Description

2D vector class.

Definition at line 25 of file Vector2.hpp.

Constructor & Destructor Documentation

◆ Vector2() [1/3]

AeonGames::Vector2::Vector2 ( )

Default constructor.

Definition at line 21 of file Vector2.cpp.

◆ Vector2() [2/3]

AeonGames::Vector2::Vector2 ( const float *const aVector)

Constructor.

Parameters
aVectora float pointer or array containing vector data.

Definition at line 26 of file Vector2.cpp.

◆ Vector2() [3/3]

AeonGames::Vector2::Vector2 ( float aX,
float aY )

Constructor.

Parameters
aXX component.
aYY component.

Definition at line 31 of file Vector2.cpp.

Member Function Documentation

◆ GetVector()

const float *const AeonGames::Vector2::GetVector ( ) const

Get a pointer to the internal vector data.

Returns
Pointer to the float array containing X,Y components.

Definition at line 40 of file Vector2.cpp.

◆ GetX()

const float & AeonGames::Vector2::GetX ( ) const

Get the X component.

Returns
Reference to the X component.

Definition at line 45 of file Vector2.cpp.

◆ GetY()

const float & AeonGames::Vector2::GetY ( ) const

Get the Y component.

Returns
Reference to the Y component.

Definition at line 50 of file Vector2.cpp.

Member Data Documentation

◆ mVector

float AeonGames::Vector2::mVector[2]
protected

X and Y components.

Definition at line 54 of file Vector2.hpp.


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