Initial MSVC
This commit is contained in:
@@ -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)
|
||||
@@ -19,16 +19,24 @@ set(CMAKE_CXX_STANDARD 20)
|
||||
file(GLOB_RECURSE HEADERS "include/*.h")
|
||||
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
||||
|
||||
include_directories("include" ${J3ML_SOURCE_DIR}/include)
|
||||
|
||||
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()
|
||||
|
||||
target_include_directories(Collage PUBLIC ${PROJECT_SOURCE_DIR}/include ${J3ML_SOURCE_DIR}/include)
|
||||
|
||||
add_executable(CollageTest main.cpp)
|
||||
|
||||
set_target_properties(Collage PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(Collage PUBLIC J3ML)
|
||||
|
||||
target_link_libraries(CollageTest PUBLIC Collage)
|
||||
set_target_properties(CollageTest PROPERTIES LINKER_LANGUAGE CXX)
|
@@ -4,7 +4,7 @@
|
||||
#include <Collage/types/bone.h>
|
||||
|
||||
struct KeyFrame {
|
||||
uint index;
|
||||
unsigned int index;
|
||||
Bone bone;
|
||||
};
|
||||
|
||||
|
@@ -15,7 +15,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();
|
||||
void setParent(Bone* b);
|
||||
Bone* getChildByName(const std::string& bName);
|
||||
|
@@ -25,7 +25,7 @@ public:
|
||||
std::string name;
|
||||
ModelType type;
|
||||
std::vector<Vertex> vertices;
|
||||
std::vector<uint> indices;
|
||||
std::vector<unsigned int> indices;
|
||||
std::vector<TextureCoordinate> textureCoords;
|
||||
//std::vector<TextureInformation> textureInfo;
|
||||
Model() = default;
|
||||
|
2
main.cpp
2
main.cpp
@@ -1,7 +1,5 @@
|
||||
#include <iostream>
|
||||
#include <Collage/collage.h>
|
||||
|
||||
int main() {
|
||||
Model m = Model("chicken.amo");
|
||||
//Model::loadOBJ("chicken.amo");
|
||||
}
|
||||
|
@@ -64,12 +64,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++;
|
||||
|
Reference in New Issue
Block a user