Package net.apartium.cocoabeans.space
Class SphereRegion
java.lang.Object
net.apartium.cocoabeans.space.SphereRegion
- All Implemented Interfaces:
Region
Represents a sphere region.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the position is in the regiondoubleReturn the distance between region and position If position is inside the region, return 0 (Note that this is not the same as the distance between the region and the center of the region) (Note this method is more expensive thanRegion.contains(Position)method when you just want to check if the position is inside the region)doublevoidvoidsetRadius(double radius)
-
Constructor Details
-
SphereRegion
-
-
Method Details
-
contains
Description copied from interface:RegionCheck if the position is in the region -
distance
Description copied from interface:RegionReturn the distance between region and position If position is inside the region, return 0 (Note that this is not the same as the distance between the region and the center of the region) (Note this method is more expensive thanRegion.contains(Position)method when you just want to check if the position is inside the region) -
getCenter
-
getRadius
public double getRadius() -
setCenter
-
setRadius
public void setRadius(double radius)
-