2025-09-05 18:35:17 -04:00
|
|
|
#include "xcollisionaabbtreeindex.h"
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
XCollisionAabbTreeIndex::XCollisionAabbTreeIndex()
|
|
|
|
|
: XAsset()
|
|
|
|
|
, mFirstChildIndex(0)
|
|
|
|
|
, mPartitionIndex(0)
|
|
|
|
|
{
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
}
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
XCollisionAabbTreeIndex::~XCollisionAabbTreeIndex()
|
|
|
|
|
{
|
2025-08-17 13:14:17 -04:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCollisionAabbTreeIndex::ParseData(QDataStream *aStream) {
|
|
|
|
|
if (GetPtr() == -1) {
|
2025-09-07 23:15:47 -04:00
|
|
|
*aStream
|
|
|
|
|
>> mFirstChildIndex
|
|
|
|
|
>> mPartitionIndex;
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int XCollisionAabbTreeIndex::GetFirstChildIndex() const {
|
|
|
|
|
return mFirstChildIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCollisionAabbTreeIndex::SetFirstChildIndex(int index) {
|
|
|
|
|
mFirstChildIndex = index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int XCollisionAabbTreeIndex::GetPartitionIndex() const {
|
|
|
|
|
return mPartitionIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCollisionAabbTreeIndex::SetPartitionIndex(int index) {
|
|
|
|
|
mPartitionIndex = index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|