41 lines
657 B
C++
41 lines
657 B
C++
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#include "xpathbasenode.h"
|
||
|
|
|
||
|
|
XPathBaseNode::XPathBaseNode()
|
||
|
|
: XAsset() {
|
||
|
|
}
|
||
|
|
|
||
|
|
void XPathBaseNode::ParseData(QDataStream *aStream) {
|
||
|
|
if (GetPtr() == -1) {
|
||
|
|
aStream->read((char*)mOrigin, 3 * sizeof(float));
|
||
|
|
aStream->read((char*)&mType, sizeof(unsigned int));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
const float* XPathBaseNode::GetOrigin() const {
|
||
|
|
return mOrigin;
|
||
|
|
}
|
||
|
|
|
||
|
|
void XPathBaseNode::SetOrigin(const float* origin, size_t count) {
|
||
|
|
if (count <= 3) {
|
||
|
|
memcpy(mOrigin, origin, count * sizeof(float));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
unsigned int XPathBaseNode::GetType() const {
|
||
|
|
return mType;
|
||
|
|
}
|
||
|
|
|
||
|
|
void XPathBaseNode::SetType(unsigned int type) {
|
||
|
|
mType = type;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|