mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 03:51:47 +01:00
93 lines
1.9 KiB
C++
93 lines
1.9 KiB
C++
#pragma once
|
|
#include <string>
|
|
|
|
#include "Vector2f.h"
|
|
|
|
struct Window
|
|
{
|
|
explicit Window( const std::string& title = "Title", float width = 320.0f,
|
|
float height = 180.0f, bool isVSyncOn = true );
|
|
|
|
std::string title;
|
|
float width;
|
|
float height;
|
|
bool isVSyncOn;
|
|
};
|
|
|
|
// struct Vector2f
|
|
// {
|
|
// Vector2f( );
|
|
// explicit Vector2f( float x, float y );
|
|
// //Vector2f(int x, int y); //Stupid fix for it giving an error
|
|
//
|
|
// //operator
|
|
// Vector2f operator+( const Vector2f& other ) const;
|
|
// Vector2f operator+=( const Vector2f& other ) const;
|
|
// Vector2f operator*( float other ) const;
|
|
// Vector2f operator*( int other ) const;
|
|
// Vector2f operator*( const Vector2f& other ) const;
|
|
// Vector2f operator/( float other ) const;
|
|
// Vector2f operator-( const Vector2f& other ) const;
|
|
//
|
|
//
|
|
// float x;
|
|
// float y;
|
|
// };
|
|
//
|
|
// Vector2f operator/(float right, const Vector2f& left);
|
|
// Vector2f operator*(float right, const Vector2f& left);
|
|
//
|
|
// std::ostream& operator<<(std::ostream& os, const Vector2f& p);
|
|
|
|
struct Rectf
|
|
{
|
|
Rectf( );
|
|
explicit Rectf( float left, float bottom, float width, float height );
|
|
Rectf(Vector2f pos, Vector2f size);
|
|
//explicit Rectf( int left, int bottom, int width, int height ); //Stupid fix for it giving an error (same as Vector2f)
|
|
|
|
Vector2f BottomLeft() const { return Vector2f{ left, bottom }; }
|
|
|
|
float left;
|
|
float bottom;
|
|
float width;
|
|
float height;
|
|
};
|
|
|
|
|
|
struct Color4f
|
|
{
|
|
Color4f( );
|
|
explicit Color4f( float r, float g, float b, float a );
|
|
|
|
float r;
|
|
float g;
|
|
float b;
|
|
float a;
|
|
};
|
|
|
|
struct Circlef
|
|
{
|
|
Circlef( );
|
|
explicit Circlef( const Vector2f& center, float radius );
|
|
explicit Circlef( float centerX, float centerY, float radius );
|
|
|
|
Vector2f center;
|
|
float radius;
|
|
};
|
|
|
|
|
|
struct Ellipsef
|
|
{
|
|
Ellipsef( );
|
|
explicit Ellipsef( const Vector2f& center, float radiusX, float radiusY );
|
|
explicit Ellipsef( float centerX, float centerY, float radiusX, float radiusY );
|
|
|
|
Vector2f center;
|
|
float radiusX;
|
|
float radiusY;
|
|
};
|
|
|
|
|
|
|