public class Polyline extends Shape implements StackableObject
Modifier and Type | Field and Description |
---|---|
protected AtlasFrame |
mAtlasFrame |
protected float[] |
mColorValues |
protected float |
mNarrowAngle |
protected int |
mNumPointsUsed |
protected PointF[] |
mPoints |
protected boolean |
mStackable |
protected float |
mStroke1 |
protected float |
mStroke2 |
protected GLColor[] |
mStrokeColors |
protected Interpolator |
mStrokeInterpolator |
protected float |
mTextureCap1 |
protected float |
mTextureCap2 |
protected float[] |
mTextureCoords |
protected boolean |
mTextureRepeating |
protected float |
mTotalLength |
protected UniContainer |
mUniParent |
protected float[] |
mVertices |
protected int |
mVerticesNum |
protected static int |
VERTEX_POINTER_SIZE |
ATT_ASYNC, ATT_SOURCE, mColorBuffer, mTexture, mTextureCoordBuffer, mTextureCoordBufferScaled, mVertexBuffer, TAG
ATT_ALPHA, ATT_ANIMATOR, ATT_BLEND_MODE, ATT_COLOR, ATT_DEBUG, ATT_ORIGIN_AT_CENTER, ATT_ROTATION, ATT_VISIBLE, mAlive, mAlpha, mAlphaTestEnabled, mAutoUpdateBounds, mBlendFunc, mBounds, mBypassCameraClipping, mColor, mDebugFlags, mFrameDuration, mHasTransformValues, mId, mInvalidateFlags, mManipulators, mMask, mMatrix, mNumManipulators, mOrigin, mParent, mPerspectiveEnabled, mPivot, mPosition, mRotation, mRotationVectorX, mRotationVectorY, mRotationVectorZ, mScale, mScene, mSceneSize, mSize, mSkew, mTransformMatrix, mTransformMatrixValues, mUIConstraint, mVisible, mZ
FLIP_X, FLIP_Y
ALL, ALPHA, BLEND, BOUNDS, CACHE, CHILDREN, COLOR, DEPTH, FRAME, ORIGIN, PARENT, PARENT_BOUNDS, PERSPECTIVE, PIVOT, POSITION, ROTATION, SCALE, SIZE, SKEW, TEXTURE, TEXTURE_COORDS, TRANSFORM_MATRIX, VERTICES, VISIBILITY, VISUAL
Constructor and Description |
---|
Polyline() |
Modifier and Type | Method and Description |
---|---|
protected void |
allocateVertices(int numVertices,
int vertexSize) |
boolean |
draw(GLState glState) |
AtlasFrame |
getAtlasFrame() |
int |
getNumStackedChildren() |
Parentable |
getParent() |
PointF[] |
getPoints() |
Interpolator |
getStrokeInterpolator() |
float |
getTotalLength() |
boolean |
isStackable() |
void |
onAdded(UniContainer container) |
void |
onRemoved()
This is called after this object is removed from a Container
|
void |
setAtlasFrame(AtlasFrame frame) |
void |
setPoints(int numPoints,
PointF... points) |
void |
setPoints(PointF... points) |
void |
setStackable(boolean value) |
void |
setStrokeColors(GLColor... colors)
Set colors for up to 4 corners, in N-shape order
|
void |
setStrokeInterpolator(Interpolator strokeInterpolator) |
void |
setStrokeRange(float stroke1,
float stroke2) |
void |
setTexture(Texture texture) |
void |
setTextureCaps(float cap1,
float cap2)
Set the beginning and end caps' widths.
|
void |
setTextureRepeating(boolean repeating)
Repeat the texture to fill the body of this polyline
|
int |
stack(GLState glState,
int index,
VertexBuffer vertexBuffer,
ColorBuffer colorBuffer,
TextureCoordBuffer coordBuffer) |
boolean |
update(int deltaTime) |
protected void |
validateVertices() |
dispose, drawChildren, drawStart, drawWireframe, flipTextureCoordBuffer, getColorBuffer, getTexture, getTextureCoordBuffer, getVertexBuffer, onAdded, onTextureLoaded, setColorBuffer, setTextureCoordBuffer, setTextureCoordBuffer, setVertexBuffer, setXMLAttributes, validateTextureCoordBuffer
addManipulator, drawBounds, drawEnd, getAlpha, getBlendFunc, getBounds, getColor, getDebugFlags, getFps, getGlobalPosition, getHeight, getId, getInheritedBlendFunc, getInheritedColor, getManipulator, getMask, getMatrix, getNumManipulators, getObjectTree, getOrigin, getParentMatrix, getPivot, getPosition, getRotation, getScale, getScene, getSceneSize, getSize, getSkew, getUIConstraint, getWidth, getX, getY, getZ, globalToLocal, invalidate, invalidate, isAlive, isAlphaTestEnabled, isAutoUpdateBounds, isBypassCameraClipping, isOriginAtCenter, isPerspectiveEnabled, isVisible, localToGlobal, move, moveTo, onAddedToScene, onCreateChildren, onPreConcatParentMatrix, onRemovedFromScene, queueEvent, removeAllManipulators, removeFromParent, removeManipulator, rotate, setAlive, setAlpha, setAlphaTestEnabled, setAutoUpdateBounds, setBlendFunc, setBypassCameraClipping, setColor, setDebugFlags, setFps, setId, setMask, setOrigin, setOrigin, setOriginAtCenter, setPerspectiveEnabled, setPivot, setPivot, setPivotAtCenter, setPosition, setPosition, setRotation, setRotationVector, setScale, setScale, setSize, setSize, setSkew, setUIConstraint, setVisible, setX, setY, setZ, shouldDraw, toString, updateBounds, updateChildren, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addManipulator, dispose, getAlpha, getBlendFunc, getBounds, getColor, getFps, getId, getInheritedBlendFunc, getInheritedColor, getManipulator, getNumManipulators, getObjectTree, getOrigin, getPivot, getScene, getSkew, getZ, globalToLocal, invalidate, invalidate, isAlive, isAutoUpdateBounds, isVisible, localToGlobal, onAddedToScene, onRemovedFromScene, queueEvent, removeAllManipulators, removeFromParent, removeManipulator, setAlive, setAlpha, setAutoUpdateBounds, setBlendFunc, setColor, setFps, setId, setOrigin, setOrigin, setOriginAtCenter, setPivot, setPivot, setPivotAtCenter, setSkew, setVisible, setZ, shouldDraw, updateBounds
getHeight, getPosition, getRotation, getScale, getSize, getWidth, getX, getY, move, moveTo, rotate, setPosition, setPosition, setRotation, setScale, setScale, setSize, setSize, setX, setY
protected static final int VERTEX_POINTER_SIZE
protected PointF[] mPoints
protected int mNumPointsUsed
protected float[] mTextureCoords
protected float mNarrowAngle
protected float mStroke1
protected float mStroke2
protected GLColor[] mStrokeColors
protected float[] mColorValues
protected float[] mVertices
protected int mVerticesNum
protected float mTotalLength
protected Interpolator mStrokeInterpolator
protected float mTextureCap1
protected float mTextureCap2
protected boolean mTextureRepeating
protected AtlasFrame mAtlasFrame
protected boolean mStackable
protected UniContainer mUniParent
public PointF[] getPoints()
public final void setPoints(PointF... points)
public void setPoints(int numPoints, PointF... points)
protected void validateVertices()
public boolean update(int deltaTime)
update
in interface Displayable
update
in class Shape
public void setTexture(Texture texture)
setTexture
in class Shape
texture
- the texture to setpublic void setTextureCaps(float cap1, float cap2)
cap1
- cap2
- public void setTextureRepeating(boolean repeating)
repeating
- public boolean draw(GLState glState)
draw
in interface DisplayObject
draw
in class BaseDisplayObject
protected void allocateVertices(int numVertices, int vertexSize)
public void setStrokeRange(float stroke1, float stroke2)
public void setStrokeColors(GLColor... colors)
public Interpolator getStrokeInterpolator()
public void setStrokeInterpolator(Interpolator strokeInterpolator)
public float getTotalLength()
public void setAtlasFrame(AtlasFrame frame)
public AtlasFrame getAtlasFrame()
public int stack(GLState glState, int index, VertexBuffer vertexBuffer, ColorBuffer colorBuffer, TextureCoordBuffer coordBuffer)
stack
in interface StackableObject
public int getNumStackedChildren()
getNumStackedChildren
in interface StackableObject
public void setStackable(boolean value)
setStackable
in interface StackableObject
public boolean isStackable()
isStackable
in interface StackableObject
public final Parentable getParent()
getParent
in interface Displayable
getParent
in class BaseDisplayObject
public void onAdded(UniContainer container)
onAdded
in interface StackableObject
public void onRemoved()
BaseDisplayObject
onRemoved
in interface Displayable
onRemoved
in class BaseDisplayObject