Skip to content

Commit

Permalink
Merge pull request #6 from dvoromar/exportToGltf
Browse files Browse the repository at this point in the history
Export animation to glTF format
  • Loading branch information
sykorad committed Jun 3, 2021
2 parents 3c3b5d2 + f34da1a commit 6467b2e
Show file tree
Hide file tree
Showing 18 changed files with 29,144 additions and 33 deletions.
8 changes: 8 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set(SOURCES
mypainter.cpp
mywindow.cpp
def3dsdl.cpp
exportgltf.cpp
../third_party/ir3d-utils/regionToMesh.cpp
../third_party/ir3d-utils/MeshBuilder.cpp
../third_party/image/imageReadWrite.cpp
Expand All @@ -40,6 +41,7 @@ set(SOURCES
../third_party/zip-mod/zip.c
../third_party/SDL2_gfx-mod/SDL2_gfxPrimitives-mod.c
../third_party/SDL2_gfx/SDL2_rotozoom.c
../third_party/tinygltf/tinygltf.cpp
)

set(HEADERS
Expand All @@ -53,6 +55,7 @@ set(HEADERS
mywindow.h
def3dsdl.h
macros.h
exportgltf.h
../third_party/ir3d-utils/regionToMesh.h
../third_party/image/image.h
../third_party/image/imageReadWrite.hpp
Expand Down Expand Up @@ -124,6 +127,10 @@ set(DEFINES ${DEFINES}
EIGEN_MPL2_ONLY
EIGEN_SPARSESOLVERBASE_H
_SDL2_gfxPrimitives_h
TINYGLTF_NO_STB_IMAGE
TINYGLTF_NO_STB_IMAGE_WRITE
TINYGLTF_NO_EXTERNAL_IMAGE
TINYGLTF_USE_CPP14
APP_VERSION=${APP_VERSION_VAR}
)

Expand All @@ -142,6 +149,7 @@ set(INCLUDEPATH
../third_party/zip-mod
../third_party/SDL2_gfx
../third_party/SDL2_gfx-mod
../third_party/tinygltf
${SDL2_INCLUDE_DIRS}
)

Expand Down
4 changes: 2 additions & 2 deletions src/commonStructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ struct RecData {
bool interiorDepthConditions = false;
};

typedef struct {
struct PauseStatus {
bool defPaused = false;
bool animPaused = false;
} PauseStatus;
};

struct CameraData {
bool ortho = true;
Expand Down
4 changes: 2 additions & 2 deletions src/cpanim.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@

class CPAnim {
public:
typedef struct {
struct Keypose {
Eigen::Vector3d p;
int timestamp;
bool empty = true;
bool display = false;
bool have_timestamp = true;
} Keypose;
};

CPAnim();
CPAnim(unsigned int length, const Eigen::Vector3d &p);
Expand Down

0 comments on commit 6467b2e

Please sign in to comment.