j3d.org Code

org.j3d.geom.spline
Class BezierPatchGenerator

java.lang.Object
  extended by org.j3d.geom.GeometryGenerator
      extended by org.j3d.geom.spline.PatchGenerator
          extended by org.j3d.geom.spline.BezierPatchGenerator

public class BezierPatchGenerator
extends PatchGenerator

Geometry generator for generating rectangular Bezier patches.

Bezier patches of all orders are permitted. Order information is derived from the provided controlPoint 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 controlPoint coordinates do not self-intersect or do anything nasty. Normals are always generated as the average between the adjacent edges.

Version:
$Revision: 1.8 $
Author:
Justin Couch

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
BezierPatchGenerator()
          Construct a new generator with default settings of 20 grid squares over the length of one surface.
BezierPatchGenerator(int widthFacets, int depthFacets)
          Construct a new generator with the specified number of tessellations over the side of the patch, regardless of extents.
 
Method Summary
protected  void regeneratePatch()
          Regenerate the patch coordinate points according to the bezier surface function.
 
Methods inherited from class org.j3d.geom.spline.PatchGenerator
enableControlPointWeights, generate, getVertexCount, hasControlPointWeights, regenerateNormals, regenerateTexcoords, setFacetCount, setPatchControlPoints, setPatchControlPoints, setPatchControlPoints, setPatchControlPoints, setPatchControlPoints, setPatchControlPoints, setPatchControlPoints, setPatchControlPoints, setPatchWeights, setPatchWeights, setPatchWeights, setPatchWeights
 
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

BezierPatchGenerator

public BezierPatchGenerator()
Construct a new generator with default settings of 20 grid squares over the length of one surface.


BezierPatchGenerator

public BezierPatchGenerator(int widthFacets,
                            int depthFacets)
Construct a new generator with the specified number of tessellations over the side of the patch, regardless of extents.

Parameters:
widthFacets - The number of facets on the width of the patch
depthFacets - The number of facets on the width of the patch
Throws:
java.lang.IllegalArgumentException - The number of facets is less than 3
Method Detail

regeneratePatch

protected void regeneratePatch()
Regenerate the patch coordinate points according to the bezier surface function.

Specified by:
regeneratePatch in class PatchGenerator

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org