Skip to content

Commit

Permalink
Remove newton dynamics
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamakaio committed Jun 24, 2024
1 parent c70effd commit ef2a4c2
Show file tree
Hide file tree
Showing 17 changed files with 10 additions and 1,497 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
[submodule "3rdparty/magnum-integration"]
path = 3rdparty/magnum-integration
url = https://github.com/mosra/magnum-integration.git
[submodule "3rdparty/newton-dynamics"]
path = 3rdparty/newton-dynamics
url = https://github.com/MADEAPPS/newton-dynamics.git
[submodule "3rdparty/entt"]
path = 3rdparty/entt
url = https://github.com/skypjack/entt.git
Expand Down
14 changes: 0 additions & 14 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,6 @@ SET(MAGNUM_WITH_TINYGLTFIMPORTER ON CACHE BOOL "" FORCE)
SET(MAGNUM_WITH_STBIMAGEIMPORTER ON CACHE BOOL "" FORCE)
ADD_SUBDIRECTORY(magnum-plugins EXCLUDE_FROM_ALL)

SET(NEWTON_BUILD_SANDBOX_DEMOS OFF CACHE BOOL "" FORCE)
SET(NEWTON_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
SET(NEWTON_USE_PLUGIN_DLL OFF CACHE BOOL "" FORCE)
SET(NEWTON_WITH_AVX_PLUGIN OFF CACHE BOOL "" FORCE)
SET(NEWTON_WITH_REFERENCE_GPU_PLUGIN OFF CACHE BOOL "" FORCE)
ADD_SUBDIRECTORY(newton-dynamics/newton-3.14/ EXCLUDE_FROM_ALL)

# Newton sets CMAKE_ARCHIVE_OUTPUT_DIRECTORY and CMAKE_LIBRARY_OUTPUT_DIRECTORY
# for UNIX, so manually set each target to our desired location
SET_TARGET_PROPERTIES(dAnimation dContainers dCustomJoints dMath dModel dNewton dScene dVehicle dgCore dgPhysics newton PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
)

ADD_SUBDIRECTORY(entt EXCLUDE_FROM_ALL)

# toml11 3.8.0 added a check for this global variable, which they should not have.
Expand Down
1 change: 0 additions & 1 deletion 3rdparty/newton-dynamics
Submodule newton-dynamics deleted from d8fb1d
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ By taking advantage of Entity Component System (ECS) architectures and Data-Orie
* Scene Graph
* Configurable multipass Renderer
* Straightforward interface for integrating any physics engine
* Out of the box we integrate with Newton Dynamics 3.14c.
* Out of the box we integrate with Jolt Physics 5.0.
* PRs to support other physics engines welcome!!!
* Wiring/Connection System
* Resource flow between ship components
Expand All @@ -50,7 +50,7 @@ By taking advantage of Entity Component System (ECS) architectures and Data-Orie

### Extra

* *Newton Dynamics* Physics Engine integration
* *Jolt Physics* Physics Engine integration
* Rockets, RCS, and Fuel tanks
* Rocket exhaust plume effects
* Planet terrain, Icosahedron-based tessellation
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Welcome aboard! This document presents a high level overview of the project, aim
* `src/osp` - Core components for a spaceflight simulator.
* `src/adera` - Fun stuff. More gameplay and visual-effects focused.
* `src/planet-a` - Planet terrain subdivision code.
* `src/ospnewton` - Newton Dynamics physics engine integration
* `src/ospjolt` - Jolt Physics physics engine integration
* `src/testapp` - Runnable application. Assembles everything to make test scenarios.

Most components are separate building blocks (with intended uses). The 'game engine' only comes into existence within `testapp`.
Expand Down
8 changes: 4 additions & 4 deletions docs/dependencygraph.dot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ digraph {
"Longeron++"
"Magnum & Corrade"
"Magnum/GL";
"Newton Dynamics";
"Jolt Physics";

node [shape=rectangle, style=filled, fillcolor=white]
"osp/core" -> "Magnum & Corrade";
Expand All @@ -36,8 +36,8 @@ digraph {
"adera/machines" -> "osp/link";

node [shape=rectangle, style=filled, fillcolor=lightslateblue]
"ospnewton/activescene" -> "osp/activescene";
"ospnewton/activescene" -> "Newton Dynamics";
"ospjolt/activescene" -> "osp/activescene";
"ospjolt/activescene" -> "Jolt Physics";

node [shape=rectangle, style=filled, fillcolor=palegreen1]
"planet-a" -> "osp/core";
Expand All @@ -48,7 +48,7 @@ digraph {
"testapp/sessions" -> "adera/machines";
"testapp/sessions" -> "adera/drawing_gl";
"testapp/sessions" -> "adera/drawing";
"testapp/sessions" -> "ospnewton/activescene";
"testapp/sessions" -> "ospjolt/activescene";
"testapp/sessions" -> "planet-a";
"testapp/sessions" -> "adera/activescene";
"testapp" -> "testapp/sessions";
Expand Down
34 changes: 0 additions & 34 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,6 @@ endif()
add_library(osp-magnum-deps INTERFACE)
add_custom_target(compile-osp-magnum-deps)

# Include Newton Dynamics to the project

# TODO: find a better way to do this.
# Somehow Newton needs some defines for headers to work properly.
# This section was based on Newton Dynamic's CMakeLists.txt
if(UNIX)
if (BUILD_64)
target_compile_definitions(osp-magnum-deps INTERFACE -D_POSIX_VER_64)
else (BUILD_64)
target_compile_definitions(osp-magnum-deps INTERFACE -D_POSIX_VER)
endif (BUILD_64)

elseif(MSVC)
if(WIN32)
if(CMAKE_CL_64)
target_compile_definitions(osp-magnum-deps INTERFACE -D_WIN_64_VER)
else()
target_compile_definitions(osp-magnum-deps INTERFACE -D_WIN_32_VER)
endif()
else()
target_compile_definitions(osp-magnum-deps INTERFACE -D_ARM_VER)
endif()

elseif(MINGW)
if(CMAKE_CL_64)
target_compile_definitions(osp-magnum-deps INTERFACE -D_MINGW_64_VER)
target_compile_definitions(osp-magnum-deps INTERFACE -D_WIN_64_VER)
else()
target_compile_definitions(osp-magnum-deps INTERFACE -D_MINGW_32_VER)
target_compile_definitions(osp-magnum-deps INTERFACE -D_WIN_32_VER)
endif()
endif()

# TODO: This list shouldn't be required, but there appears to be a bug in cmake where
# the add_custom_target() command, pointing to an INTERFACE dependency, doesn't
# result in the dependencies of the interface building.
Expand All @@ -99,7 +66,6 @@ SET(OSP_MAGNUM_DEPS_LIBS
Magnum::AnyImageImporter
MagnumPlugins::TinyGltfImporter
MagnumPlugins::StbImageImporter
dNewton dScene dModel dVehicle
toml11
spdlog
longeron
Expand Down
39 changes: 0 additions & 39 deletions src/ospnewton/activescene/forcefactors.h

This file was deleted.

109 changes: 0 additions & 109 deletions src/ospnewton/activescene/newtoninteg.h

This file was deleted.

Loading

0 comments on commit ef2a4c2

Please sign in to comment.