toxi.geom.mesh
Class SphereFunction
java.lang.Object
toxi.geom.mesh.SphereFunction
- All Implemented Interfaces:
- SurfaceFunction
public class SphereFunction
- extends java.lang.Object
- implements SurfaceFunction
This implementation of a SurfaceFunction
samples a given
Sphere
instance when called by the SurfaceMeshBuilder
.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sphere
public Sphere sphere
SphereFunction
public SphereFunction()
SphereFunction
public SphereFunction(float radius)
- Creates a new instance using a sphere of the given radius, located at the
world origin.
- Parameters:
radius
-
SphereFunction
public SphereFunction(Sphere s)
- Creates a new instance using the given sphere
- Parameters:
s
- sphere
computeVertexFor
public Vec3D computeVertexFor(Vec3D p,
float phi,
float theta)
- Specified by:
computeVertexFor
in interface SurfaceFunction
getPhiRange
public float getPhiRange()
- Specified by:
getPhiRange
in interface SurfaceFunction
getPhiResolutionLimit
public int getPhiResolutionLimit(int res)
- Specified by:
getPhiResolutionLimit
in interface SurfaceFunction
getThetaRange
public float getThetaRange()
- Specified by:
getThetaRange
in interface SurfaceFunction
getThetaResolutionLimit
public int getThetaResolutionLimit(int res)
- Specified by:
getThetaResolutionLimit
in interface SurfaceFunction
setMaxPhi
public void setMaxPhi(float max)
setMaxTheta
public void setMaxTheta(float max)