| Package | org.flintparticles.threeD.zones |
| Class | public class SphereZone |
| Inheritance | SphereZone Object |
| Implements | Zone3D |
| Property | Defined By | ||
|---|---|---|---|
| center : Vector3D
The point at the center of the sphere. | SphereZone | ||
| innerRadius : Number
The radius of the hollow center of the sphere. | SphereZone | ||
| outerRadius : Number
The outer radius of the sphere. | SphereZone | ||
| Method | Defined By | ||
|---|---|---|---|
SphereZone(center:Vector3D = null, outerRadius:Number = 0, innerRadius:Number = 0)
The constructor creates a SphereZone 3D zone. | SphereZone | ||
contains(p:Vector3D):Boolean
The contains method determines whether a point is inside the sphere. | SphereZone | ||
getLocation():Vector3D
The getLocation method returns a random point inside the sphere. | SphereZone | ||
getVolume():Number
The getVolume method returns the volume of the sphere. | SphereZone | ||
| center | property |
center:Vector3DThe point at the center of the sphere.
public function get center():Vector3D public function set center(value:Vector3D):void| innerRadius | property |
innerRadius:NumberThe radius of the hollow center of the sphere.
public function get innerRadius():Number public function set innerRadius(value:Number):void| outerRadius | property |
outerRadius:NumberThe outer radius of the sphere.
public function get outerRadius():Number public function set outerRadius(value:Number):void| SphereZone | () | Constructor |
public function SphereZone(center:Vector3D = null, outerRadius:Number = 0, innerRadius:Number = 0)The constructor creates a SphereZone 3D zone.
Parameterscenter:Vector3D (default = null) — The point at the center of the sphere.
| |
outerRadius:Number (default = 0) — The outer radius of the sphere.
| |
innerRadius:Number (default = 0) — The inner radius of the sphere. This defines the hollow
center of the sphere. If set to zero, the sphere is solid throughout.
|
| contains | () | method |
public function contains(p:Vector3D):BooleanThe contains method determines whether a point is inside the sphere. This method is used by the initializers and actions that use the zone. Usually, it need not be called directly by the user.
Parameters
p:Vector3D — The location to test.
|
Boolean — true if the location is inside the zone, false if it is outside.
|
| getLocation | () | method |
public function getLocation():Vector3DThe getLocation method returns a random point inside the sphere. This method is used by the initializers and actions that use the zone. Usually, it need not be called directly by the user.
ReturnsVector3D — A random point inside the zone.
|
| getVolume | () | method |
public function getVolume():NumberThe getVolume method returns the volume of the sphere. This method is used by the MultiZone class. Usually, it need not be called directly by the user.
ReturnsNumber — the volume of the sphere.
|