1 Commits
main ... v0.5

Author SHA1 Message Date
d478551a45 Windows 2024-06-30 19:49:53 -04:00
6 changed files with 16 additions and 9 deletions

View File

@@ -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)

View File

@@ -3,7 +3,7 @@
#include <Collage/types/bone.h>
struct KeyFrame {
uint index;
unsigned int index;
Bone bone;
};

View File

@@ -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);

View File

@@ -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);

View 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++;

View File

@@ -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;
}