Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
d478551a45 |
@@ -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-2.2.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;
|
||||
};
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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