Package toxi.geom.mesh
Class BezierPatch
java.lang.Object
toxi.geom.mesh.BezierPatch
4x4 bezier patch implementation with tesselation support (dynamic resolution)
for generating triangle mesh representations.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncomputePointAt
(float u, float v) 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.toMesh
(int res)
-
Field Details
-
points
-
-
Constructor Details
-
BezierPatch
public BezierPatch() -
BezierPatch
-
-
Method Details
-
computePointAt
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
-
set
-
toMesh
-
toMesh
-