//// Include all GLM core / GLSL features
//#include "./glm/glm.hpp" // vec2, vec3, mat4, radians
//// Include all GLM extensions
//#include "./glm/ext.hpp" // perspective, translate, rotate
//#include <iostream>
//using namespace std;
// 
//int main (void)
//{
//	glm::vec3 v1(1.0);
//	glm::vec3 v2(1.0,2.0,3.0);
//	v2 = v1 + v2;
//	cout << "(" << v2.x << "," << v2.y << "," << v2.z << ")" << endl;
//	return 0;
//}
///*


//glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate,
//	glm::vec3 const& Up)
//{
//	glm::mat4 Proj = glm::perspective(glm::radians(45.f), 1.33f, 0.1f, 10.f);
//	glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.f), Translate);
//	glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up);
//	glm::mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up);
//	glm::mat4 Model = glm::mat4(1.0f);
//	return Proj * View * Model;
//}
#include "glm/glm.hpp" // vec2, vec3, mat4, radians
// Include all GLM extensions




#include "glm/ext.hpp" // perspective, translate, rotate
glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate,
	glm::vec3 const& Up);
#include <iostream>
using namespace std;

int main(void)
{
	glm::vec3 a(0.0); //initialize x,y,z,w to 0.0
	cout << "(" << a.x << "," << a.y << "," << a.z << ")" << endl;

	glm::vec3* pv3 = new  glm::vec3(5.0); //use pointers if you want
	cout << "(" << pv3->x << "," << pv3->y << "," << pv3->z << ")" << endl;

	glm::vec4 b(1.0, 4.0, 7.0, 1); //initialize b to (1,4,7,1)
	cout << "(" << b.x << "," << b.y << "," << b.z << "," << b.w << ")" << endl;

	glm::vec3 res(0.0);

	glm::vec3 v1(1, 2, 3);

	glm::vec3 v2(3, 5, 2);

	float dotP = glm::dot(v1, v2);
	cout << "the dot product of v1 and v2 is " << dotP << endl;

	res = glm::cross(v1, v2);
	cout << "the cross product of v1 and v2 is ";
	cout << "(" << res.x << "," << res.y << "," << res.z << ")" << endl;

	float tx = 1.5, ty = 2.0, tz = 4.0;
	glm::mat4 translationMatrix =
		glm::mat4(1.0, 0.0, 0.0, 0.0, // note this is the leftmost column, not the top row
			0.0, 1.0, 0.0, 0.0,
			0.0, 0.0, 1.0, 0.0,
			tx, ty, tz, 1.0);
	glm::vec4 Position = glm::vec4(glm::vec3(0.0f), 1.0f);

	glm::mat4 Model(1.0);

	Model = translationMatrix * Model;   //we can multiply matrices
	cout << "position is ";
	cout << "(" << Position.x << "," << Position.y << "," << Position.z << "," << Position.w << ")" << endl;

	glm::vec4 TransformedPosition = Model * Position;
	cout << "transformed position is ";
	cout << "(" << TransformedPosition.x << "," << TransformedPosition.y << "," << TransformedPosition.z << "," << TransformedPosition.w << ")" << endl;

	//glm's extended library has transformations included
	Model = glm::translate(
		glm::mat4(1.0f), glm::vec3(1.0f));
	glm::vec4 Transformed = Model * Position;

	return 0;
}
