public class BSpline extends AbstractCurve
Modifier and Type | Field and Description |
---|---|
static float |
BSPLINECOLLECTION |
static float |
SPLINE1DTO3D |
static float |
SPLINE2DTO3D |
static float |
SPLINE3DTO3D |
Constructor and Description |
---|
BSpline(java.util.ArrayList<PointND> controlPoints,
double... uVector) |
BSpline(java.util.ArrayList<PointND> controlPoints,
int degree,
double... uVector) |
BSpline(java.util.ArrayList<PointND> controlPoints,
SimpleVector knotVector)
Constructor for a BSpline using ArbitraryPoints and a weight vector as SimpleVector
|
Modifier and Type | Method and Description |
---|---|
void |
applyTransform(Transform t)
Applies the Transform t to the object.
|
void |
computeBounds()
Computes the bounding box for the curve.
|
double |
distance(double[] planeCoefficients,
double u) |
double |
distance(double[] planeCoefficients,
int i) |
double |
distanceFast(double[] plane,
double u) |
double[] |
evalFast(double t) |
PointND |
evaluate(double u)
Returns a point on the Curve at position u [0, 1];
|
float[] |
getBinaryRepresentation()
Rewrites the BSpline into a float representation:
|
PointND |
getControlPoint(int i)
Returns the i-th control point
|
java.util.ArrayList<PointND> |
getControlPoints() |
int |
getDegree()
Returns the degree of the spline.
|
int |
getDimension()
Returns the external dimension of the shape.
|
static float |
getID(java.lang.String title) |
double[] |
getKnots() |
double |
getKnotVectorEntry(int i)
Returns the i-th knot vector entry.
|
PointND[] |
getRasterPoints(int number)
Rasters the shape with a given number of points or less.
|
double |
getWeight(double u,
int i)
Computes N iteratively.
|
java.util.ArrayList<PointND> |
intersect(AbstractCurve other)
Returns the intersection points between the curve and the shape.
|
boolean |
isBounded()
Returns true if the shape is of limited space
|
void |
setControlPoints(java.util.ArrayList<PointND> controlPoints) |
void |
setKnots(double[] knots) |
evaluate, getInternalDimension
getHitsOnBoundingBox_slow, getHitsOnBoundingBox, getMax, getMin, getName, setName
public static final float BSPLINECOLLECTION
public static final float SPLINE1DTO3D
public static final float SPLINE2DTO3D
public static final float SPLINE3DTO3D
public BSpline(java.util.ArrayList<PointND> controlPoints, double... uVector)
public BSpline(java.util.ArrayList<PointND> controlPoints, int degree, double... uVector)
public BSpline(java.util.ArrayList<PointND> controlPoints, SimpleVector knotVector)
controlPoints
- the control pointsknotVector
- the weight vectorpublic double[] evalFast(double t)
public PointND evaluate(double u)
AbstractCurve
evaluate
in class AbstractCurve
u
- the internal one dimensional positionpublic int getDimension()
AbstractShape
getDimension
in class AbstractShape
public double getWeight(double u, int i)
u
- the point on the curvei
- the control pointpublic void computeBounds()
public PointND getControlPoint(int i)
i
- the indexpublic double getKnotVectorEntry(int i)
i
- public int getDegree()
public java.util.ArrayList<PointND> intersect(AbstractCurve other)
AbstractShape
intersect
in class AbstractShape
public boolean isBounded()
AbstractShape
isBounded
in class AbstractShape
public double distance(double[] planeCoefficients, double u)
public double distance(double[] planeCoefficients, int i)
public double distanceFast(double[] plane, double u)
public void applyTransform(Transform t)
Transformable
applyTransform
in interface Transformable
applyTransform
in class AbstractShape
t
- the transform to apply to the object.public PointND[] getRasterPoints(int number)
AbstractShape
getRasterPoints
in class AbstractShape
number
- the number of pointspublic static float getID(java.lang.String title)
public float[] getBinaryRepresentation()
type total size degree # of entries in knot vector # of control points knovector entries (1 float value) control points (3 float values: x,y,z)
public void setKnots(double[] knots)
public double[] getKnots()
public void setControlPoints(java.util.ArrayList<PointND> controlPoints)
controlPoints
- the controlPoints to setpublic java.util.ArrayList<PointND> getControlPoints()