Refactor NiBoundingVolume

This commit is contained in:
Alexei Kotov 2023-09-14 12:39:44 +03:00
parent 5b0bc97db0
commit deb051639e
4 changed files with 52 additions and 52 deletions

View file

@ -14,8 +14,8 @@ namespace Nif
void NiBoundingVolume::read(NIFStream* nif)
{
nif->read(type);
switch (type)
nif->read(mType);
switch (mType)
{
case BASE_BV:
break;
@ -26,9 +26,9 @@ namespace Nif
}
case BOX_BV:
{
nif->read(box.center);
nif->read(box.axes);
nif->read(box.extents);
nif->read(mBox.mCenter);
nif->read(mBox.mAxes);
nif->read(mBox.mExtents);
break;
}
case CAPSULE_BV:
@ -69,7 +69,7 @@ namespace Nif
default:
{
throw Nif::Exception(
"Unhandled NiBoundingVolume type: " + std::to_string(type), nif->getFile().getFilename());
"Unhandled NiBoundingVolume type: " + std::to_string(mType), nif->getFile().getFilename());
}
}
}