2025-08-17 13:14:17 -04:00
|
|
|
#include "xcleafbrushnode.h"
|
|
|
|
|
|
|
|
|
|
XCLeafBrushNode::XCLeafBrushNode()
|
2025-09-03 13:01:12 -04:00
|
|
|
: XAsset()
|
|
|
|
|
, mAxis(0)
|
|
|
|
|
, mLeafBrushCount(0)
|
|
|
|
|
, mContents(0)
|
|
|
|
|
, mData()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
XCLeafBrushNode::~XCLeafBrushNode()
|
|
|
|
|
{
|
|
|
|
|
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCLeafBrushNode::ParseData(QDataStream *aStream) {
|
|
|
|
|
if (GetPtr() == -1) {
|
2025-09-03 13:01:12 -04:00
|
|
|
*aStream
|
|
|
|
|
>> mAxis
|
|
|
|
|
>> mLeafBrushCount
|
|
|
|
|
>> mContents;
|
2025-08-17 13:14:17 -04:00
|
|
|
|
|
|
|
|
// Parse data
|
|
|
|
|
mData.ParseData(aStream);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-03 13:01:12 -04:00
|
|
|
void XCLeafBrushNode::Clear()
|
|
|
|
|
{
|
|
|
|
|
mAxis = 0;
|
|
|
|
|
mLeafBrushCount = 0;
|
|
|
|
|
mContents = 0;
|
|
|
|
|
mData = XCLeafBrushNodeData();
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-17 13:14:17 -04:00
|
|
|
quint8 XCLeafBrushNode::GetAxis() const {
|
|
|
|
|
return mAxis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCLeafBrushNode::SetAxis(quint8 axis) {
|
|
|
|
|
mAxis = axis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
qint16 XCLeafBrushNode::GetLeafBrushCount() const {
|
|
|
|
|
return mLeafBrushCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCLeafBrushNode::SetLeafBrushCount(qint16 count) {
|
|
|
|
|
mLeafBrushCount = count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int XCLeafBrushNode::GetContents() const {
|
|
|
|
|
return mContents;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCLeafBrushNode::SetContents(int contents) {
|
|
|
|
|
mContents = contents;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
XCLeafBrushNodeData& XCLeafBrushNode::GetData() {
|
|
|
|
|
return mData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const XCLeafBrushNodeData& XCLeafBrushNode::GetData() const {
|
|
|
|
|
return mData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XCLeafBrushNode::SetData(const XCLeafBrushNodeData& data) {
|
|
|
|
|
mData = data;
|
|
|
|
|
}
|