#include <sphere.h>
Inheritance diagram for gl_sphere< T, S >:
Static Public Member Functions | |
void | convert (ap_array< sphere< T, S > > *spheres, ap_array< gl_sphere< T, S > > *gl_spheres) |
Function to convert an array of spheres to gl_spheres. | |
void | compute_distances (gl_sphere< T, S > *spheres, int n, double eye[3]) |
Function to compute distance values for an array of gl_spheres. | |
Public Attributes | |
double | distance |
Distance squared. |
This class is essentially the same as the sphere class except that each gl_sphere has a distance value. This value is actually a distance squared to avoid spending time computing square roots.
|
Function to convert an array of spheres to gl_spheres.
|
|
Function to compute distance values for an array of gl_spheres. For each gl_sphere in the array, the distance squared from the viewing position to the sphere is computed and stored in the gl_sphere.
|
|
Distance squared.
|