2025-08-17 13:14:17 -04:00
|
|
|
#ifndef XCOLLISIONAABBTREE_H
|
|
|
|
|
#define XCOLLISIONAABBTREE_H
|
|
|
|
|
|
|
|
|
|
#include "xasset.h"
|
|
|
|
|
#include "xcollisionaabbtreeindex.h"
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
#include <QVector3D>
|
|
|
|
|
|
2025-08-17 13:14:17 -04:00
|
|
|
class XCollisionAabbTree : public XAsset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
explicit XCollisionAabbTree();
|
2025-09-05 18:35:17 -04:00
|
|
|
~XCollisionAabbTree();
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-10 21:58:26 -04:00
|
|
|
void ParseData(XDataStream *aStream) override;
|
|
|
|
|
void Clear() override;
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
QVector3D GetOrigin() const;
|
|
|
|
|
void SetOrigin(QVector3D aOrigin);
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
QVector3D GetHalfSize() const;
|
|
|
|
|
void SetHalfSize(QVector3D aHalfSize);
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-07 12:36:08 -04:00
|
|
|
quint32 GetMaterialIndex() const;
|
|
|
|
|
void SetMaterialIndex(quint32 aIndex);
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-07 12:36:08 -04:00
|
|
|
quint32 GetChildCount() const;
|
|
|
|
|
void SetChildCount(quint32 aCount);
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
XCollisionAabbTreeIndex& GetTreeIndex();
|
|
|
|
|
void SetTreeIndex(const XCollisionAabbTreeIndex& aTreeIndex);
|
2025-08-17 13:14:17 -04:00
|
|
|
|
|
|
|
|
private:
|
2025-09-05 18:35:17 -04:00
|
|
|
QVector3D mOrigin;
|
|
|
|
|
QVector3D mHalfSize;
|
2025-09-10 21:58:26 -04:00
|
|
|
quint32 mMaterialIndex;
|
|
|
|
|
quint32 mChildCount;
|
2025-09-05 18:35:17 -04:00
|
|
|
XCollisionAabbTreeIndex mTreeIndex;
|
2025-08-17 13:14:17 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // XCOLLISIONAABBTREE_H
|