Package toxi.geom.nurbs
Class ControlNet
java.lang.Object
toxi.geom.nurbs.ControlNet
A ControlNet for a NurbsSurface
- Version:
- 1.0
- Author:
- sg
-
Constructor Summary
ConstructorDescriptionControlNet
(Vec4D[][] cpnet) Create a ControlNet from the given points the two dimensional array must be a Matrix else an IllegalArgumentException is thrown. -
Method Summary
Modifier and TypeMethodDescriptionvoid
center
(ReadonlyVec3D origin) get
(int u, int v) Get the ControlPoint at the position u,vVec4D[][]
Get all the control pointsvoid
Set the ControlPoint at the position u,vint
uLength()
Get number of ControlPoints in u directionint
vLength()
Get number of ControlPoints in v direction
-
Constructor Details
-
ControlNet
Create a ControlNet from the given points the two dimensional array must be a Matrix else an IllegalArgumentException is thrown.- Parameters:
cpnet
- "Matrix" of ControlPoints- Throws:
IllegalArgumentException
-
-
Method Details
-
center
-
computeCentroid
-
get
Get the ControlPoint at the position u,v- Parameters:
u
- index in u directionv
- index in v direction- Returns:
- The by u and v indexed ControlPoint
-
getControlPoints
Get all the control points- Returns:
- 2D array
-
set
Set the ControlPoint at the position u,v- Parameters:
u
- index in u directionv
- index in v directioncp
- ControlPoint to set at the indexed position
-
uLength
public int uLength()Get number of ControlPoints in u direction- Returns:
- number of ControlPoints in u direction
-
vLength
public int vLength()Get number of ControlPoints in v direction- Returns:
- number of ControlPoints in v direction
-