Commit Graph

609 Commits

Author SHA1 Message Date
JosiahWI 0f73c30a1f Mark ModelParser constructors noexcept 2024-04-18 07:31:37 -05:00
JosiahWI 22f6012d2e Document readVec3DF and getScale 2024-04-18 07:30:47 -05:00
JosiahWI fd41ee02df Add const to numeric parameters 2024-04-18 07:28:34 -05:00
JosiahWI 60a5f5746f Return vector from getVertices 2024-04-18 07:28:03 -05:00
JosiahWI ea22b642c1 Refactor getIndices() 2024-04-18 07:27:42 -05:00
JosiahWI 5f5dd7abfc Document coordinate system change at top of source 2024-04-18 07:27:22 -05:00
JosiahWI 8c9a5764ee Convert snake_case variable names to camelCase 2024-04-18 07:27:22 -05:00
JosiahWI 50da04297f Add r-value reference constructor to ModelParser 2024-04-18 07:27:20 -05:00
JosiahWI 85fdf95afa Fix function declaration indents 2024-04-18 07:26:48 -05:00
JosiahWI 79bfd8afbe Move parsing methods into ModelParser class 2024-04-18 07:26:11 -05:00
JosiahWI 2dbe3b866a Fix CMake tinygltf dependencies 2024-04-18 07:25:37 -05:00
JosiahWI 7e0d57b4fe Reorganize CGLTFMeshFileLoader help functions
I moved them all into static methods and changed the ordering in the
source file so that createMesh() would be close to the top of the file.
I also corrected formatting in some of the function declarations since I
had to change them anyway.
2024-04-18 07:25:34 -05:00
JosiahWI 2175cf6e1c Restore path accidentally removed in 584a46f 2024-04-18 07:24:54 -05:00
JosiahWI 3bbf3f7e0e Disable -Werror on minimum-cmake CI 2024-04-18 07:24:54 -05:00
JosiahWI 5bae506dc7 Set C compiler to gcc-5 for minimum-cmake CI
gcc-5 is already installed on the CI as a dependency for g++-5.
2024-04-18 07:24:53 -05:00
JosiahWI 774123844d Set C compiler to g++-5 on minimum-cmake CI 2024-04-18 07:24:53 -05:00
JosiahWI 9f2d5a1b8a Fix indentation style in CMakeLists 2024-04-18 07:24:52 -05:00
JosiahWI 4d4d8df2aa Work around TestBigEndian bug in cmake<3.9 2024-04-18 07:24:32 -05:00
JosiahWI c9e05c6e9a Work around cmake<3.12 object target rules
CMake does not allow specifying usage requirements with
target_link_libraries() until version 3.12.
2024-04-18 07:24:31 -05:00
JosiahWI eaebd34c4e Remove unneeded tinygltf include from header 2024-04-18 07:24:01 -05:00
JosiahWI a3633afce3 Clarify behavior of BUILD_TESTING option in README 2024-04-18 07:23:21 -05:00
JosiahWI 673de228cf Do not fail to load glTF because of warnings 2024-04-18 07:22:44 -05:00
JosiahWI 5a190a6ab9 Mark CGLTFMeshFileLoader constructor as noexcept 2024-04-18 07:22:43 -05:00
JosiahWI 246ee9c3ca Register Catch2 tests with CTest 2024-04-18 07:22:24 -05:00
jordan4ibanez 030abc7b04 spaces->tabs 2024-04-18 07:21:59 -05:00
jordan4ibanez 971a9e214e Update code with requested changes
Fix mistake on github

Comply with changes 1

Comply with requested changes 2

Comply with requested changed 3

Comply with requested changed 4

Requested changed 5

Requested changed 6

Requested changed 7

Requested changed 8

Requested changed 9

Requested changed 10

Requested changes 11

Requested changes 12

This one wasn't even requested

I just turned on my vertical ruler and I'm going to go nuts

Line 81 doesn't exist anymore

Requested changes 13

Requested changes 14

Begin snow man test

Write a lot of tests for snow man

Add to git ignore

Now unignore it

Alphabetical order

Pass by reference

Pass by reference

vertexBuffer is now handled on stack

Preallocate indicesBuffer then reverse it when complete

Undo vertexBuffer stack change causing mac builds to fail

