Internal class£¬A sphere primitive, mostly used for bounds checking”£ A sphere in math texts is normally represented by the function x^2 + y^2 + z^2 = r^2 (for sphere's centered on the origin). More...
Public Member Functions | |
PUSphere () | |
Standard constructor - creates a unit sphere around the origin. More... | |
PUSphere (const Vec3 ¢er, float radius) | |
Constructor allowing arbitrary spheres. More... | |
PUSphere ( var center, var radius) | |
Constructor allowing arbitrary spheres. More... | |
PUSphere ( local center, local radius) | |
Constructor allowing arbitrary spheres. More... | |
float | getRadius (void) const |
Returns the radius of the sphere. More... | |
void | setRadius (float radius) |
Sets the radius of the sphere. More... | |
const Vec3 & | getCenter (void) const |
Returns the center point of the sphere The center point of the sphere. | |
void | setCenter (const Vec3 ¢er) |
Sets the center point of the sphere. More... | |
bool | intersects (const PUSphere &s) const |
Returns whether or not this sphere intersects another sphere. More... | |
bool | intersects (const Vec3 &v) const |
Returns whether or not this sphere intersects a box. More... | |
void | merge (const PUSphere &oth) |
Merges another Sphere into the current sphere. More... | |
Internal class£¬A sphere primitive, mostly used for bounds checking”£ A sphere in math texts is normally represented by the function x^2 + y^2 + z^2 = r^2 (for sphere's centered on the origin).
this stores spheres simply as a center point and a radius.
PUSphere | ( | ) |
Standard constructor - creates a unit sphere around the origin.
var PUSphere | ( | ) |
Standard constructor - creates a unit sphere around the origin.
local PUSphere | ( | ) |
Standard constructor - creates a unit sphere around the origin.
Constructor allowing arbitrary spheres.
The center point of the sphere. The radius of the sphere.
var PUSphere | ( | var | center, |
var | radius | ||
) |
Constructor allowing arbitrary spheres.
The center point of the sphere. The radius of the sphere.
local PUSphere | ( | local | center, |
local | radius | ||
) |
Constructor allowing arbitrary spheres.
The center point of the sphere. The radius of the sphere.
|
inline |
Returns the radius of the sphere.
The radius of the sphere.
|
inline |
Returns the radius of the sphere.
The radius of the sphere.
|
inline |
Returns the radius of the sphere.
The radius of the sphere.
|
inline |
Sets the radius of the sphere.
The radius of the sphere.
|
inline |
Sets the radius of the sphere.
The radius of the sphere.
|
inline |
Sets the radius of the sphere.
The radius of the sphere.
|
inline |
Sets the center point of the sphere.
The center point of the sphere.
|
inline |
Sets the center point of the sphere.
The center point of the sphere.
|
inline |
Sets the center point of the sphere.
The center point of the sphere.
|
inline |
Returns whether or not this sphere intersects another sphere.
The another sphere.
|
inline |
Returns whether or not this sphere intersects another sphere.
The another sphere.
|
inline |
Returns whether or not this sphere intersects another sphere.
The another sphere.
|
inline |
Returns whether or not this sphere intersects a box.
Returns whether or not this sphere intersects a plane. Returns whether or not this sphere intersects a point. The Point.
|
inline |
Returns whether or not this sphere intersects a box.
Returns whether or not this sphere intersects a plane. Returns whether or not this sphere intersects a point. The Point.
|
inline |
Returns whether or not this sphere intersects a box.
Returns whether or not this sphere intersects a plane. Returns whether or not this sphere intersects a point. The Point.
void merge | ( | const PUSphere & | oth | ) |
Merges another Sphere into the current sphere.
The another sphere.
var merge | ( | var | oth | ) |
Merges another Sphere into the current sphere.
The another sphere.
local merge | ( | local | oth | ) |
Merges another Sphere into the current sphere.
The another sphere.