Refactor SceneRendering to simplify actors impl of drawing flow at high level

This commit is contained in:
Wojciech Figat
2022-02-22 17:06:19 +01:00
parent 8c075c78cb
commit 3fe1e2c763
43 changed files with 191 additions and 617 deletions

View File

@@ -199,7 +199,7 @@ void StaticModel::UpdateBounds()
}
BoundingSphere::FromBox(_box, _sphere);
if (_sceneRenderingKey != -1)
GetSceneRendering()->UpdateGeometry(this, _sceneRenderingKey);
GetSceneRendering()->UpdateActor(this, _sceneRenderingKey);
}
bool StaticModel::HasContentLoaded() const
@@ -267,14 +267,6 @@ void StaticModel::Draw(RenderContext& renderContext)
GEOMETRY_DRAW_STATE_EVENT_END(_drawState, _world);
}
void StaticModel::DrawGeneric(RenderContext& renderContext)
{
if (renderContext.View.RenderLayersMask.Mask & GetLayerMask() && renderContext.View.CullingFrustum.Intersects(_box))
{
Draw(renderContext);
}
}
bool StaticModel::IntersectsItself(const Ray& ray, float& distance, Vector3& normal)
{
bool result = false;