Skip to content

Commit

Permalink
Re-integrate oscar_simbody into OpenSimCreator
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Oct 17, 2024
1 parent 9ce9d72 commit 7d65453
Show file tree
Hide file tree
Showing 62 changed files with 78 additions and 231 deletions.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ add_subdirectory(oscar_compiler_configuration)
add_subdirectory(oscar)
add_subdirectory(oscar_demos)
if (${OSC_BUILD_OPENSIMCREATOR})
add_subdirectory(oscar_simbody)
add_subdirectory(OpenSimThirdPartyPlugins)
add_subdirectory(OpenSimCreator)
endif()
27 changes: 22 additions & 5 deletions src/OpenSimCreator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ add_library(OpenSimCreator STATIC
Documents/ExperimentalData/StorageSchema.cpp
Documents/ExperimentalData/StorageSchema.h

UI/Events/AddMusclePlotEvent.cpp
UI/Events/AddMusclePlotEvent.h
UI/Events/OpenComponentContextMenuEvent.h

Documents/FrameDefinition/FrameDefinitionActions.cpp
Documents/FrameDefinition/FrameDefinitionActions.h
Documents/FrameDefinition/FrameDefinitionHelpers.cpp
Expand Down Expand Up @@ -238,6 +234,10 @@ add_library(OpenSimCreator STATIC
Platform/RecentFiles.cpp
Platform/RecentFiles.h

UI/Events/AddMusclePlotEvent.cpp
UI/Events/AddMusclePlotEvent.h
UI/Events/OpenComponentContextMenuEvent.h

UI/FrameDefinition/FrameDefinitionTab.cpp
UI/FrameDefinition/FrameDefinitionTab.h
UI/FrameDefinition/FrameDefinitionTabToolbar.cpp
Expand Down Expand Up @@ -390,19 +390,37 @@ add_library(OpenSimCreator STATIC
UI/LoadingTab.h
UI/MainUIScreen.cpp
UI/MainUIScreen.h
UI/MeshHittestTab.cpp
UI/MeshHittestTab.h
UI/OpenSimCreatorTabRegistry.cpp
UI/OpenSimCreatorTabRegistry.h
UI/OpenSimCreatorTabs.h
UI/PerformanceAnalyzerTab.cpp
UI/PerformanceAnalyzerTab.h
UI/RendererGeometryShaderTab.cpp
UI/RendererGeometryShaderTab.h
UI/SplashTab.cpp
UI/SplashTab.h
UI/TPS2DTab.cpp
UI/TPS2DTab.h

Utils/LandmarkPair3D.cpp
Utils/LandmarkPair3D.h
Utils/OpenSimHelpers.cpp
Utils/OpenSimHelpers.h
Utils/ParamBlock.h
Utils/ParamBlock.cpp
Utils/ParamValue.h
Utils/ShapeFitters.cpp
Utils/ShapeFitters.h
Utils/SimTKConverters.cpp
Utils/SimTKConverters.h
Utils/SimTKDecorationGenerator.cpp
Utils/SimTKDecorationGenerator.h
Utils/SimTKMeshLoader.cpp
Utils/SimTKMeshLoader.h
Utils/TPS3D.cpp
Utils/TPS3D.h
)

target_include_directories(OpenSimCreator PUBLIC
Expand All @@ -415,7 +433,6 @@ target_link_libraries(OpenSimCreator PUBLIC
oscar_compiler_configuration
oscar
oscar_demos
oscar_simbody

osim
OpenSimThirdPartyPlugins
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "InMemoryMesh.h"

#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <OpenSim/Simulation/Model/Frame.h>
#include <oscar/Graphics/Scene/SceneDecoration.h>
#include <oscar_simbody/SimTKConverters.h>

void osc::mow::InMemoryMesh::implGenerateCustomDecorations(
const SimTK::State& state,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#include <OpenSimCreator/Documents/ExperimentalData/DataPointType.h>

#include <OpenSim/Common/Storage.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>
#include <oscar/Graphics/Color.h>
#include <oscar/Maths/ClosedInterval.h>
#include <oscar/Maths/QuaternionFunctions.h>
#include <oscar/Utils/Assertions.h>
#include <oscar_simbody/SimTKConverters.h>
#include <Simbody.h>

#include <span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
#include <OpenSimCreator/Documents/Model/UndoableModelStatePair.h>
#include <OpenSimCreator/Graphics/ModelRendererParams.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <Simbody.h>
#include <OpenSim/Simulation/Model/Appearance.h>
#include <OpenSim/Simulation/Model/Frame.h>
#include <OpenSim/Simulation/Model/Model.h>
#include <oscar/Graphics/Color.h>
#include <oscar/Maths/Vec3.h>
#include <oscar_simbody/SimTKConverters.h>

#include <array>
#include <atomic>
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSimCreator/Documents/MeshImporter/OpenSimBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <OpenSimCreator/Documents/MeshImporter/OpenSimExportFlags.h>
#include <OpenSimCreator/Documents/MeshImporter/Station.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKMeshLoader.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <SimTKcommon.h>
#include <OpenSim/Common/Component.h>
Expand Down Expand Up @@ -40,8 +42,6 @@
#include <oscar/Platform/Log.h>
#include <oscar/Utils/Algorithms.h>
#include <oscar/Utils/UID.h>
#include <oscar_simbody/SimTKMeshLoader.h>
#include <oscar_simbody/SimTKConverters.h>

#include <array>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <OpenSimCreator/Utils/LandmarkPair3D.h>
#include <oscar/Utils/StringName.h>
#include <oscar_simbody/LandmarkPair3D.h>

namespace osc
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#include <OpenSimCreator/Documents/MeshWarper/TPSDocumentElementID.h>
#include <OpenSimCreator/Documents/MeshWarper/TPSDocumentInputIdentifier.h>
#include <OpenSimCreator/Documents/MeshWarper/TPSDocumentLandmarkPair.h>
#include <OpenSimCreator/Utils/LandmarkPair3D.h>

#include <oscar/Graphics/Mesh.h>
#include <oscar/Maths/Vec3.h>
#include <oscar/Utils/CStringView.h>
#include <oscar/Utils/EnumHelpers.h>
#include <oscar/Utils/StringName.h>
#include <oscar_simbody/LandmarkPair3D.h>

#include <cstddef>
#include <optional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include <OpenSimCreator/Documents/MeshWarper/TPSDocument.h>
#include <OpenSimCreator/Documents/MeshWarper/TPSDocumentHelpers.h>
#include <OpenSimCreator/Utils/TPS3D.h>

#include <oscar/Graphics/Mesh.h>
#include <oscar/Maths/Vec3.h>
#include <oscar_simbody/TPS3D.h>

#include <algorithm>
#include <ranges>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <OpenSimCreator/Documents/MeshWarper/TPSDocumentLandmarkPair.h>
#include <OpenSimCreator/Documents/MeshWarper/TPSWarpResultCache.h>
#include <OpenSimCreator/Documents/MeshWarper/UndoableTPSDocument.h>
#include <OpenSimCreator/Utils/SimTKMeshLoader.h>

#include <oscar/Formats/CSV.h>
#include <oscar/Formats/OBJ.h>
Expand All @@ -19,7 +20,6 @@
#include <oscar/Platform/App.h>
#include <oscar/Platform/AppMetadata.h>
#include <oscar/Platform/os.h>
#include <oscar_simbody/SimTKMeshLoader.h>

#include <array>
#include <filesystem>
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSimCreator/Documents/Model/UndoableModelActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include <OpenSimCreator/UI/Shared/ObjectPropertiesEditor.h>
#include <OpenSimCreator/UI/Simulation/SimulationTab.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/ShapeFitters.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <OpenSim/Common/Component.h>
#include <OpenSim/Common/ComponentList.h>
Expand Down Expand Up @@ -56,8 +58,6 @@
#include <oscar/Utils/Algorithms.h>
#include <oscar/Utils/FilesystemHelpers.h>
#include <oscar/Utils/UID.h>
#include <oscar_simbody/ShapeFitters.h>
#include <oscar_simbody/SimTKConverters.h>

#include <algorithm>
#include <chrono>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <OpenSimCreator/Graphics/OpenSimDecorationGenerator.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <OpenSim/Simulation/Model/Geometry.h>
#include <OpenSim/Simulation/Model/Model.h>
Expand All @@ -12,7 +13,6 @@
#include <oscar/Formats/OBJ.h>
#include <oscar/Platform/Log.h>
#include <oscar/Utils/Assertions.h>
#include <oscar_simbody/SimTKConverters.h>

#include <filesystem>
#include <fstream>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <OpenSimCreator/Utils/LandmarkPair3D.h>
#include <oscar/Maths/Vec3.h>
#include <oscar/Utils/CStringView.h>
#include <oscar_simbody/LandmarkPair3D.h>

#include <concepts>
#include <optional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <OpenSimCreator/Documents/ModelWarper/ICloneable.h>
#include <OpenSimCreator/Documents/ModelWarper/IValidateable.h>
#include <OpenSimCreator/Documents/ModelWarper/IWarpDetailProvider.h>
#include <OpenSimCreator/Utils/LandmarkPair3D.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>

#include <OpenSim/Common/Component.h>
Expand All @@ -11,7 +12,6 @@
#include <OpenSim/Simulation/Model/Station.h>
#include <oscar/Utils/Algorithms.h>
#include <oscar/Utils/CopyOnUpdPtr.h>
#include <oscar_simbody/LandmarkPair3D.h>

#include <compare>
#include <concepts>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#include <OpenSimCreator/Documents/Landmarks/LandmarkHelpers.h>
#include <OpenSimCreator/Documents/ModelWarper/ValidationCheckState.h>
#include <OpenSimCreator/Documents/ModelWarper/WarpableModel.h>
#include <OpenSimCreator/Utils/TPS3D.h>

#include <oscar/Maths/Vec2.h>
#include <oscar/Platform/Log.h>
#include <oscar/Shims/Cpp23/ranges.h>
#include <oscar/Utils/Algorithms.h>
#include <oscar_simbody/TPS3D.h>

#include <algorithm>
#include <filesystem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include <OpenSimCreator/Documents/ModelWarper/MaybePairedLandmark.h>
#include <OpenSimCreator/Documents/ModelWarper/ValidationCheckResult.h>
#include <OpenSimCreator/Documents/ModelWarper/WarpDetail.h>
#include <OpenSimCreator/Utils/TPS3D.h>

#include <oscar/Maths/Vec3.h>
#include <oscar/Utils/CopyOnUpdPtr.h>
#include <oscar_simbody/TPS3D.h>

#include <cstddef>
#include <filesystem>
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSimCreator/Graphics/OpenSimDecorationGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <OpenSimCreator/Documents/CustomComponents/ICustomDecorationGenerator.h>
#include <OpenSimCreator/Graphics/OpenSimDecorationOptions.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKDecorationGenerator.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <OpenSim/Common/Component.h>
#include <OpenSim/Common/ModelDisplayHints.h>
Expand Down Expand Up @@ -37,8 +39,6 @@
#include <oscar/Platform/Log.h>
#include <oscar/Utils/Algorithms.h>
#include <oscar/Utils/Perf.h>
#include <oscar_simbody/SimTKDecorationGenerator.h>
#include <oscar_simbody/SimTKConverters.h>
#include <SimTKcommon.h>

#include <ankerl/unordered_dense.h>
Expand Down
2 changes: 0 additions & 2 deletions src/OpenSimCreator/Platform/OpenSimCreatorApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <oscar/Utils/Conversion.h>
#include <oscar/Utils/CStringView.h>
#include <oscar_demos/OscarDemosTabRegistry.h>
#include <oscar_simbody/UI/OscarSimbodyTabRegistry.h>

#include <array>
#include <clocale>
Expand Down Expand Up @@ -212,7 +211,6 @@ namespace
{
register_demo_tabs(registry);
RegisterOpenSimCreatorTabs(registry);
RegisterOscarSimbodyTabs(registry);
}

void InitializeOpenSimCreatorSpecificSettingDefaults(AppSettings& settings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <OpenSimCreator/UI/Shared/NavigatorPanel.h>
#include <OpenSimCreator/UI/Shared/PropertiesPanel.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <OpenSim/Common/Component.h>
#include <OpenSim/Common/ComponentPath.h>
Expand Down Expand Up @@ -53,7 +54,6 @@
#include <oscar/Utils/Assertions.h>
#include <oscar/Utils/CStringView.h>
#include <oscar/Utils/UID.h>
#include <oscar_simbody/SimTKConverters.h>

#include <cstddef>
#include <cstdint>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <OpenSimCreator/Documents/Model/UndoableModelStatePair.h>
#include <OpenSimCreator/UI/ModelEditor/ModelEditorTab.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKMeshLoader.h>

#include <OpenSim/Simulation/Model/Model.h>
#include <OpenSim/Simulation/Model/PhysicalFrame.h>
Expand All @@ -12,7 +13,6 @@
#include <oscar/Platform/Log.h>
#include <oscar/Platform/os.h>
#include <oscar/UI/Events/OpenTabEvent.h>
#include <oscar_simbody/SimTKMeshLoader.h>

#include <filesystem>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "MeshHittestTab.h"

#include <OpenSimCreator/Utils/SimTKMeshLoader.h>

#include <oscar/Graphics/Geometries/AABBGeometry.h>
#include <oscar/Graphics/Geometries/SphereGeometry.h>
#include <oscar/Graphics/Materials/MeshBasicMaterial.h>
Expand Down Expand Up @@ -27,7 +29,6 @@
#include <oscar/UI/Panels/PerfPanel.h>
#include <oscar/UI/Tabs/TabPrivate.h>
#include <oscar/Utils/UID.h>
#include <oscar_simbody/SimTKMeshLoader.h>

#include <array>
#include <cinttypes>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <OpenSimCreator/UI/MeshImporter/DrawableThing.h>
#include <OpenSimCreator/UI/MeshImporter/MeshImporterHover.h>
#include <OpenSimCreator/UI/MeshImporter/MeshLoader.h>
#include <OpenSimCreator/Utils/SimTKMeshLoader.h>

#include <OpenSim/Simulation/Model/Model.h>
#include <oscar/Graphics/Color.h>
Expand Down Expand Up @@ -49,7 +50,6 @@
#include <oscar/Utils/EnumHelpers.h>
#include <oscar/Utils/StdVariantHelpers.h>
#include <oscar/Utils/UID.h>
#include <oscar_simbody/SimTKMeshLoader.h>

#include <array>
#include <cstddef>
Expand Down
3 changes: 2 additions & 1 deletion src/OpenSimCreator/UI/MeshImporter/MeshLoader.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "MeshLoader.h"

#include <OpenSimCreator/Utils/SimTKMeshLoader.h>

#include <oscar/Platform/App.h>
#include <oscar/Platform/Log.h>
#include <oscar_simbody/SimTKMeshLoader.h>

#include <exception>
#include <filesystem>
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSimCreator/UI/ModelEditor/ExportPointsPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <OpenSimCreator/Documents/Model/IModelStatePair.h>
#include <OpenSimCreator/Utils/OpenSimHelpers.h>
#include <OpenSimCreator/Utils/SimTKConverters.h>

#include <OpenSim/Common/Component.h>
#include <OpenSim/Common/ComponentPath.h>
Expand All @@ -17,7 +18,6 @@
#include <oscar/Utils/CStringView.h>
#include <oscar/Utils/EnumHelpers.h>
#include <oscar/Utils/StringHelpers.h>
#include <oscar_simbody/SimTKConverters.h>
#include <Simbody.h>

#include <algorithm>
Expand Down
Loading

0 comments on commit 7d65453

Please sign in to comment.