This commit is contained in:
2024-02-27 10:10:02 +01:00
parent c0aea669c7
commit 547809c898
131 changed files with 65609 additions and 0 deletions

97
Engine/structs.cpp Normal file
View File

@@ -0,0 +1,97 @@
#include "base.h"
#include "structs.h"
//-----------------------------------------------------------------
// Window Constructors
//-----------------------------------------------------------------
Window::Window( const std::string& title , float width , float height , bool isVSyncOn )
:title{ title }
,width{ width }
,height{ height }
,isVSyncOn{ isVSyncOn }
{
}
//-----------------------------------------------------------------
// Point2f Constructors
//-----------------------------------------------------------------
Point2f::Point2f( )
:Point2f{ 0.0f, 0.0f }
{
}
Point2f::Point2f( float x, float y )
:x{ x }, y{ y }
{
}
//-----------------------------------------------------------------
// Rectf Constructors
//-----------------------------------------------------------------
Rectf::Rectf( )
:Rectf{ 0.0f, 0.0f, 0.0f, 0.0f }
{
}
Rectf::Rectf( float left, float bottom, float width, float height )
:left{ left }
,bottom{ bottom }
,width{ width }
,height{ height }
{
}
//-----------------------------------------------------------------
// Color4f Constructors
//-----------------------------------------------------------------
Color4f::Color4f( )
:Color4f{ 0.0f, 0.0f, 0.0f, 1.0f }
{
}
Color4f::Color4f( float r, float g, float b, float a )
:r{ r }
,g{ g }
,b{ b }
,a{ a }
{
}
//-----------------------------------------------------------------
// Circlef Constructors
//-----------------------------------------------------------------
Circlef::Circlef( )
:Circlef{ 0.0f, 0.0f, 0.0f }
{
}
Circlef::Circlef( float centerX, float centerY, float radius )
:Circlef{ Point2f{ centerX, centerY }, radius }
{
}
Circlef::Circlef( const Point2f& center, float radius )
:center{ center }
,radius{ radius }
{
}
//-----------------------------------------------------------------
// Ellipsef Constructors
//-----------------------------------------------------------------
Ellipsef::Ellipsef( )
:Ellipsef{ 0.0f, 0.0f, 0.0f, 0.0f }
{
}
Ellipsef::Ellipsef( const Point2f& center, float radiusX, float radiusY )
: center{ center }
, radiusX{ radiusX }
, radiusY{ radiusY }
{
}
Ellipsef::Ellipsef( float centerX, float centerY, float radiusX, float radiusY )
: Ellipsef{ Point2f{ centerX, centerY }, radiusX, radiusY }
{
}