mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-18 02:45:23 +00:00
Final CCollisionInfoList imps
This commit is contained in:
@@ -11,11 +11,36 @@ class CCollisionInfoList {
|
||||
public:
|
||||
CCollisionInfoList() = default;
|
||||
|
||||
void GetAverageLeftNormal() const;
|
||||
void GetAveragePoint() const;
|
||||
void GetUnionOfAllLeftMaterials() const;
|
||||
zeus::CVector3f GetAverageLeftNormal() const {
|
||||
zeus::CVector3f ret;
|
||||
for (const auto& inf : x0_list) {
|
||||
ret += inf.GetNormalLeft();
|
||||
}
|
||||
|
||||
return ret / x0_list.size();
|
||||
}
|
||||
zeus::CVector3f GetAveragePoint() const {
|
||||
zeus::CVector3f ret;
|
||||
for (const auto& inf : x0_list) {
|
||||
ret += inf.GetPoint();
|
||||
}
|
||||
|
||||
return ret / x0_list.size();
|
||||
}
|
||||
CMaterialList GetUnionOfAllLeftMaterials() const {
|
||||
CMaterialList list;
|
||||
for (const auto& inf : x0_list) {
|
||||
list.Union(inf.GetMaterialLeft());
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
size_t GetCount() const { return x0_list.size(); }
|
||||
void Swap(s32);
|
||||
void Swap(s32 idx) {
|
||||
if (idx >= x0_list.size())
|
||||
return;
|
||||
x0_list[idx].Swap();
|
||||
}
|
||||
|
||||
void Add(const CCollisionInfo& info, bool swap) {
|
||||
if (x0_list.size() == 32)
|
||||
|
||||
Reference in New Issue
Block a user