AnyCAD Rapid API 2023
Help you to create a better world!
载入中...
搜索中...
未找到
Sphere类 参考

Public 成员函数

 Sphere ()
 
 Sphere (Vector3 center, float radius)
 
 Sphere (AABox bbox)
 
float getRadius ()
 
void setRadius (float radius)
 
Vector3 getCenter ()
 
void setCenter (Vector3 center)
 
boolean intersects (Sphere s)
 
boolean intersects (AABox box)
 
boolean intersects (Plane plane)
 
boolean intersects (Vector3 v)
 
void merge (Sphere 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.

构造及析构函数说明

◆ Sphere() [1/2]

Sphere.Sphere ( )

Standard constructor - creates a unit sphere around the origin.

◆ Sphere() [2/2]

Sphere.Sphere ( Vector3  center,
float  radius 
)

Constructor allowing arbitrary spheres.

参数
centerThe center point of the sphere.
radiusThe radius of the sphere.

成员函数说明

◆ getCenter()

Vector3 Sphere.getCenter ( )

Returns the center point of the sphere.

◆ getRadius()

float Sphere.getRadius ( )

Returns the radius of the sphere.

◆ intersects() [1/4]

boolean Sphere.intersects ( AABox  box)

Returns whether or not this sphere intersects a box.

◆ intersects() [2/4]

boolean Sphere.intersects ( Plane  plane)

Returns whether or not this sphere intersects a plane.

◆ intersects() [3/4]

boolean Sphere.intersects ( Sphere  s)

Returns whether or not this sphere intersects another sphere.

◆ intersects() [4/4]

boolean Sphere.intersects ( Vector3  v)

Returns whether or not this sphere intersects a point.

◆ merge()

void Sphere.merge ( Sphere  oth)

Merges another Sphere into the current sphere

◆ setCenter()

void Sphere.setCenter ( Vector3  center)

Sets the center point of the sphere.

◆ setRadius()

void Sphere.setRadius ( float  radius)

Sets the radius of the sphere.