////////////////////////////////////////////////////////
// filename: common.h
// author: Chafumi Touji
// version: 1.0.0
// date: 2020/03/05
////////////////////////////////////////////////////////

#ifndef __COMMON_H__
#define __COMMON_H__

struct float2{

	float x;
	float y;
};

struct float3{

	float x;
	float y;
	float z;
};

struct float4{

	float x;
	float y;
	float z;
	float w;
};

struct matrix{

	float m11, m12, m13, m14;
	float m21, m22, m23, m24;
	float m31, m32, m33, m34;
	float m41, m42, m43, m44;
};

class CVertex;

float ToRadian(float angle);
float ToAngle(float radian);
void MatrixSet( matrix *mtx, float m0, float m1, float m2, float m3, float m4, float m5, float m6, float m7, float m8, float m9, float m10, float m11, float m12, float m13, float m14, float m15);
void MatrixInit(matrix *mtx);
bool GetParam(char *line, char *param1, char *param2, char *c1 );
bool SetVertex(CVertex *vtx, float pos_x, float pos_y, float pos_z, float normal_x, float normal_y, float normal_z, float color_r, float color_g, float color_b, float color_a, float u, float v);

#endif