AnyCAD Rapid API 2024
Help you to create a better world!
|
Public 成员函数 | |
SphereF () | |
SphereF (Vector3 center, float radius) | |
SphereF (AABoxF bbox) | |
float | getRadius () |
void | setRadius (float radius) |
Vector3 | getCenter () |
void | setCenter (Vector3 center) |
boolean | intersects (SphereF s) |
boolean | intersects (AABoxF box) |
boolean | intersects (PlaneF plane) |
boolean | intersects (Vector3 v) |
void | merge (SphereF oth) |
void | transform (Matrix4 trf) |
A sphere primitive, mostly used for bounds checking.
Remarks:
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). Ogre stores spheres
simply as a center point and a radius.
SphereF.SphereF | ( | ) |
Standard constructor - creates a unit sphere around the origin.
SphereF.SphereF | ( | Vector3 | center, |
float | radius ) |
Constructor allowing arbitrary spheres.
center | The center point of the sphere. |
radius | The radius of the sphere. |
Vector3 SphereF.getCenter | ( | ) |
Returns the center point of the sphere.
float SphereF.getRadius | ( | ) |
Returns the radius of the sphere.
boolean SphereF.intersects | ( | AABoxF | box | ) |
Returns whether or not this sphere intersects a box.
boolean SphereF.intersects | ( | PlaneF | plane | ) |
Returns whether or not this sphere intersects a plane.
boolean SphereF.intersects | ( | SphereF | s | ) |
Returns whether or not this sphere intersects another sphere.
boolean SphereF.intersects | ( | Vector3 | v | ) |
Returns whether or not this sphere intersects a point.
void SphereF.setCenter | ( | Vector3 | center | ) |
Sets the center point of the sphere.
void SphereF.setRadius | ( | float | radius | ) |
Sets the radius of the sphere.