Hymn to Beauty
C++ 3D Engine
Video::Sphere Class Reference

A sphere. More...

#include <Sphere.hpp>

Public Member Functions

 Sphere (const glm::vec3 &origin, float radius)
 Create new sphere. More...
 
bool Intersects (const Frustum &frustum) const
 Check interesection between the sphere and a frustum. More...
 

Public Attributes

glm::vec3 origin
 Origin. More...
 
float radius
 Radius. More...
 

Detailed Description

A sphere.

Used for intersection testing.

Constructor & Destructor Documentation

◆ Sphere()

Sphere::Sphere ( const glm::vec3 &  origin,
float  radius 
)

Create new sphere.

Parameters
originOrigin.
radiusRadius.

Member Function Documentation

◆ Intersects()

bool Sphere::Intersects ( const Frustum frustum) const

Check interesection between the sphere and a frustum.

Parameters
frustumThe frustum to check intersection against.
Returns
Whether the bounding volumes intersect.

Member Data Documentation

◆ origin

glm::vec3 Video::Sphere::origin

Origin.

◆ radius

float Video::Sphere::radius

Radius.


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