#include "xcnode.h"

XCNode::XCNode()
    : XAsset()
    , mPlane()
    , mChildren(2)
{
    SetName("C Node");
}

XCNode::~XCNode()
{
}

void XCNode::ParseData(XDataStream *aStream)
{
    if (GetPtr() == -1)
    {
        mPlane.ParsePtr(aStream);

        mChildren[0] = aStream->ParseInt16(QString("%1 child 0").arg(GetName()));
        mChildren[1] = aStream->ParseInt16(QString("%1 child 1").arg(GetName()));

        mPlane.ParseData(aStream);
    }
}

void XCNode::Clear()
{
    mPlane.Clear();
    mChildren.clear();
}
