|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.geometry.NURBSObject
maspack.geometry.NURBSCurveBase
maspack.geometry.NURBSCurve3d
public class NURBSCurve3d
Implements a NURBS curve
Field Summary |
---|
Fields inherited from class maspack.geometry.NURBSCurveBase |
---|
CLOSED, init, OPEN |
Fields inherited from interface maspack.render.GLRenderable |
---|
TRANSLUCENT, TWO_DIMENSIONAL |
Constructor Summary | |
---|---|
NURBSCurve3d()
Creates an empty NURBS curve. |
|
NURBSCurve3d(int d,
int type,
Vector4d[] ctrlPnts,
double[] knots)
Creates an open or closed NURBS curve with a specified degree, knots, and control points. |
Method Summary | |
---|---|
void |
eval(Point3d pnt,
double u)
Evaluates the point on this curve for parameter u. |
Point3d[] |
evalPoints(int npnts)
Returns a set of points evaluated along the curve at intervals which are evenly spaced with respect to the curve parameter. |
double |
findPoint(Point3d pnt,
double umin,
double umax)
Finds a u value for a given curve point within a specified interval of the curve. |
void |
set(NURBSCurve3d curve)
|
Methods inherited from class maspack.geometry.NURBSCurveBase |
---|
addControlPoint, computeControlPolygonLength, convertToBezier, createRenderProps, createUniformKnots, getDegree, getKnot, getKnotIndex, getKnots, getRange, getResolution, getType, insertKnot, isBezier, isBSpline, isClosed, numKnots, read, read, removeControlPoint, render, reset, set, set, set, setBezier, setCircle, setRange, setResolution, setUniformCubic, write, write |
Methods inherited from class maspack.geometry.NURBSObject |
---|
controlPointIsSelected, getControlPoint, getControlPoints, getDrawControlShape, getLineWidth, getObjToWorld, getObjToWorld, getPointSize, getRenderHints, getRenderProps, getSelection, isSelectable, numControlPoints, numSelectionQueriesNeeded, prerender, render, selectControlPoint, setDrawControlShape, setLineWidth, setObjToWorld, setPointSize, setRenderProps, transform, updateBounds, write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NURBSCurve3d()
public NURBSCurve3d(int d, int type, Vector4d[] ctrlPnts, double[] knots)
set
.
d
- degree of the curvetype
- curve type, which must be either OPEN
or
CLOSED
.ctrlPnts
- control pointsknots
- knot values
java.lang.IllegalArgumentException
- if constraints on the arguments are violatedNURBSCurveBase.set(int,int,Vector4d[],double[])
Method Detail |
---|
public Point3d[] evalPoints(int npnts)
npnts
- number of points to create
public void eval(Point3d pnt, double u)
eval
in class NURBSCurveBase
pnt
- returns the curve point valueu
- curve parameter valuepublic double findPoint(Point3d pnt, double umin, double umax)
This routine uses an iterative golden section search, and so is not particularly fast.
pnt
- point to search forumin
- minimum u valu for the intervalumax
- maximum u valu for the interval
public void set(NURBSCurve3d curve)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |