public class KBCubicSplineSegment extends Object
Modifier and Type | Method and Description |
---|---|
float |
computeLength(float u)
Computes the length of the curve at a given point between
key frames.
|
float |
getInterpolatedBank(float u)
Computes the interpolated bank along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
|
float |
getInterpolatedHeading(float u)
Computes the interpolated heading along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
|
float |
getInterpolatedPitch(float u)
Computes the interpolated pitch along the curve at a given point
between key frames and returns the interpolated value as a float
This routine uses linear interpolation if the (i+1)th
key frame's linear value is equal to 1.
|
void |
getInterpolatedPosition(float u,
Point3f newPos)
Computes the interpolated position along the curve at a given point
between key frames and returns a Point3f with the interpolated
x, y, and z scale components.
|
void |
getInterpolatedPositionVector(float u,
Vector3f newPos)
Computes the interpolated position along the curve at a given point
between key frames and returns a Vector3f with the interpolated
x, y, and z scale components.
|
void |
getInterpolatedScale(float u,
Point3f newScale)
Computes the interpolated scale along the curve at a given point
between key frames and returns a Point3f with the interpolated
x, y, and z scale components.
|
float |
getInterpolatedValue(float u)
Computes the ratio of the length of the spline from the ith
key frame to the position specified by u to the length of the entire
spline segment from the ith key frame to the (i+1)
th key frame.
|
public float computeLength(float u)
u
- specifies the point between keyframes where 0 <= u <= 1.public void getInterpolatedScale(float u, Point3f newScale)
u
- specifies the point between keyframes where 0 <= u <= 1.newScale
- returns the interpolated x,y,z scale value in a Point3fpublic void getInterpolatedPosition(float u, Point3f newPos)
u
- specifies the point between keyframes where 0 <= u <= 1.newPos
- returns the interpolated x,y,z position in a Point3fpublic void getInterpolatedPositionVector(float u, Vector3f newPos)
u
- specifies the point between keyframes where 0 <= u <= 1.newPos
- returns the interpolated x,y,z position in a Vector3f.public float getInterpolatedHeading(float u)
u
- specifies the point between keyframes where 0 <= u <= 1.public float getInterpolatedPitch(float u)
u
- specifies the point between keyframes where 0 <= u <= 1.public float getInterpolatedBank(float u)
u
- specifies the point between keyframes where 0 <= u <= 1.public float getInterpolatedValue(float u)
u
- specifies the point between keyframes where 0 <= u <= 1.Copyright © 2016–2022 SciJava. All rights reserved.