toxi.geom.mesh
Class BezierPatch
java.lang.Object
toxi.geom.mesh.BezierPatch
public class BezierPatch
- extends java.lang.Object
4x4 bezier patch implementation with tesselation support (dynamic resolution)
for generating triangle mesh representations.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
points
public Vec3D[][] points
BezierPatch
public BezierPatch()
BezierPatch
public BezierPatch(Vec3D[][] points)
computePointAt
public static Vec3D computePointAt(float u,
float v,
Vec3D[][] points)
- Computes a single point on the bezier surface given by the 2d array of
control points. The desired point's coordinates have to be specified in
UV space (range 0.0 .. 1.0). The implementation does not check or enforce
the correct range of these coords and will not return valid points if the
range is exceeded.
- Parameters:
u
- positive normalized U coordinate on the bezier surfacev
- positive normalized V coordinate on the bezier surfacepoints
- 4x4 array defining the patch's control points
- Returns:
- point on surface
computePointAt
public Vec3D computePointAt(float u,
float v)
set
public BezierPatch set(int x,
int y,
Vec3D p)
toMesh
public Mesh3D toMesh(int res)
toMesh
public Mesh3D toMesh(Mesh3D mesh,
int res)