mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #233 from lioncash/pos
CPoseAsTransforms: Make use of std::array where applicable
This commit is contained in:
commit
7039232a95
|
@ -12,8 +12,7 @@ bool CPoseAsTransforms::ContainsDataFor(const CSegId& id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPoseAsTransforms::Clear() {
|
void CPoseAsTransforms::Clear() {
|
||||||
for (u32 i = 0; i < 100; ++i)
|
x8_links.fill({});
|
||||||
x8_links[i] = std::make_pair(CSegId(), CSegId());
|
|
||||||
xd4_lastInserted = 0;
|
xd4_lastInserted = 0;
|
||||||
x0_nextId = 0;
|
x0_nextId = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
@ -24,12 +25,12 @@ public:
|
||||||
private:
|
private:
|
||||||
CSegId x0_nextId = 0;
|
CSegId x0_nextId = 0;
|
||||||
CSegId x1_count;
|
CSegId x1_count;
|
||||||
std::pair<CSegId, CSegId> x8_links[100];
|
std::array<std::pair<CSegId, CSegId>, 100> x8_links;
|
||||||
std::unique_ptr<Transform[]> xd0_transformArr;
|
std::unique_ptr<Transform[]> xd0_transformArr;
|
||||||
CSegId xd4_lastInserted = 0;
|
CSegId xd4_lastInserted = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CPoseAsTransforms(u8 boneCount);
|
explicit CPoseAsTransforms(u8 boneCount);
|
||||||
bool ContainsDataFor(const CSegId& id) const;
|
bool ContainsDataFor(const CSegId& id) const;
|
||||||
void Clear();
|
void Clear();
|
||||||
void AccumulateScaledTransform(const CSegId& id, zeus::CMatrix3f& rotation, float scale) const;
|
void AccumulateScaledTransform(const CSegId& id, zeus::CMatrix3f& rotation, float scale) const;
|
||||||
|
|
Loading…
Reference in New Issue