<commit_before>#pragma once

#define _USE_MATH_DEFINES
#include <cmath>
#include <vector>
#include "gl_helper.h"
#include "gl_base.h"
#include "gl_debug.h"
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

#include <assimp/Importer.hpp>      // C++ importer interface
#include <assimp/scene.h>           // Output data structure
#include <assimp/postprocess.h>     // Post processing fla

namespace jikoLib{
	namespace GLLib{
		
		class Mesh3D{
			private:
				VBO vertex;
				VBO normal;
				VBO texcrd;
				IBO index;
				VAO v_array;

				glm::vec3 pos;
				glm::quat rot;
				glm::vec3 scale;

			public:

				Mesh3D()
					:pos(0.0f, 0.0f, 0.0f),
					 rot(1.0f, 0.0f, 0.0f, 0.0f),
					 scale(1.0f, 1.0f, 1.0f)  {}

				inline const VBO& getVertex() const
				{
					return vertex;
				}
				inline const VBO& getNormal() const
				{
					return normal;
				}
				inline const VBO& getTexcrd() const
				{
					return texcrd;
				}
				inline const IBO& getIndex() const
				{
					return index;
				}
				inline const VAO& getVArray() const
				{
					return v_array;
				}

				inline bool getIsSetArray() const
				{
					return 
						vertex.getisSetArray() &&
						normal.getisSetArray() &&
						texcrd.getisSetArray();
				}

				inline bool getIsIndexSet() const
				{
					return index.getisSetArray();
				}

				template<typename T, std::size_t Size_Elem>
				inline void copyData(const T (&vert)[Size_Elem][3], const T (&norm)[Size_Elem][3], const T (&tex)[Size_Elem][2])
				{
					vertex.copyData(vert);
					normal.copyData(norm);
					texcrd.copyData(tex );
				}

				template<typename T, std::size_t Size_Elem>
				inline void copyIndex(const T (&ind)[Size_Elem])
				{
					index.copyData(ind);
				}

				template<typename T>
					inline void copyData(const T *vert, const T *norm, const T *tex, std::size_t Size_Elem)
					{
						vertex.copyData(vert, Size_Elem, 3);
						normal.copyData(norm, Size_Elem, 3);
						texcrd.copyData( tex, Size_Elem, 2);
					}

				template<typename T>
					inline void copyIndex(const T *ind, std::size_t Size_Elem)
					{
						index.copyData(ind, Size_Elem);
					}

				inline void setPos(const glm::vec3 &vec)
				{
					this->pos = vec;
				}

				inline const glm::vec3& getPos()
				{
					return this->pos;
				}

				inline void setScale(const glm::vec3 &vec)
				{
					this->scale = vec;
				}

				inline const glm::vec3& getScale()
				{
					return this->scale;
				}

				inline void rotate(const glm::vec3 &axis, GLfloat angle)
				{
					this->rot = glm::rotate(this->rot, angle, glm::normalize(axis));
				}

				inline void resetRot()
				{
					this->rot = glm::quat(1.0f, 0.0f, 0.0f, 0.0f);
				}

				inline const glm::quat& getRot()
				{
					return this->rot;
				}

				inline glm::mat4 getModelMatrix()
				{
					glm::mat4 mat = glm::mat4_cast(rot);
					glm::mat4 poyo = mat*glm::scale(glm::mat4(), scale);
					return glm::translate(poyo, glm::inverse(glm::mat3(poyo))*pos);
				}
		};

		class Camera{
			private:
				glm::vec3 pos; //position
				glm::vec3 drct;  //direction
				glm::vec3 up; //up

				GLfloat fovy;
				GLfloat aspect;
				GLfloat _near;
				GLfloat _far;

			public:

				Camera()
					:pos(0.0f, 0.0f, 0.0f),
					drct(1.0f, 0.0f, 0.0f),
					up(0.0f, 1.0f, 0.0f),
					fovy(M_PI_4),
					aspect(1.0f),
					_near(0.1f),
					_far(10.0f) {}

