Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
5c23ff7701 | |||
cedad4f3ea | |||
65792fbff2 | |||
|
b37eba52aa | ||
|
1a90e00fd6 | ||
|
c527d4fa57 | ||
|
2fb62d38ce | ||
|
87ce88c02a | ||
|
f9085722fd | ||
|
51a68240b0 | ||
|
88adf1618e | ||
|
b1a6202a3b | ||
|
40d88cdb9f | ||
|
7dc9fc2f23 | ||
|
586149c770 | ||
|
8fee6a54f3 | ||
|
2a8b371b89 | ||
|
785f2b63d6 | ||
|
15e5d76326 | ||
|
f43623c163 | ||
|
5eebaa294a | ||
301e36e3bb | |||
|
37d81e9c0f | ||
|
00ccfcce4d | ||
|
89c87c6699 | ||
2f4e14d292 |
@@ -11,7 +11,7 @@ include(cmake/CPM.cmake)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME J3ML
|
||||
URL https://git.redacted.cc/josh/j3ml/archive/Release-1.zip
|
||||
URL https://git.redacted.cc/josh/j3ml/archive/Release-3.0.zip
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
@@ -25,7 +25,14 @@ if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
||||
message(FATAL_ERROR "In-Source builds are not allowed")
|
||||
endif()
|
||||
|
||||
add_library(Collage SHARED ${SOURCES} ${HEADERS})
|
||||
if (UNIX AND NOT APPLE)
|
||||
add_library(Collage SHARED ${SOURCES} ${HEADERS})
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
add_library(Collage STATIC ${SOURCES} ${HEADERS})
|
||||
endif()
|
||||
|
||||
add_executable(CollageTest main.cpp)
|
||||
|
||||
set_target_properties(Collage PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include <Collage/types/bone.h>
|
||||
|
||||
struct KeyFrame {
|
||||
uint index;
|
||||
unsigned int index;
|
||||
Bone bone;
|
||||
};
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <J3ML/LinearAlgebra.h>
|
||||
#include <J3ML/LinearAlgebra.hpp>
|
||||
class Bone {
|
||||
protected:
|
||||
std::string name;
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
const Matrix4x4& getMatrix();
|
||||
void setMatrix(const Matrix4x4& m);
|
||||
void appendChild(const Bone& bone);
|
||||
uint getDepth(); //The "depth" refers to how far in the bone is on the bonemap. For ex, the fingers would be deeper than the elbow.
|
||||
unsigned int getDepth(); //The "depth" refers to how far in the bone is on the bonemap. For ex, the fingers would be deeper than the elbow.
|
||||
Bone* getParent();
|
||||
Bone* getChildByName(const std::string& bName);
|
||||
Bone* getChildByNameRecursive(const std::string& bName);
|
||||
|
@@ -2,9 +2,9 @@
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <J3ML/LinearAlgebra.h>
|
||||
#include <J3ML/LinearAlgebra/Vector3.h>
|
||||
#include<J3ML/Geometry.h>
|
||||
#include <J3ML/LinearAlgebra.hpp>
|
||||
#include <J3ML/LinearAlgebra/Vector3.hpp>
|
||||
#include<J3ML/Geometry.hpp>
|
||||
#include <Collage/types/textureInfo.h>
|
||||
|
||||
typedef Vector3 Vertex;
|
||||
@@ -31,12 +31,12 @@ protected:
|
||||
void load(const std::string& file);
|
||||
void loadOBJ(const std::string& filename);
|
||||
std::vector<Vertex> vertices;
|
||||
std::vector<uint> indices;
|
||||
std::vector<unsigned int> indices;
|
||||
std::vector<TextureInformation> textureInfo;
|
||||
public:
|
||||
ModelType type;
|
||||
const std::vector<Vertex>& getVertices();
|
||||
const std::vector<uint>& getIndices();
|
||||
const std::vector<unsigned int>& getIndices();
|
||||
const std::vector<TextureInformation>& getTextureInformation();
|
||||
Model() = default;
|
||||
explicit Model(const std::string& file);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <J3ML/LinearAlgebra.h>
|
||||
#include <J3ML/LinearAlgebra.hpp>
|
||||
|
||||
struct TextureInformation {
|
||||
std::string path;
|
||||
|
@@ -54,12 +54,12 @@ Bone* Bone::getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
uint Bone::getDepth() {
|
||||
unsigned int Bone::getDepth() {
|
||||
if (isRootBone())
|
||||
return 0;
|
||||
|
||||
Bone* b = parent;
|
||||
uint depth = 1;
|
||||
unsigned int depth = 1;
|
||||
while (b != nullptr && !b->isRootBone()) {
|
||||
b = b->getParent();
|
||||
depth++;
|
||||
|
@@ -9,7 +9,7 @@ const std::vector<Vector3>& Model::getVertices() {
|
||||
return vertices;
|
||||
}
|
||||
|
||||
const std::vector<uint>& Model::getIndices() {
|
||||
const std::vector<unsigned int>& Model::getIndices() {
|
||||
return indices;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user