public class Curve extends Shape
boundingCircleRadius, center, maxX, maxY, minX, minY, points, pointsDirty, trianglesDirty, tris, x, y
Constructor and Description |
---|
Curve(Vector2f p1,
Vector2f c1,
Vector2f c2,
Vector2f p2)
Create a new curve with the default segments (20)
|
Curve(Vector2f p1,
Vector2f c1,
Vector2f c2,
Vector2f p2,
int segments)
Create a new curve
|
Modifier and Type | Method and Description |
---|---|
boolean |
closed()
True if this is a closed shape
|
protected void |
createPoints()
Subclasses implement this to create the points of the shape.
|
Vector2f |
pointAt(float t)
Get the point at a particular location on the curve
|
Shape |
transform(Transform transform)
Apply a transformation and return a new shape.
|
calculateRadius, calculateTriangles, checkPoints, contains, contains, findCenter, getBoundingCircleRadius, getCenter, getCenterX, getCenterY, getHeight, getLocation, getMaxX, getMaxY, getMinX, getMinY, getNormal, getPoint, getPointCount, getPoints, getTriangles, getWidth, getX, getY, hasVertex, includes, increaseTriangulation, indexOf, intersects, preCache, prune, setCenterX, setCenterY, setLocation, setLocation, setX, setY, subtract, union
public Curve(Vector2f p1, Vector2f c1, Vector2f c2, Vector2f p2)
p1
- The start of the curvec1
- The first control pointc2
- The second control pointp2
- The end of the curvepublic Vector2f pointAt(float t)
t
- A value between 0 and 1 defining the location of the curve the point is atprotected void createPoints()
Shape
createPoints
in class Shape
public Shape transform(Transform transform)
Shape