Package toxi.geom.mesh
Class SphereFunction
java.lang.Object
toxi.geom.mesh.SphereFunction
- All Implemented Interfaces:
SurfaceFunction
This implementation of a
SurfaceFunction
samples a given
Sphere
instance when called by the SurfaceMeshBuilder
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionSphereFunction
(float radius) Creates a new instance using a sphere of the given radius, located at the world origin.Creates a new instance using the given sphere -
Method Summary
Modifier and TypeMethodDescriptioncomputeVertexFor
(Vec3D p, float phi, float theta) float
int
getPhiResolutionLimit
(int res) float
int
getThetaResolutionLimit
(int res) void
setMaxPhi
(float max) void
setMaxTheta
(float max)
-
Field Details
-
sphere
-
-
Constructor Details
-
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
Creates a new instance using the given sphere- Parameters:
s
- sphere
-
-
Method Details
-
computeVertexFor
- Specified by:
computeVertexFor
in interfaceSurfaceFunction
-
getPhiRange
public float getPhiRange()- Specified by:
getPhiRange
in interfaceSurfaceFunction
-
getPhiResolutionLimit
public int getPhiResolutionLimit(int res) - Specified by:
getPhiResolutionLimit
in interfaceSurfaceFunction
-
getThetaRange
public float getThetaRange()- Specified by:
getThetaRange
in interfaceSurfaceFunction
-
getThetaResolutionLimit
public int getThetaResolutionLimit(int res) - Specified by:
getThetaResolutionLimit
in interfaceSurfaceFunction
-
setMaxPhi
public void setMaxPhi(float max) -
setMaxTheta
public void setMaxTheta(float max)
-