49 lines
886 B
C++
49 lines
886 B
C++
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#include "xgfxreflectionprobe.h"
|
||
|
|
|
||
|
|
XGfxReflectionProbe::XGfxReflectionProbe()
|
||
|
|
: XAsset() {
|
||
|
|
}
|
||
|
|
|
||
|
|
void XGfxReflectionProbe::ParseData(QDataStream *aStream) {
|
||
|
|
if (GetPtr() == -1) {
|
||
|
|
aStream->read((char*)mOrigin, 3 * sizeof(float));
|
||
|
|
aStream->read((char*)&mRadius, sizeof(float));
|
||
|
|
aStream->read((char*)&mFlags, sizeof(int));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
const float* XGfxReflectionProbe::GetOrigin() const {
|
||
|
|
return mOrigin;
|
||
|
|
}
|
||
|
|
|
||
|
|
void XGfxReflectionProbe::SetOrigin(const float* origin, size_t count) {
|
||
|
|
if (count <= 3) {
|
||
|
|
memcpy(mOrigin, origin, count * sizeof(float));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
float XGfxReflectionProbe::GetRadius() const {
|
||
|
|
return mRadius;
|
||
|
|
}
|
||
|
|
|
||
|
|
void XGfxReflectionProbe::SetRadius(float radius) {
|
||
|
|
mRadius = radius;
|
||
|
|
}
|
||
|
|
|
||
|
|
int XGfxReflectionProbe::GetFlags() const {
|
||
|
|
return mFlags;
|
||
|
|
}
|
||
|
|
|
||
|
|
void XGfxReflectionProbe::SetFlags(int flags) {
|
||
|
|
mFlags = flags;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|