

#include "xcollisionborder.h"

XCollisionBorder::XCollisionBorder()
    : XAsset() {
}

void XCollisionBorder::ParseData(QDataStream *aStream) {
    if (GetPtr() == -1) {
        aStream->read((char*)mDistEq, 3 * sizeof(float));
        aStream->read((char*)&mZBase, sizeof(float));
        aStream->read((char*)&mZSlope, sizeof(float));
        aStream->read((char*)&mStart, sizeof(float));
        aStream->read((char*)&mLength, sizeof(float));
    }
}

const float* XCollisionBorder::GetDistEq() const {
    return mDistEq;
}

void XCollisionBorder::SetDistEq(const float* distEq, size_t count) {
    if (count <= 3) {
        memcpy(mDistEq, distEq, count * sizeof(float));
    }
}

float XCollisionBorder::GetZBase() const {
    return mZBase;
}

void XCollisionBorder::SetZBase(float zBase) {
    mZBase = zBase;
}

float XCollisionBorder::GetZSlope() const {
    return mZSlope;
}

void XCollisionBorder::SetZSlope(float zSlope) {
    mZSlope = zSlope;
}

float XCollisionBorder::GetStart() const {
    return mStart;
}

void XCollisionBorder::SetStart(float start) {
    mStart = start;
}

float XCollisionBorder::GetLength() const {
    return mLength;
}

void XCollisionBorder::SetLength(float length) {
    mLength = length;
}

