SDL Breakout Engine
0.1.0
An implementation of a Breakout game using sdl, implemented with efficient resource management.
|
#include <TinyMath.hpp>
Public Member Functions | |
Vector3D () = default | |
Default constructor. More... | |
Vector3D (float a, float b, float c) | |
float & | operator[] (int i) |
const float & | operator[] (int i) const |
Vector3D & | operator*= (float s) |
Vector3D & | operator/= (float s) |
Vector3D & | operator+= (const Vector3D &v) |
Vector3D & | operator-= (const Vector3D &v) |
bool | operator== (const Vector3D &other) |
bool | equals (const Vector3D &other, float tolerance) |
Public Attributes | |
float | x |
float | y |
float | z |
Vector3D performs vector operations with 3-dimensions The purpose of this class is primarily for 3D graphics applications.
|
default |
Default constructor.
|
inline |
Initialize a 3D Vector
a | x |
b | y |
c | z |
|
inline |
return tolerant equality
other | other vector |
tolerance | allowed tolerance of equality |
|
inline |
Multiplication Operator Multiply vector by a uniform-scalar.
s | scalar multiplier |
|
inline |
Addition operator Add the given vectors components to this vector.
v | what to add |
|
inline |
Subtraction operator Substract the given vector's components from this vector.
v | what to subtract |
|
inline |
Division Operator
s | scalar multiplier |
|
inline |
return exact equality
other | other vector |
|
inline |
Index operator, allowing us to access the individual x,y,z components of our vector.
i | Element to access |
|
inline |
Index operator, allowing us to access the individual x,y,z components of our vector.
i | Element to access |
float Vector3D::x |
Represents the x,y,z components of a vector in 3D space, respectively.
float Vector3D::y |
float Vector3D::z |