diff options
| author | Léo Lam <leo@leolam.fr> | 2022-01-04 19:24:04 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2022-01-05 23:57:04 +0100 |
| commit | 2359ce6fb42c02d07d3919389c7bb89cb51d40af (patch) | |
| tree | 82a4fe55ccc1be9acf0302c5e194858aa4732a74 /src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp | |
| parent | 3f33ba5d59bdbc6474daddf1971b79f1f12ec523 (diff) | |
ksys/phys: Start adding StaticCompound (very incomplete)
Diffstat (limited to 'src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp')
| -rw-r--r-- | src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp b/src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp new file mode 100644 index 00000000..6fb85437 --- /dev/null +++ b/src/KingSystem/Physics/StaticCompound/physStaticCompound.cpp @@ -0,0 +1,24 @@ +#include "KingSystem/Physics/StaticCompound/physStaticCompound.h" +#include "KingSystem/Physics/StaticCompound/physStaticCompoundFieldBodyGroup.h" + +namespace ksys::phys { + +StaticCompound::StaticCompound() = default; + +StaticCompound::~StaticCompound() { + // FIXME +} + +FieldBodyGroup* StaticCompound::getFieldBodyGroup(int idx) { + return &mFieldBodyGroups[idx]; +} + +bool StaticCompound::hasFieldBodyGroup(FieldBodyGroup* group) const { + for (int i = 0, n = mFieldBodyGroups.size(); i < n; ++i) { + if (&mFieldBodyGroups[i] == group) + return true; + } + return false; +} + +} // namespace ksys::phys |
