MochiEngine
Loading...
Searching...
No Matches
Custom utility types

Classes

struct  Mochi::Transform
 Minimal transform with a position and scale. Rotation is deliberately omited because of the incompatibility with pixel art. This class is meant to represent the space occupied by an entity, and reused for several elements of that same entity, as the game logic, sprite or collider. More...
struct  Mochi::Vector2f
 Float vector of two positions with an X and Y elements and conversion with SDL_FPoint for ease of use with SDL. It allows basic operations like sum, substraction, multiplication and division of vectors, and also multiplication and division with scalars. It also gives useful methods like the Dot, or the length of the vector (the Distance from 0,0). More...
struct  Mochi::Rectf
 Float vector of 4 positions with an X, Y, W and H elements defining a rectangle and conversion with SDL_FRect for ease of use with SDL. It allows basic operations with other rectangles, vectors or scalars. More...
struct  Mochi::Color
 unsigned int vector of 4 elements, with the rgb elements of the color and an alpha channel. It also has automatic conversion to SDL_Color for ease of use with SDL. More...

Functions

bool Mochi::operator== (const Vector2f &lhs, const Vector2f &rhs)
bool Mochi::operator!= (const Vector2f &lhs, const Vector2f &rhs)

Variables

static const Vector2f Mochi::Vector2f::Zero {0, 0}
static const Vector2f Mochi::Vector2f::One {1, 1}
static const Vector2f Mochi::Vector2f::Right {1, 0}
static const Vector2f Mochi::Vector2f::Left {-1, 0}
static const Vector2f Mochi::Vector2f::Up {0, 1}
static const Vector2f Mochi::Vector2f::Down {0, -1}

Detailed Description