AnyCAD Rapid API 2024
Help you to create a better world!
|
Public 成员函数 | |
Sphere () | |
Sphere (Vector3d center, double radius) | |
Sphere (AABox bbox) | |
double | getRadius () |
void | setRadius (double radius) |
Vector3d | getCenter () |
void | setCenter (Vector3d center) |
boolean | intersects (Sphere s) |
boolean | intersects (AABox box) |
boolean | intersects (Plane plane) |
boolean | intersects (Vector3d v) |
void | merge (Sphere oth) |
void | transform (Matrix4d 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.
Sphere.Sphere | ( | ) |
Standard constructor - creates a unit sphere around the origin.
Sphere.Sphere | ( | Vector3d | center, |
double | radius ) |
Constructor allowing arbitrary spheres.
center | The center point of the sphere. |
radius | The radius of the sphere. |
Vector3d Sphere.getCenter | ( | ) |
Returns the center point of the sphere.
double Sphere.getRadius | ( | ) |
Returns the radius of the sphere.
boolean Sphere.intersects | ( | AABox | box | ) |
Returns whether or not this sphere intersects a box.
boolean Sphere.intersects | ( | Plane | plane | ) |
Returns whether or not this sphere intersects a plane.
boolean Sphere.intersects | ( | Sphere | s | ) |
Returns whether or not this sphere intersects another sphere.
boolean Sphere.intersects | ( | Vector3d | v | ) |
Returns whether or not this sphere intersects a point.
void Sphere.setCenter | ( | Vector3d | center | ) |
Sets the center point of the sphere.
void Sphere.setRadius | ( | double | radius | ) |
Sets the radius of the sphere.