2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-06-26 01:11:09 +00:00
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
2017-06-18 01:58:13 +00:00
|
|
|
#include "CCollisionInfo.hpp"
|
2016-06-26 01:11:09 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CCollisionInfoList
|
|
|
|
{
|
|
|
|
rstl::reserved_vector<CCollisionInfo, 32> x0_list;
|
|
|
|
public:
|
|
|
|
CCollisionInfoList() = default;
|
|
|
|
|
|
|
|
void GetAverageLeftNormal() const;
|
|
|
|
void GetAveragePoint() const;
|
|
|
|
void GetUnionOfAllLeftMaterials() const;
|
2017-09-12 05:51:17 +00:00
|
|
|
size_t GetCount() const { return x0_list.size(); }
|
2016-06-26 01:11:09 +00:00
|
|
|
void Swap(s32);
|
|
|
|
|
2017-06-18 01:58:13 +00:00
|
|
|
void Add(const CCollisionInfo& info, bool swap)
|
|
|
|
{
|
|
|
|
if (x0_list.size() == 32)
|
|
|
|
return;
|
|
|
|
if (!swap)
|
|
|
|
x0_list.push_back(info);
|
|
|
|
else
|
|
|
|
x0_list.push_back(info.GetSwapped());
|
|
|
|
}
|
|
|
|
void Clear() { x0_list.clear(); }
|
2017-06-19 07:00:50 +00:00
|
|
|
const CCollisionInfo& Front() const { return x0_list.front(); }
|
|
|
|
const CCollisionInfo& GetItem(int i) const { return x0_list[i]; }
|
2017-06-18 01:58:13 +00:00
|
|
|
rstl::reserved_vector<CCollisionInfo, 32>::iterator end() { return x0_list.end(); }
|
|
|
|
rstl::reserved_vector<CCollisionInfo, 32>::const_iterator end() const { return x0_list.end(); }
|
|
|
|
rstl::reserved_vector<CCollisionInfo, 32>::iterator begin() { return x0_list.begin(); }
|
|
|
|
rstl::reserved_vector<CCollisionInfo, 32>::const_iterator begin() const { return x0_list.begin(); }
|
2016-06-26 01:11:09 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|