|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.j3d.geom.GeometryGenerator
org.j3d.geom.spline.PatchGenerator
org.j3d.geom.spline.BSplinePatchGenerator
Geometry generator for generating rectangular BSpline patches.
BSpline patches of all orders are permitted. Order information is derived from the provided knot coordinates. When generating a patch, the values for the coordinates are nominally provided in the X and Z plane although no explicit checking is performed to ensure that knot coordinates do not self-intersect or do anything nasty. Normals are always generated as the average between the adjacent edges.
| Field Summary |
| Fields inherited from class org.j3d.geom.spline.PatchGenerator |
controlPointCoordinates, controlPointWeights, depthFacetCount, normalsChanged, numDepthControlPoints, numNormalValues, numPatchValues, numTexcoordValues, numWidthControlPoints, patchChanged, patchCoordinates, patchNormals, patchTexcoords, texCoordsChanged, useControlPointWeights, widthFacetCount |
| Constructor Summary | |
BSplinePatchGenerator()
Construct a new generator with default settings of 20 grid squares over the length of one surface. |
|
BSplinePatchGenerator(int widthFacets,
int depthFacets)
Construct a new generator with the specified number of tessellations over the side of the patch, regardless of extents and default degree of 3 for both width and depth. |
|
BSplinePatchGenerator(int widthFacets,
int depthFacets,
int t)
Construct a new generator with the specified number of tessellations over the side of the patch, regardless of extents and the same degree for both width and depth. |
|
BSplinePatchGenerator(int widthFacets,
int depthFacets,
int tWidth,
int tDepth)
Construct a new generator with the specified number of tessellations over the side of the patch, regardless of extents and specific degree for both width and depth. |
|
| Method Summary | |
void |
generateSmoothKnots()
Convenience method to set knots that give a better looking curve shape using the existing curve degree. |
void |
generateSmoothKnots(int tWidth,
int tDepth)
Convenience method to set knots that give a better looking curve shape and set a new degree for the curve directly. |
int |
getDepthDegree()
Get the degree of the curve being generated. |
int |
getWidthDegree()
Get the degree of the curve being generated. |
protected void |
regeneratePatch()
Regenerate the patch coordinate points according to the NURBS surface function. |
void |
setPatchKnots(int tWidth,
double[] wKnots,
int tDepth,
double[] dKnots)
Set the bezier patch knots. |
void |
setPatchKnots(int tWidth,
float[] wKnots,
int tDepth,
float[] dKnots)
Set the bezier patch knots. |
| Methods inherited from class org.j3d.geom.GeometryGenerator |
createFaceNormal, createFaceNormal, createRadialNormal, createRadialNormal |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BSplinePatchGenerator()
public BSplinePatchGenerator(int widthFacets,
int depthFacets)
widthFacets - The number of facets on the width of the patchdepthFacets - The number of facets on the width of the patch
java.lang.IllegalArgumentException - The number of facets is less than 3
public BSplinePatchGenerator(int widthFacets,
int depthFacets,
int t)
widthFacets - The number of facets on the width of the patchdepthFacets - The number of facets on the width of the patcht - The degree of the curve > 1
java.lang.IllegalArgumentException - The number of facets is less than 3
public BSplinePatchGenerator(int widthFacets,
int depthFacets,
int tWidth,
int tDepth)
widthFacets - The number of facets for the widthdepthFacets - The number of facets for the depthtWidth - The degree of the curve in the width direction > 1tDepth - The degree of the curve in the depth direction > 1
java.lang.IllegalArgumentException - The number of facets is less than 3| Method Detail |
public void setPatchKnots(int tWidth,
float[] wKnots,
int tDepth,
float[] dKnots)
tWidth - The degree in the width directionwKnots - The knot coordinate values in the width directiontDepth - The degree in the depth directiondKnots - The knot coordinate values in the depth direction
public void setPatchKnots(int tWidth,
double[] wKnots,
int tDepth,
double[] dKnots)
tWidth - The degree in the width directionwKnots - The knot coordinate values in the width directiontDepth - The degree in the depth directiondKnots - The knot coordinate values in the depth directionpublic int getWidthDegree()
public int getDepthDegree()
public void generateSmoothKnots(int tWidth,
int tDepth)
tWidth - The degree of the curve in the width directiontDepth - The degree of the curve in the depth directionpublic void generateSmoothKnots()
protected final void regeneratePatch()
regeneratePatch in class PatchGenerator
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||