medusa.georgios.color_factory
Class CubicBezierSegment3f
- java.lang.Object
-
- medusa.georgios.color_factory.CubicBezierSegment3f
-
public final class CubicBezierSegment3f extends java.lang.ObjectProvides capabilities to compute a cubic bezier segement.
-
-
Constructor Summary
Constructors Constructor and Description CubicBezierSegment3f()The default constructor creates and initialiazes the control nodes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Point3fcomputeHalfwayPoint()This method computes the point of the segment assuming parameter = 0.5fvoidcomputeInterpolation(Tuple3f prePoint, Tuple3f postPoint, float tangentScale)This method computes the internal node on the base of special criteria.Point3fcomputePoint(float t)Computes the point coordinate to the according parametert.Vector3fcomputeTangent(float t)Computes the tangent to the segment at specified paramtert.voidsetFinalTangent(Tuple3f tangent)This method applies a tangent to the last node and thereby modifies a inner control node.voidsetInitialTangent(Tuple3f tangent)This method applies a tangent to the first node and thereby modifies a inner control node.voidsetNode(Tuple3f point, int index)Sets the specified note topoint.
-
-
-
Constructor Detail
-
CubicBezierSegment3f
public CubicBezierSegment3f()
The default constructor creates and initialiazes the control nodes.
-
-
Method Detail
-
setNode
public final void setNode(Tuple3f point, int index)
Sets the specified note topoint.- Parameters:
point- the new point.index- the index identifying which node to replace.
-
setInitialTangent
public final void setInitialTangent(Tuple3f tangent)
This method applies a tangent to the first node and thereby modifies a inner control node.- Parameters:
tangent- the tangent to apply.
-
setFinalTangent
public final void setFinalTangent(Tuple3f tangent)
This method applies a tangent to the last node and thereby modifies a inner control node.- Parameters:
tangent- the tangent to apply.
-
computeInterpolation
public final void computeInterpolation(Tuple3f prePoint, Tuple3f postPoint, float tangentScale)
This method computes the internal node on the base of special criteria.- Parameters:
prePoint- the point that is assumed to be a proper coordinate for extrapolation beyond parameter 0. Can benull.postPoint- the point that is assumed to be a proper coordinate for extrapolation beyond parameter 1.Can benull.tangentScale- factor to control the implicitly computed tangent length.
-
computePoint
public final Point3f computePoint(float t)
Computes the point coordinate to the according parametert.- Parameters:
t- the parameter for the computation.- Returns:
Point3f- the computed point coordinate.
-
computeTangent
public final Vector3f computeTangent(float t)
Computes the tangent to the segment at specified paramtert.- Parameters:
t- the parameter for the computation.- Returns:
Vector3f- the computed tangent.
-
computeHalfwayPoint
public final Point3f computeHalfwayPoint()
This method computes the point of the segment assuming parameter = 0.5f- Returns:
Point3f- computed point.
-
-
DMelt 3.0 © DataMelt by jWork.ORG