Skip to content

Commit

Permalink
Merge branch 'main' into feature_new-modelwarping-config
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Jul 29, 2024
2 parents 44b359e + bd3fd70 commit e0a22f2
Show file tree
Hide file tree
Showing 251 changed files with 8,146 additions and 3,990 deletions.
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on: [push]

env:
OSC_BUILD_DOCS: 1
OSC_BUILD_ID: "GITHUB_${{ github.run_id }}.${{ github.run_number }}"

jobs:
windows2022msvc:
Expand Down
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@
[submodule "third_party/lunasvg"]
path = third_party/lunasvg
url = https://github.com/ComputationalBiomechanicsLab/lunasvg
[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://github.com/ComputationalBiomechanicsLab/benchmark
[submodule "third_party/unordered_dense"]
path = third_party/unordered_dense
url = https://github.com/ComputationalBiomechanicsLab/unordered_dense
[submodule "third_party/lua"]
path = third_party/lua
url = https://github.com/ComputationalBiomechanicsLab/lua
[submodule "third_party/ImGuiColorTextEdit"]
path = third_party/ImGuiColorTextEdit
url = https://github.com/BalazsJako/ImGuiColorTextEdit.git
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Upcoming Release]

- When changing selection in the model editor, the 3D gizmo manipulator will now check
whether the new selection supports the same transformation type (rotate/translate) and
will automatically coerce the transformation type to a supported one if the user's
currently selected mode isn't supported (#705)
- Overlay geometry (e.g. the XY grid overlay, the axis lines overlay) are now correctly
scaled by the `scene scale factor` (#700)
- The mesh warper UI now recalculates the result mesh's normals after applying the warp
to the source mesh. This behavior can be disabled using a checkbox that was added to
the UI (#743)
- The socket reassignment popup now shows the name of the component that the socket is
currently assigned to (#770)
- The model editor toolbar now contains a toggle for toggling a model's `show_forces`
display property (#887). Note: OpenSim only really uses this for `SmoothSphereHalfSpaceForce`
- Fixed non-default scene scale factors not being retained whenever a model file is
hot-reloaded from disk in the model editor (#890)
- The model editor's/simulator's 3D visualizers now have an experimental
`Show > Forces' Linear/Rotational Component` visualization option, which adds arrows indicating
how each `OpenSim::Force` in the model applies its linear/angular force component to each
body in the model. This can be useful for debugging model creation or `ExternalForce`s
- The model editor UI now has experimental support for viewing `OpenSim::Function` curves. This
is currently exposed as an eye icon in the property editor panel (#695)
- Selecting an `OpenSim::Joint` that has `OpenSim::PhysicalOffsetFrame`s for both its parent
and child frames now shows a 3D manipulation gizmo that lets you move the joint center
without moving anything else in the model (#159)
- Manipulating a child offset frame of a `OpenSim::Joint` should now work correctly for both
translation and rotation, allowing you visually place the parent of the child offset frame
(e.g. a body) that's moved by the joint
- The UI now remembers which panels (e.g. Log, Properties) you had open between boots (#17)
- The mesh warping tab now has a `Visualization Options` menu, which lets users toggle a few
basic visualization options (e.g. grid lines, #892)
Expand All @@ -31,6 +58,20 @@ on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Internal: Added runtime-checked pointer classes (`LifetimedPtr`, `LifetimeWatcher`,
`ScopedLifetime`, `SharedLifetimeBlock`, `WatchableLifetime`)
- Internal: Added barebones `TemporaryFile` class (handy for testing IO-related code)
- Internal: `ImGuizmo` was mostly refactored into an internal concern, with OSC using an
easier-to-integrate wrapper class
- Internal: `benchmarks/` were dropped (unused: microbenchmarks are better-suited to
`opensim-core`)
- Internal: Added `SharedPreHashedString` class, as a generalization of the `StringName` class
without the global lookup requirement
- Internal: Integrated `lua` and `ImGuiColorTextEdit`, which will currently only be used to
experiment with scripting in a developer-facing fashion (no user-facing LUA support... yet)
- Internal: a wrapper layer was added around `ImPlot`, so that the UI code can use oscar-like
bindings, rather than translating everything to ImPlot
- Internal: the `OpenSimCreator` test suite now also ensures that all user-facing models in the
documentation can be loaded + rendered by `OpenSimCreator` (#844)
- Internal: Added `osc::Flags` class as a templated helper class for handling for flag-based enum
types, inspired by `QFlags` from Qt


## [0.5.12] - 2024/04/29
Expand Down
63 changes: 4 additions & 59 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
cmake_minimum_required(VERSION 3.15)

project(osc VERSION 0.5.12 LANGUAGES CXX)
project(osc VERSION 0.5.13 LANGUAGES CXX)


# -------------- gather user-facing build cache vars ---------------- #

set(
OSC_REPO_URL "https://github.com/ComputationalBiomechanicsLab/opensim-creator"
CACHE STRING
"the internet location of the software's repo - used by in-app links, installers, etc."
)
set(
OSC_HELP_URL "https://github.com/ComputationalBiomechanicsLab/opensim-creator/discussions"
CACHE STRING
"the internet location of the software's help page - used by in-app links, installers, etc."
)
set(
OSC_ORGNAME "cbl"
CACHE STRING
"the name of the organization that created the application (affects configuration location)"
)
set(
OSC_APPNAME "osc"
CACHE STRING
"the short name for the application (affects configuration location)"
)
set(
OSC_LONG_APPNAME "OpenSim Creator"
CACHE STRING
"a longer, user-friendly name of the application"
)
set(OSC_BUILD_OPENSIMCREATOR ON
CACHE BOOL
"enable/disable building OpenSim Creator (i.e. the OpenSim-dependent part of the codebase)"
Expand All @@ -39,36 +14,22 @@ set(
CACHE BOOL
"enable/disable building the documentation (requires that sphinx-build is available on the PATH)"
)
set(
OSC_BUILD_BENCHMARKS ON
CACHE BOOL
"enable/disable building the benchmark suite (handy for development)"
)
set(
OSC_EMSCRIPTEN OFF
CACHE BOOL
"enable special build parameters for emscripten (emsdk) - don't try this unless you know what you're doing ;)"
)
set(OSC_EXECUTABLE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX}
CACHE STRING
"global suffix to place on the end of each executable (platform-dependent)"
)

# set OSC_BUILD_ID
#
# this is so that errors in the binary can potentially be linked to the source
# that produced the binary later on (user errors, etc.)
if(TRUE)

# compute OSC_DEFAULT_BUILD_ID
if(DEFINED ENV{GITHUB_RUN_ID})
# build is running inside GitHub Action CI - use that ID
set(OSC_DEFAULT_BUILD_ID "GITHUB_$ENV{GITHUB_RUN_ID}.$ENV{GITHUB_RUN_NUMBER}")
if(DEFINED ENV{OSC_BUILD_ID})
set(OSC_DEFAULT_BUILD_ID "$ENV{OSC_BUILD_ID}")
else()
# build is probably running on a dev's machine - generate a random ID
string(RANDOM RANDOM_ID)
set(OSC_DEFAULT_BUILD_ID "CUSTOM_${RANDOM_ID}")
unset(RANDOM_ID)
set(OSC_DEFAULT_BUILD_ID "CUSTOM_BUILD")
endif()

set(
Expand All @@ -80,18 +41,6 @@ if(TRUE)
endif()


# -------------- set/mutate internal vars ---------------- #

# set LINUX
#
# this is based on whether the UNIX variant being used appears to be Linux
if(UNIX AND NOT APPLE)
set(LINUX TRUE)
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_EXECUTABLE_SUFFIX ${OSC_EXECUTABLE_SUFFIX}) # note: cannot be set externally

# -------------- setup top-level project state ---------------- #

# enable testing in this top-level project, so that `ctest` works when
Expand All @@ -114,7 +63,3 @@ add_subdirectory(tests)
if(${OSC_BUILD_DOCS})
add_subdirectory(docs)
endif()

if(${OSC_BUILD_BENCHMARKS})
add_subdirectory(benchmarks)
endif()
20 changes: 10 additions & 10 deletions apps/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# `apps/`: OpenSim Creator's Executable Applications

This directory contains the code behind the top-level application executables
that users run. Generally speaking, this code is a thin layer around the
`OpenSimCreator` and `oscar` library targets.

| Directory | Description | Depends on |
| - | - | - |
| `osc/` | Handles the main OpenSim Creator UI binary that users typically boot into | `oscar`, `OpenSimCreator` |
| `hellotriangle/` | A bare-minimum usage of `oscar`'s `App` and graphics stack, used by developers for testing minimum platform compliance | `oscar` |
# `apps/`: OpenSim Creator's Executable Applications

This directory contains the code behind the top-level application executables
that users run. Generally speaking, this code is a thin layer around the
`OpenSimCreator` and `oscar` library targets.

| Directory | Description | Depends on |
| - | - | - |
| `osc/` | Handles the main user-facing OpenSim Creator UI binary (`osc.exe`) | `oscar`, `OpenSimCreator` |
| `hellotriangle/` | Implements a minimal usage of `oscar`'s `App` and graphics stack, used to test platform compatiblity | `oscar` |
7 changes: 7 additions & 0 deletions apps/hellotriangle/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
add_executable(hellotriangle hellotriangle.cpp)

find_package(lua CONFIG REQUIRED)

target_link_libraries(hellotriangle PUBLIC
oscar_compiler_configuration # so that it uses standard compiler flags etc.
oscar
lua
)

set_target_properties(hellotriangle PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)

# -------------- installation/packaging ------------- #
if(${OSC_EMSCRIPTEN})
include(${CMAKE_CURRENT_SOURCE_DIR}/Emscripten/Packaging.cmake)
endif()

# for development on Windows, copy all runtime dlls to the exe directory
# (because Windows doesn't have an RPATH)
Expand Down
9 changes: 9 additions & 0 deletions apps/hellotriangle/Emscripten/Packaging.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Emscripten packaging

# for now, just ensure that the html loader is next to the built js+wasm
add_custom_command(
TARGET hellotriangle
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/Emscripten/hellotriangle.html $<TARGET_FILE_DIR:hellotriangle>
COMMAND_EXPAND_LISTS
)
Loading

0 comments on commit e0a22f2

Please sign in to comment.