46 lines
695 B
C++
46 lines
695 B
C++
|
|
|
|
|
|
|
|
|
|
|
|
#include "xcnode.h"
|
|
|
|
XCNode_t::XCNode_t()
|
|
: XAsset() {
|
|
}
|
|
|
|
void XCNode_t::ParseData(QDataStream *aStream) {
|
|
if (GetPtr() == -1) {
|
|
// We would parse plane here, but we're using a placeholder
|
|
|
|
// Parse children
|
|
aStream->read((char*)mChildren, 2 * sizeof(qint16));
|
|
}
|
|
}
|
|
|
|
void* XCNode_t::GetPlane() const {
|
|
return mPlane;
|
|
}
|
|
|
|
void XCNode_t::SetPlane(void* plane) {
|
|
mPlane = plane;
|
|
}
|
|
|
|
qint16 XCNode_t::GetChild(int index) const {
|
|
if (index >= 0 && index < 2) {
|
|
return mChildren[index];
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
void XCNode_t::SetChild(int index, qint16 child) {
|
|
if (index >= 0 && index < 2) {
|
|
mChildren[index] = child;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|