Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::SphereBoundingVolume Class Reference

#include <FrustumVolume.h>

Inheritance diagram for Elevate::SphereBoundingVolume:
Elevate::BoundingVolume

Public Member Functions

virtual bool IsOnFrustum (const Frustum &frustum, const Transform &transform) const override
 

Detailed Description

Definition at line 14 of file FrustumVolume.h.

Member Function Documentation

◆ IsOnFrustum()

bool Elevate::SphereBoundingVolume::IsOnFrustum ( const Frustum frustum,
const Transform transform 
) const
overridevirtual

Implements Elevate::BoundingVolume.

Definition at line 6 of file FrustumVolume.cpp.

7{
8 //glm::vec3 center { 0.0f, 0.0f, 0.0f };// TODO SET SOMEHOW WITH TRANSFORM;
9 //float radius = 0.0f; // TODO SET SOMEHOW WITH TRANSFORM;
10
11 //const glm::vec3 globalScale = transform.GetGlobalScale();
13 //const glm::vec3 globalCenter{ transform.GetModelMatrix()* glm::vec4(center, 1.f) };
14
16 //const float maxScale = std::max(std::max(globalScale.x, globalScale.y), globalScale.z);
17
19 //Sphere globalSphere(globalCenter, radius * (maxScale * 0.5f));
20
23 //return (globalSphere.isOnOrForwardPlane(camFrustum.leftFace) &&
24 // globalSphere.isOnOrForwardPlane(camFrustum.rightFace) &&
25 // globalSphere.isOnOrForwardPlane(camFrustum.farFace) &&
26 // globalSphere.isOnOrForwardPlane(camFrustum.nearFace) &&
27 // globalSphere.isOnOrForwardPlane(camFrustum.topFace) &&
28 // globalSphere.isOnOrForwardPlane(camFrustum.bottomFace));
29 return true;
30}

The documentation for this class was generated from the following files: