add missing light data to assbin import/export
parent
fd6c534efc
commit
d15b4ad7ef
|
@ -642,6 +642,10 @@ protected:
|
||||||
Write<aiString>(&chunk, l->mName);
|
Write<aiString>(&chunk, l->mName);
|
||||||
Write<unsigned int>(&chunk, l->mType);
|
Write<unsigned int>(&chunk, l->mType);
|
||||||
|
|
||||||
|
Write<aiVector3D>(&chunk, l->mPosition);
|
||||||
|
Write<aiVector3D>(&chunk, l->mDirection);
|
||||||
|
Write<aiVector3D>(&chunk, l->mUp);
|
||||||
|
|
||||||
if (l->mType != aiLightSource_DIRECTIONAL) {
|
if (l->mType != aiLightSource_DIRECTIONAL) {
|
||||||
Write<float>(&chunk, l->mAttenuationConstant);
|
Write<float>(&chunk, l->mAttenuationConstant);
|
||||||
Write<float>(&chunk, l->mAttenuationLinear);
|
Write<float>(&chunk, l->mAttenuationLinear);
|
||||||
|
|
|
@ -556,6 +556,10 @@ void AssbinImporter::ReadBinaryLight(IOStream *stream, aiLight *l) {
|
||||||
l->mName = Read<aiString>(stream);
|
l->mName = Read<aiString>(stream);
|
||||||
l->mType = (aiLightSourceType)Read<unsigned int>(stream);
|
l->mType = (aiLightSourceType)Read<unsigned int>(stream);
|
||||||
|
|
||||||
|
l->mPosition = Read<aiVector3D>(stream);
|
||||||
|
l->mDirection = Read<aiVector3D>(stream);
|
||||||
|
l->mUp = Read<aiVector3D>(stream);
|
||||||
|
|
||||||
if (l->mType != aiLightSource_DIRECTIONAL) {
|
if (l->mType != aiLightSource_DIRECTIONAL) {
|
||||||
l->mAttenuationConstant = Read<float>(stream);
|
l->mAttenuationConstant = Read<float>(stream);
|
||||||
l->mAttenuationLinear = Read<float>(stream);
|
l->mAttenuationLinear = Read<float>(stream);
|
||||||
|
|
Loading…
Reference in New Issue