Reorg of the probe initialization/update code to streamline parts of it, and make it flow more obviously

Added some initial asset stuffs for Das Boot for building out a better testing level.
This commit is contained in:
Areloch 2019-06-04 00:21:52 -05:00
parent 17cec11b97
commit a552471e4e
33 changed files with 317 additions and 1821 deletions

View file

@ -123,18 +123,6 @@ void Skylight::onRemove()
Parent::onRemove();
}
void Skylight::setTransform(const MatrixF & mat)
{
// Let SceneObject handle all of the matrix manipulation
Parent::setTransform(mat);
mDirty = true;
// Dirty our network mask so that the new transform gets
// transmitted to the client object
setMaskBits(TransformMask);
}
U32 Skylight::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
{
// Allow the Parent to get a crack at writing its info
@ -155,34 +143,8 @@ void Skylight::unpackUpdate(NetConnection *conn, BitStream *stream)
void Skylight::updateProbeParams()
{
mProbeShapeType = ProbeRenderInst::Skylight;
Parent::updateProbeParams();
mProbeInfo->mProbeShapeType = ProbeRenderInst::Skylight;
mProbeInfo->setPosition(getPosition());
// Skip our transform... it just dirties mask bits.
Parent::setTransform(mObjToWorld);
resetWorldBox();
F32 visDist = gClientSceneGraph->getVisibleDistance();
Box3F skylightBounds = Box3F(visDist * 2);
skylightBounds.setCenter(Point3F::Zero);
mProbeInfo->setPosition(Point3F::Zero);
mProbeInfo->mBounds = skylightBounds;
setGlobalBounds();
mProbeInfo->mIsSkylight = true;
mProbeInfo->mScore = -1.0f; //sky comes first
PROBEMGR->updateProbes();
updateCubemaps();
}
void Skylight::prepRenderImage(SceneRenderState *state)
@ -273,4 +235,4 @@ DefineEngineMethod(Skylight, postApply, void, (), ,
"A utility method for forcing a network update.\n")
{
object->inspectPostApply();
}
}