public class Wheel3D extends DisplayGroup implements Animator.AnimatorListener, Wheel
Modifier and Type | Field and Description |
---|---|
protected float |
mAlpha1 |
protected float |
mAlpha2 |
protected VelocityAnimator |
mAnimator |
protected float |
mCurrentGapAngle |
protected float |
mDepth1 |
protected float |
mDepth2 |
protected float |
mGapAngle |
protected int |
mOrientation |
protected float |
mRadius |
protected float |
mScale1 |
protected float |
mScale2 |
protected float |
mStartAngle |
protected boolean |
mStoppable |
protected float |
mSwipeDelta |
protected boolean |
mSwipeEnabled |
protected float |
mSwipeMinThreshold |
protected float |
mSwipeVelocity |
protected boolean |
mSwiping |
protected int |
mViewAngle |
static int |
ORIENTATION_X |
static int |
ORIENTATION_Y |
ATT_CACHE_ENABLED, ATT_CLIPPING_ENABLED, ATT_TOUCHABLE, mCacheDrawer, mCacheEnabled, mCacheFrameBuffer, mCachePolicy, mCacheProjection, mChildren, mChildrenDisplayOrder, mChildrenIds, mClippingEnabled, mClipStageRect, mNumChildren, mOriginalScissor, mOriginalScissorEnabled, mTouchable, mVisibleTouchables, mWrapContentHeight, mWrapContentWidth
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, TAG
DEFAULT_SNAP_ACCELERATION, DEFAULT_SNAP_DURATION, DEFAULT_SPIN_ACCELERATION
CACHE_WHEN_CHILDREN_CHANGED, CACHE_WHEN_CHILDREN_STABLE
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 |
---|
Wheel3D() |
Modifier and Type | Method and Description |
---|---|
protected float |
formatAngle(float angle) |
protected void |
getAnglePoint(float angle,
float[] xy) |
int |
getFrontChildIndex() |
int |
getFrontChildIndex(float angle,
boolean ceiling) |
float |
getGapAngle() |
int |
getOrientation() |
float |
getRadius() |
float |
getSnapAngle(boolean ceiling) |
float |
getStartAngle() |
float |
getSwipeMinThreshold() |
float |
getVelocity() |
int |
getViewAngle() |
float |
getViewAngleAtChild(int childIndex) |
protected void |
invalidateChildrenPosition() |
boolean |
isSwipeEnabled() |
boolean |
isSwiping() |
protected void |
onAddedChild(DisplayObject child) |
void |
onAnimationEnd(Animator animator) |
void |
onAnimationUpdate(Animator animator,
float value) |
protected void |
onRemovedChild(DisplayObject child) |
protected void |
onTouchDown(MotionEvent event)
This is called when a touch down
|
boolean |
onTouchEvent(MotionEvent event)
Note: This is called from UI-Thread
|
protected void |
positionChildren() |
void |
scrollByAngle(float deltaAngle) |
void |
scrollByDistance(float deltaDistance) |
void |
scrollToAngle(float angle) |
void |
scrollToChild(DisplayObject child) |
void |
scrollToChild(int childIndex) |
void |
scrollToDistance(float distance) |
void |
setAlphaRange(float alpha1,
float alpha2)
Set alpha range.
|
void |
setDepthRange(float z1,
float z2) |
void |
setGapAngle(float angle) |
void |
setOrientation(int orientation) |
void |
setRadius(float radius) |
void |
setScaleRange(float scale1,
float scale2) |
void |
setStartAngle(float angle) |
void |
setSwipeEnabled(boolean swipeEnabled) |
void |
setSwipeMinThreshold(float swipeMinThreshold) |
void |
setViewAngle(int viewAngle) |
void |
spin(float veloc) |
void |
spin(float veloc,
float acceleration) |
void |
spin(float veloc,
float acceleration,
int maxSpinTime) |
void |
spinToAngle(float newAngle,
float acceleration,
int durationPerDegree,
boolean rightDirection) |
void |
spinToChild(int index,
float acceleration,
int duration,
boolean rightDirection) |
protected void |
startSwipe() |
void |
stop() |
protected void |
stopSwipe() |
protected void |
swipe(float delta) |
void |
updateChildren(int deltaTime) |
addChild, addChild, clearCache, dispose, draw, drawChildren, getCachePolicy, getCacheProjection, getChildAt, getChildById, getChildIndex, getNumChildren, getNumGrandChildren, getObjectTree, initCache, isCacheEnabled, isChildInBounds, isClippingEnabled, isTouchable, isWrapContenHeight, isWrapContentWidth, onAddedToScene, onRemovedFromScene, removeAllChildren, removeChild, removeChild, sendChildToBottom, sendChildToTop, setCacheEnabled, setCachePolicy, setCacheProjection, setChildrenDisplayOrder, setClippingEnabled, setTouchable, setWrapContentHeight, setWrapContentWidth, setXMLAttributes, swapChildren, swapChildren
addManipulator, drawBounds, drawEnd, drawStart, drawWireframe, getAlpha, getBlendFunc, getBounds, getColor, getDebugFlags, getFps, getGlobalPosition, getHeight, getId, getInheritedBlendFunc, getInheritedColor, getManipulator, getMask, getMatrix, getNumManipulators, getOrigin, getParent, 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, onAdded, onCreateChildren, onPreConcatParentMatrix, onRemoved, 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, update, updateBounds, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMatrix, getScene, getSize, globalToLocal, invalidate, invalidate, localToGlobal, queueEvent
public static final int ORIENTATION_X
public static final int ORIENTATION_Y
protected float mStartAngle
protected float mGapAngle
protected float mCurrentGapAngle
protected int mOrientation
protected float mRadius
protected int mViewAngle
protected float mAlpha1
protected float mAlpha2
protected float mScale1
protected float mScale2
protected float mDepth1
protected float mDepth2
protected VelocityAnimator mAnimator
protected boolean mSwipeEnabled
protected float mSwipeMinThreshold
protected boolean mSwiping
protected float mSwipeDelta
protected float mSwipeVelocity
protected boolean mStoppable
public void updateChildren(int deltaTime)
updateChildren
in class DisplayGroup
protected void invalidateChildrenPosition()
public float getRadius()
public void setRadius(float radius)
public float getGapAngle()
public void setGapAngle(float angle)
public float getStartAngle()
public void setStartAngle(float angle)
public void scrollToChild(DisplayObject child)
public void scrollToChild(int childIndex)
public float getViewAngleAtChild(int childIndex)
childIndex
- public int getFrontChildIndex()
public int getFrontChildIndex(float angle, boolean ceiling)
protected float formatAngle(float angle)
angle
- public float getSnapAngle(boolean ceiling)
ceiling
- public int getOrientation()
public void setOrientation(int orientation)
public void scrollToAngle(float angle)
public void scrollByAngle(float deltaAngle)
public void scrollByDistance(float deltaDistance)
public void scrollToDistance(float distance)
public void setAlphaRange(float alpha1, float alpha2)
alpha1
- alpha2
- public void setScaleRange(float scale1, float scale2)
public void setDepthRange(float z1, float z2)
protected void onAddedChild(DisplayObject child)
onAddedChild
in class DisplayGroup
protected void onRemovedChild(DisplayObject child)
onRemovedChild
in class DisplayGroup
protected void getAnglePoint(float angle, float[] xy)
public int getViewAngle()
public void setViewAngle(int viewAngle)
protected void positionChildren()
public void spin(float veloc, float acceleration)
public void spin(float veloc, float acceleration, int maxSpinTime)
public void spinToChild(int index, float acceleration, int duration, boolean rightDirection)
public void spinToAngle(float newAngle, float acceleration, int durationPerDegree, boolean rightDirection)
public float getVelocity()
getVelocity
in interface Wheel
public boolean isSwipeEnabled()
public void setSwipeEnabled(boolean swipeEnabled)
public float getSwipeMinThreshold()
public void setSwipeMinThreshold(float swipeMinThreshold)
protected void startSwipe()
protected void stopSwipe()
protected void swipe(float delta)
public boolean isSwiping()
public void onAnimationEnd(Animator animator)
onAnimationEnd
in interface Animator.AnimatorListener
public void onAnimationUpdate(Animator animator, float value)
onAnimationUpdate
in interface Animator.AnimatorListener
public boolean onTouchEvent(MotionEvent event)
DisplayGroup
onTouchEvent
in interface Touchable
onTouchEvent
in class DisplayGroup
protected void onTouchDown(MotionEvent event)
event
-