85 lines
1.6 KiB
C++
85 lines
1.6 KiB
C++
|
|
|
|
|
|
|
|
|
|
|
|
#include "xgfxstreamingaabbtree.h"
|
|
|
|
XGfxStreamingAabbTree::XGfxStreamingAabbTree()
|
|
: XAsset() {
|
|
}
|
|
|
|
void XGfxStreamingAabbTree::ParseData(QDataStream *aStream) {
|
|
if (GetPtr() == -1) {
|
|
*aStream
|
|
>> mFirstItem
|
|
>> mItemCount
|
|
>> mFirstChild
|
|
>> mChildCount
|
|
>> mMins[0]
|
|
>> mMins[1]
|
|
>> mMins[2]
|
|
>> mMaxs[0]
|
|
>> mMaxs[1]
|
|
>> mMaxs[2];
|
|
}
|
|
}
|
|
|
|
unsigned short XGfxStreamingAabbTree::GetFirstItem() const {
|
|
return mFirstItem;
|
|
}
|
|
|
|
void XGfxStreamingAabbTree::SetFirstItem(unsigned short item) {
|
|
mFirstItem = item;
|
|
}
|
|
|
|
unsigned short XGfxStreamingAabbTree::GetItemCount() const {
|
|
return mItemCount;
|
|
}
|
|
|
|
void XGfxStreamingAabbTree::SetItemCount(unsigned short count) {
|
|
mItemCount = count;
|
|
}
|
|
|
|
unsigned short XGfxStreamingAabbTree::GetFirstChild() const {
|
|
return mFirstChild;
|
|
}
|
|
|
|
void XGfxStreamingAabbTree::SetFirstChild(unsigned short child) {
|
|
mFirstChild = child;
|
|
}
|
|
|
|
unsigned short XGfxStreamingAabbTree::GetChildCount() const {
|
|
return mChildCount;
|
|
}
|
|
|
|
void XGfxStreamingAabbTree::SetChildCount(unsigned short count) {
|
|
mChildCount = count;
|
|
}
|
|
|
|
const float* XGfxStreamingAabbTree::GetMins() const {
|
|
return mMins;
|
|
}
|
|
|
|
void XGfxStreamingAabbTree::SetMins(const float* mins, size_t count) {
|
|
if (count <= 3) {
|
|
memcpy(mMins, mins, count * sizeof(float));
|
|
}
|
|
}
|
|
|
|
const float* XGfxStreamingAabbTree::GetMaxs() const {
|
|
return mMaxs;
|
|
}
|
|
|
|
void XGfxStreamingAabbTree::SetMaxs(const float* maxs, size_t count) {
|
|
if (count <= 3) {
|
|
memcpy(mMaxs, maxs, count * sizeof(float));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|