mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
style
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ set(utils util.cpp)
|
||||
set(math quaternion.cpp vector.cpp matrix.cpp ray.cpp)
|
||||
set(render particleEmitter.cpp camera.cpp light.cpp material.cpp mesh.cpp model.cpp node.cpp quad.cpp box.cpp root.cpp shader.cpp texture.cpp)
|
||||
set(model modelReader.cpp assimpModelReader.cpp vbModelReader.cpp)
|
||||
set(anim animationController.cpp animationChannel.cpp animation.cpp keyframeChannel.cpp animatable.cpp driver.cpp)
|
||||
set(anim animationController.cpp animationChannel.cpp animation.cpp animatable.h keyframeChannel.cpp driver.cpp)
|
||||
set(armature skeleton.cpp bone.cpp ikSolver.cpp)
|
||||
set(library ${render} ${math} ${model} ${utils} ${gui} ${armature} ${assetManager} ${anim})
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "animatable.h"
|
||||
#include "animationController.h"
|
||||
|
||||
namespace vb01{
|
||||
Animatable::Animatable(){
|
||||
}
|
||||
}
|
||||
+2
-6
@@ -1,17 +1,13 @@
|
||||
#ifndef ANIMATABLE_H
|
||||
#define ANIMATABLE_H
|
||||
|
||||
#include "animation.h"
|
||||
#include "keyframeChannel.h"
|
||||
|
||||
namespace vb01{
|
||||
class AnimationController;
|
||||
|
||||
class Animatable{
|
||||
public:
|
||||
Animatable();
|
||||
Animatable(){}
|
||||
virtual void animate(float, KeyframeChannel){}
|
||||
private:
|
||||
protected:
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include"animation.h"
|
||||
#include "animation.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "keyframeChannel.h"
|
||||
|
||||
namespace vb01{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "animation.h"
|
||||
|
||||
namespace vb01{
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include"assimpModelReader.h"
|
||||
#include"mesh.h"
|
||||
#include<Importer.hpp>
|
||||
#include<scene.h>
|
||||
#include<postprocess.h>
|
||||
#include "assimpModelReader.h"
|
||||
#include "mesh.h"
|
||||
|
||||
#include <Importer.hpp>
|
||||
#include <scene.h>
|
||||
#include <postprocess.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Assimp;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef ASSIMP_MODEL_READER_H
|
||||
#define ASSIMP_MODEL_READER_H
|
||||
|
||||
#include"modelReader.h"
|
||||
#include "modelReader.h"
|
||||
|
||||
class aiNode;
|
||||
class aiMesh;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include"bone.h"
|
||||
#include"skeleton.h"
|
||||
#include "bone.h"
|
||||
#include "skeleton.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define BONE_H
|
||||
|
||||
#include "node.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace vb01{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include"box.h"
|
||||
#include "box.h"
|
||||
|
||||
namespace vb01{
|
||||
Box::Box(Vector3 size){
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef BOX_H
|
||||
#define BOX_H
|
||||
|
||||
#include"mesh.h"
|
||||
#include "mesh.h"
|
||||
|
||||
namespace vb01{
|
||||
class Box : public Mesh{
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
#include"camera.h"
|
||||
#include "camera.h"
|
||||
|
||||
namespace vb01{
|
||||
Camera::Camera(){
|
||||
@@ -12,8 +12,8 @@ namespace vb01{
|
||||
}
|
||||
|
||||
void Camera::lookAt(Vector3 direction, Vector3 up){
|
||||
this->direction=direction;
|
||||
this->up=up;
|
||||
left=direction.cross(up);
|
||||
this->direction = direction;
|
||||
this->up = up;
|
||||
left = direction.cross(up);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CAMERA_H
|
||||
#define CAMERA_H
|
||||
|
||||
#include"vector.h"
|
||||
#include "vector.h"
|
||||
|
||||
namespace vb01{
|
||||
class Camera{
|
||||
@@ -9,20 +9,20 @@ namespace vb01{
|
||||
Camera();
|
||||
~Camera();
|
||||
void update();
|
||||
void setPosition(Vector3 position){this->position=position;}
|
||||
void lookAt(Vector3, Vector3=Vector3(0,1,0));
|
||||
void setPosition(Vector3 position){this->position = position;}
|
||||
void lookAt(Vector3, Vector3 = Vector3::VEC_J);
|
||||
inline Vector3 getPosition(){return position;}
|
||||
inline Vector3 getDirection(){return direction;}
|
||||
inline Vector3 getLeft(){return left;}
|
||||
inline Vector3 getUp(){return up;}
|
||||
inline void setNearPlane(float near){this->nearPlane=near;}
|
||||
inline void setFarPlane(float far){this->farPlane=far;}
|
||||
inline void setNearPlane(float near){this->nearPlane = near;}
|
||||
inline void setFarPlane(float far){this->farPlane = far;}
|
||||
inline float getFov(){return fov;}
|
||||
inline float getNearPlane(){return nearPlane;}
|
||||
inline float getFarPlane(){return farPlane;}
|
||||
private:
|
||||
Vector3 position=Vector3(0,0,0),direction=Vector3(0,0,-1),left=Vector3(1,0,0),up=Vector3(0,1,0);
|
||||
float fov=45,nearPlane=.1,farPlane=100;
|
||||
Vector3 position = Vector3::VEC_ZERO, direction = Vector3(0,0,-1), left = Vector3::VEC_I, up = Vector3::VEC_J;
|
||||
float fov = 45, nearPlane = .1, farPlane = 100;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "cameraTest.h"
|
||||
|
||||
#include <cppunit/TestCase.h>
|
||||
#include <cppunit/TestSuite.h>
|
||||
#include <cppunit/TestResult.h>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define DRIVER
|
||||
|
||||
#include "keyframeChannel.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace vb01{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
#include "bone.h"
|
||||
|
||||
namespace vb01{
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace vb01{
|
||||
class Shader;
|
||||
class Material;
|
||||
|
||||
|
||||
class Light : public Animatable{
|
||||
public:
|
||||
enum Type{POINT, DIRECTIONAL, SPOT, AMBIENT};
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
#include"material.h"
|
||||
#include"shader.h"
|
||||
#include"root.h"
|
||||
#include "material.h"
|
||||
#include "shader.h"
|
||||
#include "root.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
+110
-109
@@ -1,199 +1,200 @@
|
||||
#include"matrix.h"
|
||||
#include<iostream>
|
||||
#include "matrix.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace vb01{
|
||||
Matrix::Matrix(float **matrix,int rows,int columns){
|
||||
this->dim[0]=rows;
|
||||
this->dim[1]=columns;
|
||||
Matrix::Matrix(float **matrix, int rows, int columns){
|
||||
this->dim[0] = rows;
|
||||
this->dim[1] = columns;
|
||||
|
||||
this->matrix=new float*[rows];
|
||||
for(int i=0;i<dim[0];i++){
|
||||
this->matrix[i]=new float[columns];
|
||||
for(int j=0;j<dim[1];j++)
|
||||
this->matrix[i][j]=matrix[i][j];
|
||||
this->matrix = new float*[rows];
|
||||
for(int i = 0; i < dim[0]; i++){
|
||||
this->matrix[i] = new float[columns];
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
this->matrix[i][j] = matrix[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
Matrix::Matrix(Vector3 v1,Vector3 v2,Vector3 v3){
|
||||
dim[0]=3;
|
||||
dim[1]=3;
|
||||
Matrix::Matrix(Vector3 v1, Vector3 v2, Vector3 v3){
|
||||
dim[0] = 3;
|
||||
dim[1] = 3;
|
||||
|
||||
matrix=new float*[3];
|
||||
|
||||
matrix[0]=new float[3];
|
||||
matrix[0][0]=v1.x;
|
||||
matrix[0][1]=v1.y;
|
||||
matrix[0][2]=v1.z;
|
||||
matrix[1]=new float[3];
|
||||
matrix[1][0]=v2.x;
|
||||
matrix[1][1]=v2.y;
|
||||
matrix[1][2]=v2.z;
|
||||
matrix[2]=new float[3];
|
||||
matrix[2][0]=v3.x;
|
||||
matrix[2][1]=v3.y;
|
||||
matrix[2][2]=v3.z;
|
||||
matrix[0] = new float[3];
|
||||
matrix[0][0] = v1.x;
|
||||
matrix[0][1] = v1.y;
|
||||
matrix[0][2] = v1.z;
|
||||
matrix[1] = new float[3];
|
||||
matrix[1][0] = v2.x;
|
||||
matrix[1][1] = v2.y;
|
||||
matrix[1][2] = v2.z;
|
||||
matrix[2] = new float[3];
|
||||
matrix[2][0] = v3.x;
|
||||
matrix[2][1] = v3.y;
|
||||
matrix[2][2] = v3.z;
|
||||
}
|
||||
|
||||
Matrix& Matrix::operator+(Matrix &m){
|
||||
if(dim[0]==m.dim[0]&&dim[1]==m.dim[1]){
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]+=m.matrix[i][j];
|
||||
if(dim[0] == m.dim[0] && dim[1] == m.dim[1]){
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] += m.matrix[i][j];
|
||||
return *this;
|
||||
}
|
||||
else{
|
||||
cout<<"Incompatible matrix dimensions for addition.\n";
|
||||
cout << "Incompatible matrix dimensions for addition.\n";
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
Matrix& Matrix::operator-(Matrix &m){
|
||||
if(dim[0]==m.dim[0]&&dim[1]==m.dim[1]){
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]-=m.matrix[i][j];
|
||||
if(dim[0] == m.dim[0] && dim[1] == m.dim[1]){
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] -= m.matrix[i][j];
|
||||
return *this;
|
||||
}
|
||||
else{
|
||||
cout<<"Incompatible matrix dimensions for subtraction.\n";
|
||||
cout << "Incompatible matrix dimensions for subtraction.\n";
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
Matrix Matrix::operator*(Matrix &m){
|
||||
if(dim[1]==m.dim[0]){
|
||||
float **matrix=new float*[dim[0]];
|
||||
for(int i=0;i<dim[0];i++){
|
||||
matrix[i]=new float[m.dim[1]];
|
||||
for(int j=0;j<m.dim[1];j++)
|
||||
matrix[i][j]=0.;
|
||||
if(dim[1] == m.dim[0]){
|
||||
float **matrix = new float*[dim[0]];
|
||||
for(int i = 0; i < dim[0]; i++){
|
||||
matrix[i] = new float[m.dim[1]];
|
||||
for(int j = 0;j < m.dim[1]; j++)
|
||||
matrix[i][j] = 0.;
|
||||
}
|
||||
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
for(int k=0;k<dim[0];k++)
|
||||
matrix[i][j]+=this->matrix[i][k]*m.matrix[k][j];
|
||||
return Matrix(matrix,dim[0],dim[1]);
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
for(int k = 0; k < dim[0]; k++)
|
||||
matrix[i][j] += this->matrix[i][k] * m.matrix[k][j];
|
||||
return Matrix(matrix, dim[0], dim[1]);
|
||||
}
|
||||
else{
|
||||
cout<<"Incompatible matrix dimensions for multiplication.\n";
|
||||
cout << "Incompatible matrix dimensions for multiplication.\n";
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 Matrix::operator* (Vector3 v){
|
||||
float **matrix=new float*[3];
|
||||
matrix[0]=new float[1];
|
||||
matrix[0][0]=v.x;
|
||||
matrix[1]=new float[1];
|
||||
matrix[1][0]=v.y;
|
||||
matrix[2]=new float[1];
|
||||
matrix[2][0]=v.z;
|
||||
float **matrix = new float*[3];
|
||||
matrix[0] = new float[1];
|
||||
matrix[0][0] = v.x;
|
||||
matrix[1] = new float[1];
|
||||
matrix[1][0] = v.y;
|
||||
matrix[2] = new float[1];
|
||||
matrix[2][0] = v.z;
|
||||
|
||||
Matrix vMat(matrix,3,1);
|
||||
vMat=(*this)*vMat;
|
||||
return Vector3(vMat[0][0],vMat[1][0],vMat[2][0]);
|
||||
Matrix vMat(matrix, 3, 1);
|
||||
vMat = (*this) * vMat;
|
||||
return Vector3(vMat[0][0], vMat[1][0], vMat[2][0]);
|
||||
}
|
||||
|
||||
template<typename T> Matrix& Matrix::operator+(T s){
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]+=s;
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T> Matrix& Matrix::operator-(T s){
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]-=s;
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T> Matrix& Matrix::operator*(T s){
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]*=s;
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T> Matrix& Matrix::operator/(T s){
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]/=s;
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Matrix::transpose(){
|
||||
float **matrix=new float*[dim[1]];
|
||||
for(int i=0;i<dim[1];i++)
|
||||
matrix[i]=new float[dim[0]];
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]=this->matrix[j][i];
|
||||
this->matrix=matrix;
|
||||
float **matrix = new float*[dim[1]];
|
||||
for(int i = 0; i < dim[1]; i++)
|
||||
matrix[i] = new float[dim[0]];
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] = this->matrix[j][i];
|
||||
this->matrix = matrix;
|
||||
}
|
||||
|
||||
Matrix Matrix::getSubMatrix(int row,int column){
|
||||
int newRows=dim[0]-1,newColumns=dim[1]-1;
|
||||
float **matrix=new float*[dim[0]];
|
||||
bool offsetRows=false,offsetColumns=false;
|
||||
Matrix Matrix::getSubMatrix(int row, int column){
|
||||
int newRows = dim[0] - 1, newColumns = dim[1] - 1;
|
||||
float **matrix = new float*[dim[0]];
|
||||
bool offsetRows = false, offsetColumns = false;
|
||||
|
||||
for(int i=0;i<dim[1];i++){
|
||||
matrix[i]=new float[dim[1]];
|
||||
for(int i = 0; i < dim[1]; i++){
|
||||
matrix[i] = new float[dim[1]];
|
||||
|
||||
for(int j=0;j<dim[1];j++)
|
||||
if(i!=row&&j!=column){
|
||||
int a=offsetRows&&i!=0?i-1:i,b=offsetColumns&&j!=0?j-1:j;
|
||||
matrix[a][b]=this->matrix[i][j];
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
if(i != row && j != column){
|
||||
int a = (offsetRows && i != 0 ? i - 1 : i), b = (offsetColumns && j != 0 ? j - 1 : j);
|
||||
matrix[a][b] = this->matrix[i][j];
|
||||
}
|
||||
|
||||
else if(i==row) offsetRows=true;
|
||||
else if(j==column) offsetColumns=true;
|
||||
else if(i == row) offsetRows = true;
|
||||
else if(j == column) offsetColumns = true;
|
||||
}
|
||||
return Matrix(matrix,newRows,newColumns);
|
||||
return Matrix(matrix, newRows, newColumns);
|
||||
}
|
||||
|
||||
void Matrix::invert(){
|
||||
transpose();
|
||||
float **matrix=new float*[dim[0]];
|
||||
float **matrix = new float*[dim[0]];
|
||||
|
||||
for(int i=0;i<dim[0];i++){
|
||||
matrix[i]=new float[dim[1]];
|
||||
for(int j=0;j<dim[1];j++)
|
||||
matrix[i][j]=getCofactor(i,j);
|
||||
for(int i = 0; i < dim[0]; i++){
|
||||
matrix[i] = new float[dim[1]];
|
||||
for(int j = 0; j < dim[1]; j++)
|
||||
matrix[i][j] = getCofactor(i, j);
|
||||
}
|
||||
|
||||
for(int i=0;i<dim[0];i++)
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
delete this->matrix[i];
|
||||
delete[] this->matrix;
|
||||
|
||||
this->matrix=matrix;
|
||||
*this/getDeterminant();
|
||||
this->matrix = matrix;
|
||||
*this / getDeterminant();
|
||||
}
|
||||
|
||||
float Matrix::getMinor(int row,int column){
|
||||
return getSubMatrix(row,column).getDeterminant();
|
||||
float Matrix::getMinor(int row, int column){
|
||||
return getSubMatrix(row, column).getDeterminant();
|
||||
}
|
||||
|
||||
float Matrix::getCofactor(int row,int column){
|
||||
return ((row+column+2)%2==0?1:-1)*getMinor(row,column);
|
||||
float Matrix::getCofactor(int row, int column){
|
||||
return ((row + column + 2) % 2 == 0 ? 1 : -1) * getMinor(row, column);
|
||||
}
|
||||
|
||||
float Matrix::getDeterminant(){
|
||||
if(dim[0]!=dim[1]){
|
||||
cout<<"Matrix not square.\n";
|
||||
if(dim[0] != dim[1]){
|
||||
cout << "Matrix not square.\n";
|
||||
exit(-1);
|
||||
}
|
||||
if(dim[0]==1)
|
||||
if(dim[0] == 1)
|
||||
return matrix[0][0];
|
||||
else if(dim[0]==2)
|
||||
return matrix[0][0]*matrix[1][1]-matrix[1][0]*matrix[0][1];
|
||||
else if(dim[0] == 2)
|
||||
return matrix[0][0] * matrix[1][1] - matrix[1][0] * matrix[0][1];
|
||||
else{
|
||||
float det=0;
|
||||
for(int i=0;i<dim[0];i++)
|
||||
det+=matrix[i][0]*getCofactor(i,0);
|
||||
float det = 0;
|
||||
for(int i = 0; i < dim[0]; i++)
|
||||
det += matrix[i][0] * getCofactor(i, 0);
|
||||
return det;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#ifndef MATRIX_H
|
||||
#define MATRIX_H
|
||||
|
||||
#include"vector.h"
|
||||
#include "vector.h"
|
||||
|
||||
namespace vb01{
|
||||
struct Matrix{
|
||||
int dim[2];
|
||||
float **matrix;
|
||||
Matrix(float**,int,int);
|
||||
Matrix(float**, int, int);
|
||||
Matrix(Vector3,Vector3,Vector3);
|
||||
Matrix& operator+ (Matrix&);
|
||||
Matrix& operator- (Matrix&);
|
||||
@@ -19,10 +19,10 @@ namespace vb01{
|
||||
template<typename T> Matrix& operator* (T);
|
||||
template<typename T> Matrix& operator/ (T);
|
||||
void transpose();
|
||||
Matrix getSubMatrix(int,int);
|
||||
Matrix getSubMatrix(int, int);
|
||||
void invert();
|
||||
float getMinor(int,int);
|
||||
float getCofactor(int,int);
|
||||
float getMinor(int, int);
|
||||
float getCofactor(int, int);
|
||||
float getDeterminant();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "texture.h"
|
||||
#include "skeleton.h"
|
||||
#include "animation.h"
|
||||
|
||||
#include <glad.h>
|
||||
#include <glfw3.h>
|
||||
#include <glm.hpp>
|
||||
|
||||
+5
-4
@@ -1,7 +1,8 @@
|
||||
#include"modelReader.h"
|
||||
#include"model.h"
|
||||
#include<vector>
|
||||
#include<fstream>
|
||||
#include "modelReader.h"
|
||||
#include "model.h"
|
||||
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define MODEL_READER
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "model.h"
|
||||
|
||||
namespace vb01{
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include"quaternion.h"
|
||||
#include "quaternion.h"
|
||||
|
||||
namespace vb01{
|
||||
const Quaternion Quaternion::QUAT_W(1, 0, 0, 0);
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
#ifndef QUATERNION_H
|
||||
#define QUATERNION_H
|
||||
|
||||
#include<cmath>
|
||||
#include"vector.h"
|
||||
#include <cmath>
|
||||
|
||||
#include "vector.h"
|
||||
|
||||
namespace vb01{
|
||||
class Quaternion{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include<algorithm>
|
||||
#include"ray.h"
|
||||
#include"mesh.h"
|
||||
#include"node.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "ray.h"
|
||||
#include "mesh.h"
|
||||
#include "node.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include"vector.h"
|
||||
#include"util.h"
|
||||
#include<vector>
|
||||
#include "vector.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace vb01{
|
||||
class Node;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#include"stb_image.h"
|
||||
#include"root.h"
|
||||
#include"node.h"
|
||||
#include"shader.h"
|
||||
#include"box.h"
|
||||
#include"quad.h"
|
||||
#include<glad.h>
|
||||
#include<glfw3.h>
|
||||
#include<cstdlib>
|
||||
#include<iostream>
|
||||
#include "stb_image.h"
|
||||
#include "root.h"
|
||||
#include "node.h"
|
||||
#include "shader.h"
|
||||
#include "box.h"
|
||||
#include "quad.h"
|
||||
|
||||
#include <glad.h>
|
||||
#include <glfw3.h>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#ifndef ROOT_H
|
||||
#define ROOT_H
|
||||
|
||||
#include"camera.h"
|
||||
#include<string>
|
||||
#include<vector>
|
||||
#include "camera.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class GLFWwindow;
|
||||
|
||||
|
||||
+9
-8
@@ -1,11 +1,12 @@
|
||||
#include<glad.h>
|
||||
#include<glfw3.h>
|
||||
#include<iostream>
|
||||
#include<sstream>
|
||||
#include<fstream>
|
||||
#include"shader.h"
|
||||
#include<glm/gtc/matrix_transform.hpp>
|
||||
#include<glm/gtc/type_ptr.hpp>
|
||||
#include <glad.h>
|
||||
#include <glfw3.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
|
||||
#include "shader.h"
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace glm;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#ifndef SHADER_H
|
||||
#define SHADER_H
|
||||
|
||||
#include<string>
|
||||
#include<glm/mat4x4.hpp>
|
||||
#include"vector.h"
|
||||
#include"util.h"
|
||||
#include <string>
|
||||
#include <glm/mat4x4.hpp>
|
||||
|
||||
#include "vector.h"
|
||||
#include "util.h"
|
||||
|
||||
namespace vb01{
|
||||
class Shader{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "animationController.h"
|
||||
#include "box.h"
|
||||
#include "ikSolver.h"
|
||||
|
||||
#include <glm.hpp>
|
||||
#include <glm/gtc/matrix_inverse.hpp>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "bone.h"
|
||||
|
||||
namespace vb01{
|
||||
|
||||
+8
-5
@@ -1,9 +1,12 @@
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include"stb_image.h"
|
||||
#include<glad.h>
|
||||
#include<glfw3.h>
|
||||
#include"texture.h"
|
||||
#include<iostream>
|
||||
|
||||
#include "stb_image.h"
|
||||
|
||||
#include "texture.h"
|
||||
|
||||
#include <glad.h>
|
||||
#include <glfw3.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <ft2build.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "animatable.h"
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include"util.h"
|
||||
#include<fstream>
|
||||
#include "util.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include<chrono>
|
||||
#include<cmath>
|
||||
#include<string>
|
||||
#include<vector>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace vb01{
|
||||
typedef char s8;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include"vector.h"
|
||||
#include "vector.h"
|
||||
|
||||
namespace vb01{
|
||||
const Vector2 Vector2::VEC_IJ(1,1);
|
||||
|
||||
Reference in New Issue
Block a user