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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSphereFunction(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) floatintgetPhiResolutionLimit(int res) floatintgetThetaResolutionLimit(int res) voidsetMaxPhi(float max) voidsetMaxTheta(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:
computeVertexForin interfaceSurfaceFunction
-
getPhiRange
public float getPhiRange()- Specified by:
getPhiRangein interfaceSurfaceFunction
-
getPhiResolutionLimit
public int getPhiResolutionLimit(int res) - Specified by:
getPhiResolutionLimitin interfaceSurfaceFunction
-
getThetaRange
public float getThetaRange()- Specified by:
getThetaRangein interfaceSurfaceFunction
-
getThetaResolutionLimit
public int getThetaResolutionLimit(int res) - Specified by:
getThetaResolutionLimitin interfaceSurfaceFunction
-
setMaxPhi
public void setMaxPhi(float max) -
setMaxTheta
public void setMaxTheta(float max)
-