Add relative-to-camera rendering for large worlds

This commit is contained in:
Wojtek Figat
2022-06-21 20:03:13 +02:00
parent f3bd0e469c
commit 134c8b99aa
35 changed files with 331 additions and 195 deletions

View File

@@ -134,8 +134,7 @@ float BoundingFrustum::GetHeightAtDepth(float depth) const
ContainmentType BoundingFrustum::Contains(const Vector3& point) const
{
PlaneIntersectionType result = PlaneIntersectionType::Front;
PlaneIntersectionType planeResult = PlaneIntersectionType::Front;
for (int i = 0; i < 6; i++)
for (int32 i = 0; i < 6; i++)
{
const PlaneIntersectionType planeResult = _planes[i].Intersects(point);
switch (planeResult)
@@ -159,7 +158,7 @@ ContainmentType BoundingFrustum::Contains(const Vector3& point) const
ContainmentType BoundingFrustum::Contains(const BoundingSphere& sphere) const
{
auto result = PlaneIntersectionType::Front;
for (int i = 0; i < 6; i++)
for (int32 i = 0; i < 6; i++)
{
const PlaneIntersectionType planeResult = _planes[i].Intersects(sphere);
switch (planeResult)