Add project files.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#include "Vector2.hpp"
|
||||
|
||||
/*** Custom Header File ***/
|
||||
#include "../iVector/iVector2.hpp"
|
||||
|
||||
using MathEngine::Vector2;
|
||||
using MathEngine::iVector2;
|
||||
|
||||
Vector2::Vector2( const float X /*= 0.0f*/, const float Y /*= 0.0f*/ )
|
||||
: x(X), y(Y)
|
||||
{};
|
||||
|
||||
Vector2::Vector2( const SDL_Rect& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
}
|
||||
|
||||
Vector2& Vector2::operator=( const SDL_Rect& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vector2::Vector2( const iVector2& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
}
|
||||
|
||||
Vector2& Vector2::operator=( const iVector2& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef _VECTOR2_HPP_
|
||||
#define _VECTOR2_HPP_
|
||||
|
||||
/*** SDL Header Files ***/
|
||||
#include <SDL.h>
|
||||
|
||||
/*** DLL Header File ***/
|
||||
#include "dllExport.h"
|
||||
|
||||
namespace MathEngine {
|
||||
struct iVector2;
|
||||
|
||||
struct EXPORT_FROM_MYDLL Vector2
|
||||
{
|
||||
Vector2( const float X = 0.0f, const float Y = 0.0f );
|
||||
|
||||
Vector2( const SDL_Rect& copy );
|
||||
|
||||
Vector2& operator=( const SDL_Rect& copy );
|
||||
|
||||
Vector2( const iVector2& copy );
|
||||
|
||||
Vector2& operator=( const iVector2& copy );
|
||||
|
||||
float x;
|
||||
float y;
|
||||
};/// END STRUCT DEFINITION Vector2
|
||||
}/// END NAMESPACE DEFINITION MathEngine
|
||||
#endif/// END IFNDEF _VECTOR2_HPP_
|
||||
@@ -0,0 +1,43 @@
|
||||
#include "Vector3.hpp"
|
||||
|
||||
/*** Custom Header File ***/
|
||||
#include "../iVector/iVector3.hpp"
|
||||
|
||||
using MathEngine::Vector3;
|
||||
using MathEngine::iVector3;
|
||||
|
||||
Vector3::Vector3( const float X /*= 0.0f*/, const float Y /*= 0.0f*/, const float Z /*= 0.0f*/ )
|
||||
: Vector2( X, Y ), z(Z)
|
||||
{}
|
||||
|
||||
Vector3::Vector3( const SDL_Rect& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.w);
|
||||
}
|
||||
|
||||
Vector3& Vector3::operator=( const SDL_Rect& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.w);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vector3::Vector3( const iVector3& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.z);
|
||||
}
|
||||
|
||||
Vector3& Vector3::operator=( const iVector3& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.z);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef _VECTOR3_HPP_
|
||||
#define _VECTOR3_HPP_
|
||||
|
||||
/*** SDL Header Files ***/
|
||||
#include <SDL.h>
|
||||
|
||||
/*** DLL Header File ***/
|
||||
#include "dllExport.h"
|
||||
|
||||
/*** Custom Header File ***/
|
||||
#include "Vector2.hpp"
|
||||
|
||||
namespace MathEngine {
|
||||
struct iVector3;
|
||||
|
||||
struct EXPORT_FROM_MYDLL Vector3 : public Vector2
|
||||
{
|
||||
Vector3( const float X = 0.0f, const float Y = 0.0f, const float Z = 0.0f );
|
||||
|
||||
Vector3( const SDL_Rect& copy );
|
||||
|
||||
Vector3& operator=( const SDL_Rect& copy );
|
||||
|
||||
Vector3( const iVector3& copy );
|
||||
|
||||
Vector3& operator=( const iVector3& copy );
|
||||
|
||||
float z;
|
||||
};/// END STRUCT DEFINITION Vector3
|
||||
}/// END NAMESPACE DEFINITION MathEngine
|
||||
#endif/// END IFNDEF _VECTOR3_HPP_
|
||||
@@ -0,0 +1,46 @@
|
||||
#include "Vector4.hpp"
|
||||
|
||||
#include "../iVector/iVector4.hpp"
|
||||
|
||||
using MathEngine::Vector4;
|
||||
using MathEngine::iVector4;
|
||||
|
||||
Vector4::Vector4( const float X /*= 0.0f*/, const float Y /*= 0.0f*/, const float Z /*= 0.0f*/, const float W /*= 0.0f*/)
|
||||
: Vector3( X, Y, Z ), w(W)
|
||||
{}
|
||||
|
||||
Vector4::Vector4( const SDL_Rect& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.w);
|
||||
w = float(copy.h);
|
||||
}
|
||||
|
||||
Vector4& Vector4::operator=( const SDL_Rect& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.w);
|
||||
w = float(copy.h);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vector4::Vector4( const iVector4& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.z);
|
||||
w = float(copy.w);
|
||||
}
|
||||
|
||||
Vector4& Vector4::operator=( const iVector4& copy )
|
||||
{
|
||||
x = float(copy.x);
|
||||
y = float(copy.y);
|
||||
z = float(copy.z);
|
||||
w = float(copy.w);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef _VECTOR4_HPP_
|
||||
#define _VECTOR4_HPP_
|
||||
|
||||
/*** SDL Header Files ***/
|
||||
#include <SDL.h>
|
||||
|
||||
/*** DLL Header File ***/
|
||||
#include "dllExport.h"
|
||||
|
||||
/*** Custom Header File ***/
|
||||
#include "Vector3.hpp"
|
||||
|
||||
namespace MathEngine {
|
||||
struct iVector4;
|
||||
|
||||
struct EXPORT_FROM_MYDLL Vector4 : public Vector3
|
||||
{
|
||||
Vector4( const float X = 0.0f, const float Y = 0.0f, const float Z = 0.0f, const float W = 0.0f );
|
||||
|
||||
Vector4( const SDL_Rect& copy );
|
||||
|
||||
Vector4& operator=( const SDL_Rect& copy );
|
||||
|
||||
bool operator==(const SDL_Rect& other) const;
|
||||
|
||||
Vector4( const iVector4& copy );
|
||||
|
||||
Vector4& operator=( const iVector4& copy );
|
||||
|
||||
bool operator==(const Vector4& other) const;
|
||||
|
||||
float w;
|
||||
};/// END STRUCT DEFINITION Vector4
|
||||
}/// END NAMESPACE DEFINITION MathEngine
|
||||
#endif/// END IFNDEF _VECTOR4_HPP_
|
||||
Reference in New Issue
Block a user