-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ModelGraph -> OpenSim::Model code into ModelGraphOpenSimBrid…
…ge hpp+cpp files (#802)
- Loading branch information
1 parent
d04a9d5
commit 530330d
Showing
5 changed files
with
853 additions
and
776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
|
||
#include <oscar/Shims/Cpp23/utility.hpp> | ||
|
||
namespace osc | ||
{ | ||
// user-editable flags that affect how the model is created from the model graph | ||
enum class ModelCreationFlags { | ||
None, | ||
ExportStationsAsMarkers, | ||
}; | ||
|
||
constexpr bool operator&(ModelCreationFlags const& lhs, ModelCreationFlags const& rhs) | ||
{ | ||
return (osc::to_underlying(lhs) & osc::to_underlying(rhs)) != 0; | ||
} | ||
|
||
constexpr ModelCreationFlags operator+(ModelCreationFlags const& lhs, ModelCreationFlags const& rhs) | ||
{ | ||
return static_cast<ModelCreationFlags>(osc::to_underlying(lhs) | osc::to_underlying(rhs)); | ||
} | ||
|
||
constexpr ModelCreationFlags operator-(ModelCreationFlags const& lhs, ModelCreationFlags const& rhs) | ||
{ | ||
return static_cast<ModelCreationFlags>(osc::to_underlying(lhs) & ~osc::to_underlying(rhs)); | ||
} | ||
} |
Oops, something went wrong.