				inline void setPos(const glm::vec3 &pos)
				{
					this->pos = pos;
				}<commit_msg>add AssimpLoader<commit_after>#pragma once

#include <cmath>
#define M_PI 3.14159265358979323846
#include <vector>
#include "gl_helper.h"
#include "gl_base.h"
#include "gl_debug.h"
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

#include <assimp/Importer.hpp>      // C++ importer interface
#include <assimp/scene.h>           // Output data structure
#include <assimp/postprocess.h>     // Post processing fla

namespace jikoLib{
	namespace GLLib{
		
		class Mesh3D{
			private:
				VBO vertex;
				VBO normal;
				VBO texcrd;
				IBO index;
				VAO v_array;

				glm::vec3 pos;
				glm::quat rot;
				glm::vec3 scale;

			public:

				Mesh3D()
					:pos(0.0f, 0.0f, 0.0f),
					 rot(1.0f, 0.0f, 0.0f, 0.0f),
					 scale(1.0f, 1.0f, 1.0f)  {}

				inline const VBO& getVertex() const
				{
					return vertex;
				}
				inline const VBO& getNormal() const
				{
					return normal;
				}
				inline const VBO& getTexcrd() const
				{
					return texcrd;
				}
				inline const IBO& getIndex() const
				{
					return index;
				}
				inline const VAO& getVArray() const
				{
					return v_array;
				}

				inline bool getIsSetArray() const
				{
					return 
						vertex.getisSetArray() &&
						normal.getisSetArray() &&
						texcrd.getisSetArray();
				}

				inline bool getIsIndexSet() const
				{
					return index.getisSetArray();
				}

				template<typename T, std::size_t Size_Elem>
				inline void copyData(const T (&vert)[Size_Elem][3], const T (&norm)[Size_Elem][3], const T (&tex)[Size_Elem][2])
				{
					vertex.copyData(vert);
					normal.copyData(norm);
					texcrd.copyData(tex );
				}

				template<typename T, std::size_t Size_Elem>
				inline void copyIndex(const T (&ind)[Size_Elem])
				{
					index.copyData(ind);
				}

				template<typename T>
					inline void copyData(const T *vert, const T *norm, const T *tex, std::size_t Size_Elem)
					{
						vertex.copyData(vert, Size_Elem, 3);
						normal.copyData(norm, Size_Elem, 3);
						texcrd.copyData( tex, Size_Elem, 2);
					}

				template<typename T>
					inline void copyIndex(const T *ind, std::size_t Size_Elem)
					{
						index.copyData(ind, Size_Elem);
					}

				inline void setPos(const glm::vec3 &vec)
				{
					this->pos = vec;
				}

				inline const glm::vec3& getPos()
				{
					return this->pos;
				}

				inline void setScale(const glm::vec3 &vec)
				{
					this->scale = vec;
				}

				inline const glm::vec3& getScale()
				{
					return this->scale;
				}

				inline void rotate(const glm::vec3 &axis, GLfloat angle)
				{
					this->rot = glm::rotate(this->rot, angle, glm::normalize(axis));
				}

				inline void resetRot()
				{
					this->rot = glm::quat(1.0f, 0.0f, 0.0f, 0.0f);
				}

				inline const glm::quat& getRot()
				{
					return this->rot;
				}

				inline glm::mat4 getModelMatrix()
				{
					glm::mat4 mat = glm::mat4_cast(rot);
					glm::mat4 poyo = mat*glm::scale(glm::mat4(), scale);
					return glm::translate(poyo, glm::inverse(glm::mat3(poyo))*pos);
				}
		};

		class Camera{
			private:
				glm::vec3 pos; //position
				glm::vec3 drct;  //direction
				glm::vec3 up; //up

				GLfloat fovy;
				GLfloat aspect;
				GLfloat _near;
				GLfloat _far;

			public:

				Camera()
					:pos(0.0f, 0.0f, 0.0f),
					drct(1.0f, 0.0f, 0.0f),
					up(0.0f, 1.0f, 0.0f),
					fovy(M_PI/4.0),
					aspect(1.0f),
					_near(0.1f),
					_far(10.0f) {}

				inline void setPos(const glm::vec3 &pos)
				{
					this->pos = pos;
				}
{'fraction_non_alphanumeric': 0.14189662417705562, 'fraction_numerical': 0.025213615352290237, 'mean_word_length': 2.442622950819672, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1948466', 'n_tokens_mistral': 3709, 'n_tokens_neox': 2732, 'n_words': 588}