com.jme3.math
クラス CurveAndSurfaceMath

java.lang.Object
  上位を拡張 com.jme3.math.CurveAndSurfaceMath

public class CurveAndSurfaceMath
extends java.lang.Object

This class offers methods to help with curves and surfaces calculations.


メソッドの概要
static void interpolate(float u, float v, java.util.List<java.util.List<Vector4f>> controlPoints, java.util.List<java.lang.Float>[] knots, int basisUFunctionDegree, int basisVFunctionDegree, Vector3f store)
          This method interpolates tha data for the nurbs surface.
static void interpolateNurbs(float u, Spline nurbSpline, Vector3f store)
          This method interpolates tha data for the nurbs curve.
static void prepareNurbsKnots(java.util.List<java.lang.Float> knots, int basisFunctionDegree)
          This method prepares the knots to be used.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

interpolateNurbs

public static void interpolateNurbs(float u,
                                    Spline nurbSpline,
                                    Vector3f store)
This method interpolates tha data for the nurbs curve.

パラメータ:
u - the u value
nurbSpline - the nurbs spline definition
store - the resulting point in 3D space

interpolate

public static void interpolate(float u,
                               float v,
                               java.util.List<java.util.List<Vector4f>> controlPoints,
                               java.util.List<java.lang.Float>[] knots,
                               int basisUFunctionDegree,
                               int basisVFunctionDegree,
                               Vector3f store)
This method interpolates tha data for the nurbs surface.

パラメータ:
u - the u value
v - the v value
controlPoints - the nurbs' control points
knots - the nurbs' knots
basisUFunctionDegree - the degree of basis U function
basisVFunctionDegree - the degree of basis V function
store - the resulting point in 3D space

prepareNurbsKnots

public static void prepareNurbsKnots(java.util.List<java.lang.Float> knots,
                                     int basisFunctionDegree)
This method prepares the knots to be used. If the knots represent non-uniform B-splines (first and last knot values are being repeated) it leads to NaN results during calculations. This method adds a small number to each of such knots to avoid NaN's.

パラメータ:
knots - the knots to be prepared to use
basisFunctionDegree - the degree of basis function