2025-08-17 13:14:17 -04:00
|
|
|
#include "xcleafbrushnodedata.h"
|
2025-09-05 18:35:17 -04:00
|
|
|
#include "xcleafbrushnodeleaf.h"
|
2025-08-17 13:14:17 -04:00
|
|
|
|
|
|
|
|
XCLeafBrushNodeData::XCLeafBrushNodeData()
|
2025-09-03 13:01:12 -04:00
|
|
|
: XAsset()
|
2025-09-05 18:35:17 -04:00
|
|
|
, mLeaf(new XCLeafBrushNodeLeaf())
|
|
|
|
|
, mChildren(new XCLeafBrushNodeChildren())
|
2025-09-03 13:01:12 -04:00
|
|
|
{
|
2025-09-10 21:57:07 -04:00
|
|
|
SetName("C Leaf Brush Node Data");
|
2025-09-03 13:01:12 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
XCLeafBrushNodeData::~XCLeafBrushNodeData()
|
|
|
|
|
{
|
|
|
|
|
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-10 21:57:07 -04:00
|
|
|
void XCLeafBrushNodeData::ParseData(XDataStream *aStream) {
|
2025-08-17 13:14:17 -04:00
|
|
|
if (GetPtr() == -1) {
|
|
|
|
|
// We need to determine which part of the union to parse
|
|
|
|
|
// For simplicity, we'll assume it's always leaf for now
|
2025-09-05 18:35:17 -04:00
|
|
|
mLeaf->ParseData(aStream);
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-03 13:01:12 -04:00
|
|
|
void XCLeafBrushNodeData::Clear()
|
|
|
|
|
{
|
2025-09-05 18:35:17 -04:00
|
|
|
mLeaf->Clear();
|
|
|
|
|
mChildren->Clear();
|
2025-09-03 13:01:12 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
XCLeafBrushNodeLeaf *XCLeafBrushNodeData::GetLeaf() const {
|
2025-08-17 13:14:17 -04:00
|
|
|
return mLeaf;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
void XCLeafBrushNodeData::SetLeaf(XCLeafBrushNodeLeaf& leaf) {
|
|
|
|
|
mLeaf = &leaf;
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
XCLeafBrushNodeChildren* XCLeafBrushNodeData::GetChildren() const {
|
2025-08-17 13:14:17 -04:00
|
|
|
return mChildren;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
void XCLeafBrushNodeData::SetChildren(XCLeafBrushNodeChildren& children) {
|
|
|
|
|
mChildren = &children;
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|