41 lines
787 B
C++
41 lines
787 B
C++
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#include "xcollisionaabbtreeindex.h"
|
||
|
|
|
||
|
|
XCollisionAabbTreeIndex::XCollisionAabbTreeIndex()
|
||
|
|
: XAsset() {
|
||
|
|
}
|
||
|
|
|
||
|
|
void XCollisionAabbTreeIndex::ParseData(QDataStream *aStream) {
|
||
|
|
if (GetPtr() == -1) {
|
||
|
|
// We need to determine which part of the union to parse
|
||
|
|
// For simplicity, we'll assume it's always firstChildIndex for now
|
||
|
|
aStream->read((char*)&mFirstChildIndex, sizeof(int));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|