Use direct initialization on the vertexBuffer
2024-04-18 07:21:59 -05:00
jordan4ibanez 4a8602ed0f Fix embedded textures causing a model not to load 2024-04-18 07:21:59 -05:00
jordan4ibanez 08d226cdb5 Fix indices, inverted models, & multiple models failing to load
Fix embedded textures causing a model not to load

Add todo

Add another todo

Push current (broken) prototyping

Fix missing bracket

Make a single array object work

Convert hard array into dynamic vector

Simplify semantics

Remove "new"

Add blocker for vscode environment changes

Disable non-dynamic prototyping

Add comment

Add more informative debug & disable it

Add additional items to gitignore

Add debug info for scalar value

Output even more debug info

Make textures render correctly

Insert the indices properly

Update .gitignore

Disable y flip

Make a reusable vertex buffer :)

Disallow embedded textures

More disable

Set up implementation for contiguous model

Add a note

More automation & framework

Final framework before stepping into function overhaul

Hold track of current_index

Integrate iterators

More integration

Rename, it's going to need 2 counters

Correctly offset the count to the right

Sync normals with positions

Time to use a tuple

Set up other counters

Do return value

Do input passing

Make (somewhat) working contiguous model

Add getter for translation data

Add debug info for future utilization

Update .gitignore

More debug

Update .gitignore

Update .gitignore

Remove all debug info & clean up

Delete this thing

Automate everything & put it into spec

Spaces into tabs

Remove array include as build test

Fix the gitignore
2024-04-18 07:21:59 -05:00
Josiah VanderZee 0216a02ed4 Fix segfault from reading bad number of indices 2024-04-18 07:21:59 -05:00
Josiah VanderZee f1042bf4c4 Update to latest branch of lukka/get-cmake 2024-04-18 07:21:59 -05:00
Josiah VanderZee a326f27f6a Fix coordinate system change
Old code was inverting the X axis, new code inverts the Z axis.
2024-04-18 07:21:59 -05:00
Josiah VanderZee 47a195b4de Fix aliasing violation when reading primitives 2024-04-18 07:21:59 -05:00
Josiah VanderZee 3dc24abdb3 Remove DESCRIPTION from tinygltf project 2024-04-18 07:21:58 -05:00
Josiah VanderZee cdad3a8f43 Switch to fixed branch of lukka/get-cmake action 2024-04-18 07:21:58 -05:00
Josiah VanderZee 7220104c37 Test vertex normals on cube 2024-04-18 07:21:58 -05:00
Josiah VanderZee 72cb09a566 Test for texture coordinates on cube 2024-04-18 07:21:58 -05:00
Josiah VanderZee 742307f077 Scale cube vertices correctly 2024-04-18 07:21:58 -05:00
Josiah VanderZee 837b6be14e Add test for blender cube 2024-04-18 07:21:58 -05:00
Josiah VanderZee 12b760e45b Use a better action for getting CMake 3.5 2024-04-18 07:21:58 -05:00
Josiah VanderZee 82c547d50f Test for correct vertex indices 2024-04-18 07:21:56 -05:00
JosiahWI b4c4325ea4 Add CI build for CMake 3.5 with GCC 5.3 2024-04-18 07:20:25 -05:00
JosiahWI 3d2d3f8d5a Remove constexpr from readFloat 2024-04-18 07:20:25 -05:00
JosiahWI a20ac715ce Load vertex coordinates from glTF buffer 2024-04-18 07:20:22 -05:00
JosiahWI 21c3c16557 Test invalid JSON
Also converted all .cpp and .h line endings to CRLF in this commit.
2024-04-18 07:19:30 -05:00
JosiahWI 8c9c1e57ea Specify all source fools directly on IrrlichtMt 2024-04-18 07:19:12 -05:00
JosiahWI 2ae436cb2c Update vertex test for coordinate system
This is also the first working version of the mesh. I successfully
loaded it in Minetest.
2024-04-18 07:18:30 -05:00
JosiahWI 30d5748e0c Test case when file is nullptr 2024-04-18 07:18:30 -05:00
JosiahWI 5e2d9d947e Test that minimal triangle has correct vertices 2024-04-18 07:18:30 -05:00
JosiahWI a9f56df279 Test that minimal triangle returns some mesh 2024-04-18 07:18:29 -05:00
JosiahWI 7900f0a3a9 Fix path to tests in CI and use Ninja 2024-04-18 07:17:12 -05:00