com.jme.scene
Class BezierPatch

java.lang.Object
  extended bycom.jme.scene.BezierPatch

public class BezierPatch
extends java.lang.Object

BezierPatch defines a 4x4 mesh of control points. The patch will be enough to generate a single section of a BezierMesh. The detail level of the patch determines the smoothness of the resultant BezierMesh.

Version:
$Id: BezierPatch.java,v 1.5 2004/09/14 21:52:11 mojomonkey Exp $
Author:
Mark Powell

Constructor Summary
BezierPatch()
          Constructor instantiates a new BezierPatch with a default empty control point mesh and a detail level of zero.
BezierPatch(Vector3f[][] anchors)
          Constructor instantiates a new BezierPatch with a given control point grid and a default detail level of zero.
BezierPatch(Vector3f[][] anchors, int detailLevel)
          Constructor instantiates a new BezierPatch with a given control point grid and a given detail level.
 
Method Summary
 Vector3f getAnchor(int i, int j)
          getAnchor returns a single control anchor of a given (i, j) of the patch.
 Vector3f[][] getAnchors()
          getAnchors returns the control anchors that make up this patch.
 int getDetailLevel()
          getDetailLevel retrieves the detail level of this patch.
 void setAnchor(int i, int j, Vector3f anchor)
          setAnchor sets a single anchor of the patch.
 void setAnchors(Vector3f[][] anchors)
          setAnchors sets the control anchors of this patch.
 void setDetailLevel(int detailLevel)
          setDetailLevel sets the detail level of this patch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BezierPatch

public BezierPatch()
Constructor instantiates a new BezierPatch with a default empty control point mesh and a detail level of zero.


BezierPatch

public BezierPatch(Vector3f[][] anchors)
Constructor instantiates a new BezierPatch with a given control point grid and a default detail level of zero.

Parameters:
anchors - the control points that make up the patch.

BezierPatch

public BezierPatch(Vector3f[][] anchors,
                   int detailLevel)
Constructor instantiates a new BezierPatch with a given control point grid and a given detail level.

Parameters:
anchors - the control points that make up the patch.
detailLevel - the detail level of the patch.
Method Detail

setAnchors

public void setAnchors(Vector3f[][] anchors)
setAnchors sets the control anchors of this patch.

Parameters:
anchors - the control anchors of this patch.

getAnchors

public Vector3f[][] getAnchors()
getAnchors returns the control anchors that make up this patch.

Returns:
the control anchors of this patch.

setAnchor

public void setAnchor(int i,
                      int j,
                      Vector3f anchor)
setAnchor sets a single anchor of the patch.

Parameters:
i - the i index (row).
j - the j index (column).
anchor - the control anchor for this point.

getAnchor

public Vector3f getAnchor(int i,
                          int j)
getAnchor returns a single control anchor of a given (i, j) of the patch.

Parameters:
i - the i index (row).
j - the j index (column).
Returns:
the control anchor of the given i,j.

setDetailLevel

public void setDetailLevel(int detailLevel)
setDetailLevel sets the detail level of this patch.

Parameters:
detailLevel - the detail level of this patch.

getDetailLevel

public int getDetailLevel()
getDetailLevel retrieves the detail level of this patch.

Returns:
the detail level of this patch.