AnyCAD Rapid SDK  2020
The Rapid CAD SDK
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Sphere Class Reference

Public Member Functions

synchronized void delete ()
 
 Sphere ()
 
 Sphere (Vector3 center, float radius)
 
float getRadius ()
 
void setRadius (float radius)
 
Vector3 getCenter ()
 
void setCenter (Vector3 center)
 
boolean intersects (Sphere s)
 
boolean intersects (AxisAlignedBox box)
 
boolean intersects (Plane plane)
 
boolean intersects (Vector3 v)
 
void merge (Sphere oth)
 

Protected Member Functions

 Sphere (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 

Static Protected Member Functions

static long getCPtr (Sphere obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

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.

Constructor & Destructor Documentation

Sphere.Sphere ( )

Standard constructor - creates a unit sphere around the origin.

Sphere.Sphere ( Vector3  center,
float  radius 
)

Constructor allowing arbitrary spheres.

Parameters
centerThe center point of the sphere.
radiusThe radius of the sphere.

Member Function Documentation

Vector3 Sphere.getCenter ( )

Returns the center point of the sphere.

float Sphere.getRadius ( )

Returns the radius of the sphere.

boolean Sphere.intersects ( Sphere  s)

Returns whether or not this sphere intersects another sphere.

boolean Sphere.intersects ( AxisAlignedBox  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 ( Vector3  v)

Returns whether or not this sphere intersects a point.

void Sphere.merge ( Sphere  oth)

Merges another Sphere into the current sphere

void Sphere.setCenter ( Vector3  center)

Sets the center point of the sphere.

void Sphere.setRadius ( float  radius)

Sets the radius of the sphere.