|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.math.BSpline2f
public class BSpline2f
\class BSpline2f \brief Two-dimensional bezier curve. The Bspline offers a precalculated bezier curve with a given amount of segments. Providing an offset value between 0.0 ~ 1.0 the 2 dimensional coordinate is provided.
| Field Summary | |
|---|---|
private float[] |
a
|
private float[] |
b
|
private float[] |
controlPoint1A
|
private float[] |
controlPoint2A
|
private float[] |
controlPoints
|
private int |
offsetControlPoints
|
private int |
offsetPoints
|
private float[] |
points
|
private int |
segments
|
private float[] |
xCoords
|
private float[] |
yCoords
|
| Constructor Summary | |
|---|---|
BSpline2f()
|
|
BSpline2f(BSpline2f bSpline2f)
The copy constructor. |
|
BSpline2f(float[] points,
int offsetPoints,
float[] controlPoints,
int offsetControlPoints,
int segments)
|
|
| Method Summary | |
|---|---|
void |
calculateSpline()
\brief calculates an internal set of coordinates (segments) An internal representation of the Bezier curve. |
float[] |
getControlPoint1A()
\brief returns absolute position of control point 1. |
float |
getControlPoint1X()
|
float |
getControlPoint1Y()
|
float[] |
getControlPoint2A()
\brief returns absolute position of controlpoint2. |
float |
getControlPoint2X()
|
float |
getControlPoint2Y()
|
float[] |
getControlPoints()
|
int |
getOffsetControlPoints()
|
int |
getOffsetPoints()
|
float |
getPoint1X()
|
float |
getPoint1Y()
|
float |
getPoint2X()
|
float |
getPoint2Y()
|
float[] |
getPoints()
|
int |
getSegments()
\brief returns the amount of line segments. |
float[] |
getSplineCoord(float offset)
\brief calculate a point on the BSpline. |
void |
getSplineCoord(float offset,
float[] target2f)
\brief calculate a point on the BSpline. |
float[] |
getXCoords()
\brief returns the array containing the x values from the precalculated Bezier curve (array size == segments). |
float[] |
getYCoords()
\brief returns the array containing the y values from the precalculated Bezier curve (array size == segments). |
void |
setControlPoint1X(float value)
|
void |
setControlPoint1Y(float value)
|
void |
setControlPoint2X(float value)
|
void |
setControlPoint2Y(float value)
|
void |
setControlPoints(float[] controlPoints)
|
void |
setOffsetControlPoints(int offsetControlPoints)
|
void |
setOffsetPoints(int offsetPoints)
|
void |
setPoint1X(float value)
|
void |
setPoint1Y(float value)
|
void |
setPoint2X(float value)
|
void |
setPoint2Y(float value)
|
void |
setPoints(float[] points)
|
void |
setSegments(int segments)
|
void |
updateAbsolute()
\brief updates the absolute positions of the control points. |
void |
updateBSpline()
\brief precalculate bspline algorithm variables. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private float[] points
private int offsetPoints
private float[] controlPoints
private int offsetControlPoints
private final float[] controlPoint1A
private final float[] controlPoint2A
private final float[] a
private final float[] b
private int segments
private float[] xCoords
private float[] yCoords
| Constructor Detail |
|---|
public BSpline2f()
public BSpline2f(float[] points,
int offsetPoints,
float[] controlPoints,
int offsetControlPoints,
int segments)
public BSpline2f(BSpline2f bSpline2f)
| Method Detail |
|---|
public void updateBSpline()
public void calculateSpline()
public float[] getSplineCoord(float offset)
public void getSplineCoord(float offset,
float[] target2f)
public void updateAbsolute()
public float[] getControlPoint1A()
public float[] getControlPoint2A()
public int getSegments()
public float[] getXCoords()
public float[] getYCoords()
public float[] getPoints()
public void setPoints(float[] points)
public int getOffsetPoints()
public void setOffsetPoints(int offsetPoints)
public float[] getControlPoints()
public void setControlPoints(float[] controlPoints)
public int getOffsetControlPoints()
public void setOffsetControlPoints(int offsetControlPoints)
public void setSegments(int segments)
public float getPoint1X()
public float getPoint1Y()
public float getPoint2X()
public float getPoint2Y()
public float getControlPoint1X()
public float getControlPoint1Y()
public float getControlPoint2X()
public float getControlPoint2Y()
public void setPoint1X(float value)
public void setPoint1Y(float value)
public void setPoint2X(float value)
public void setPoint2Y(float value)
public void setControlPoint1X(float value)
public void setControlPoint1Y(float value)
public void setControlPoint2X(float value)
public void setControlPoint2Y(float value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||