Pioneer
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SSphere Struct Reference

#include <Sphere.h>

Collaboration diagram for SSphere:
Collaboration graph
[legend]

Public Member Functions

 SSphere ()
 
 SSphere (const double rad)
 
bool HorizonCulling (const vector3d &view, const SSphere &obj) const
 

Public Attributes

vector3d m_centre
 
double m_radius
 

Constructor & Destructor Documentation

◆ SSphere() [1/2]

SSphere::SSphere ( )
inline

◆ SSphere() [2/2]

SSphere::SSphere ( const double  rad)
inline

Member Function Documentation

◆ HorizonCulling()

bool SSphere::HorizonCulling ( const vector3d view,
const SSphere obj 
) const

Performs horizon culling with an object's bounding sphere, given a view point. This function checks whether the object's sphere is inside the view cone formed by the view point and this sphere. The view cone is capped so that the visibility is false only in the 'shadow' of this sphere.

Parameters
viewPosition of view point in world space
objBounding sphere of another object.
Returns
true if the object's bounding sphere is visible from the viewpoint, false if the sphere is in the shadow cone AND not in front of the capping plane.
Here is the call graph for this function:

Member Data Documentation

◆ m_centre

vector3d SSphere::m_centre

◆ m_radius

double SSphere::m_radius

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