public class MorphShape extends Shape
boundingCircleRadius, center, maxX, maxY, minX, minY, points, pointsDirty, trianglesDirty, tris, x, y
Constructor and Description |
---|
MorphShape(Shape base)
Create a new mighty morphin shape
|
Modifier and Type | Method and Description |
---|---|
void |
addShape(Shape shape)
Add a subsequent shape that we should morph too in order
|
protected void |
createPoints()
Subclasses implement this to create the points of the shape.
|
void |
setExternalFrame(Shape current)
Set the current frame
|
void |
setMorphTime(float time)
Set the "time" index for this morph.
|
Shape |
transform(Transform transform)
Apply a transformation and return a new shape.
|
void |
updateMorphTime(float delta)
Update the morph time and hence the curent frame
|
calculateRadius, calculateTriangles, checkPoints, closed, 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 MorphShape(Shape base)
base
- The base shape we're starting the morph frompublic void addShape(Shape shape)
shape
- The new shape that forms part of the morphing shapepublic void setMorphTime(float time)
time
- The time index to represent on this shapepublic void updateMorphTime(float delta)
delta
- The amount to change the morph time bypublic void setExternalFrame(Shape current)
current
- The current frameprotected void createPoints()
Shape
createPoints
in class Shape
createPoints()
public Shape transform(Transform transform)
Shape
transform
in class Shape
transform
- The transform to be appliedtransform(Transform)