public class PsKeyframe extends PgGeometry implements PsKeyframeIf, PsTimeListenerIf
Instance of this class can be used as the dynamic in an animation.
PsAnimation,
PsTimeListenerIf,
PsKeyframeIf,
Serialized FormHAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGSAMBIENT_H2_HYPERBOLIC, AMBIENT_H3_HYPERBOLIC, AMBIENT_H4_HYPERBOLIC, AMBIENT_PROJECTIONS, AMBIENT_R1_EUCLIDEAN, AMBIENT_R2_EUCLIDEAN, AMBIENT_R3_EUCLIDEAN, AMBIENT_R4_EUCLIDEAN, AMBIENT_R5_EUCLIDEAN, AMBIENT_S1_SPHERE, AMBIENT_S2_SPHERE, AMBIENT_S3_SPHERE, AMBIENT_S4_SPHERE, AMBIENT_SPACES, BLEND_ALPHA, BLEND_MATERIAL, BLEND_REPLACE, FILTER_DIRECT, FILTER_LINEAR, FILTER_QUADRATIC, HAS_METHOD_MENU, INSPECTOR_CONTROL, INSPECTOR_CONTROL_EXT, INSPECTOR_MATERIAL, INSPECTOR_MATERIAL_EXT, INSPECTOR_TEXTURE, INSPECTOR_TEXTURE_EXT, LABEL_BASE, LABEL_CENTER, LABEL_HEAD, LABEL_MIDDLE, LABEL_TAIL, LABEL_TOP, m_numLabelTypes, METHOD_EXT, PERIODIC_BOTH, PERIODIC_HEIGHT, PERIODIC_NONE, PERIODIC_WIDTH, PROJ_KLEIN_BALL, PROJ_PARALLEL, PROJ_POINCARE_BALL, PROJ_STEREOGRAPHIC, PROJ_UPPER_HALFSPACE, SIDE_BACK, SIDE_BOTH, SIDE_FRONT, SIDE_NONE| Constructor and Description |
|---|
PsKeyframe()
Constructor with empty list of keyframes.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addKey(PgGeometry object,
double time)
Add key at specified time and return index of key.
|
PsAnimation |
getAnimation()
Get the animation object of the project which handles the projects animations.
|
PgGeometry |
getDynamic()
Get the geometry which is used for interpolation between keyframes.
|
PgGeometry |
getNextObject(double time)
Get geometry of first keyframe with
currentTime>time,
or null if no more keyframes. |
int |
getNumOfKeys()
Get number of keyframes of this instance.
|
PgGeometry |
getObject(double time)
Get geometry of keyframe with
currentTime<=time. |
PgGeometry |
getObject(int ind)
Get geometry of keyframe with given index.
|
double |
getTimeOfFirstKey()
Minimal value of animation interval if instance has keyframes.
|
double |
getTimeOfLastKey()
Maximal value of animation interval if instance has keyframes.
|
double |
getTimeOfNextKey()
Current time plus time step increment if instance has keyframes.
|
double |
getTimeOfPreviousKey()
Current time minus time step increment if instance has keyframes.
|
boolean |
hasAnimation()
Check whether this project is registered as listener of an animation object.
|
void |
init()
Initialize instance variables.
|
boolean |
isEnabledKeysOnly()
Get flag which determines smooth interpolation or displaying of key objects only.
|
void |
removeKey(double time)
Remove key at specified time within EPS tolerance.
|
void |
removeKey(int ind)
Remove key at specified index.
|
void |
setAnimation(PsAnimation anAnimation)
Assign the animation object where this listener is registered.
|
void |
setDynamic(PgGeometry geom)
Set the geometry which is used for interpolation between keyframes.
|
void |
setEnabledKeysOnly(boolean flag)
Set flag to avoid smooth interpolation but displaying key objects only.
|
void |
setName(java.lang.String name)
Set name of instance, and set name of interpolation object.
|
boolean |
setTime(double time)
Refresh the interpolation geometry at the given time.
|
boolean |
setTime(PsTimeEvent timeEvent)
Refresh the interpolation geometry at the given time.
|
boolean |
update(java.lang.Object event)
Update method of geometry updates registered panels, update listeners, and
invokes a repaint in the registered displays.
|
addDisplay, addElement, addPolygon, addVertex, applyAmbientMatrix, applyModelingMatrix, blend, clearTagElement, clearTagPolygon, clearTagVertex, clone, convertWorldToModel, copy, fillMethodMenu, fillMethodMenu, getAmbientBounds, getAmbientInvMatrix, getAmbientMatrix, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getBounds, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplayList, getDisplays, getElement, getGeometryInfo, getJvx, getLabelAttribute, getLabelColor, getLabelFont, getLabelSize, getLabelStyle, getMaterialPanel, getModelMatrix, getPolygon, getState, getTextureImage, getTextureImageName, getTitle, getType, getVersion, getVersionType, getVertex, hasAmbientMatrix, hasDisplay, hasModelMatrix, hasTagElement, hasTagPolygon, hasTagVertex, intersectionWithLine, isConfigurable, isEnabledInstanceSharing, isShowingBndBox, isShowingCenter, isShowingName, isShowingTitle, isVisible, merge, paint, projectFromAmbientSpace, reflect, removeDisplay, removeElement, removeMethodMenus, removePolygon, removeVertex, setAmbientMatrix, setAmbientProjection, setAmbientSpace, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setDimOfVertices, setElement, setEnabledInstanceSharing, setGeometryInfo, setJvx, setLabelAttribute, setLabelAttribute, setLabelColor, setLabelFont, setLabelSize, setLabelStyle, setModelMatrix, setPolygon, setState, setTagElement, setTagPolygon, setTagVertex, setTextureImage, setTextureImageName, setTitle, setType, setVersion, setVersionType, setVertex, setVisible, showBndBox, showCenter, showName, showTitle, toStringaddInspector, addUpdateListener, assureInspector, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setParent, setSymbol, setTag, updatePanelsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNameassureInspector, getInfoPanel, getName, hasTaggetFather, setParentpublic void init()
init in class PgGeometrypublic void setName(java.lang.String name)
setName in interface PgGeometryIfsetName in class PsObjectPgGeometryIf.getName(),
PgGeometryIf.setTitle(String)public boolean update(java.lang.Object event)
update in interface PsUpdateIfupdate in class PgGeometryevent - carries a lot of informationPsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public PgGeometry getDynamic()
public void setDynamic(PgGeometry geom)
This keyframe class is set as the parent of the dynamic geometry.
geom - geometry used to store a dynamic section of the keyframe animation.public void setEnabledKeysOnly(boolean flag)
flag - Set true to avoid smooth interpolationpublic boolean isEnabledKeysOnly()
true if no smooth interpolationpublic PgGeometry getObject(int ind)
ind - Index of a keyframe in [0, numKeys-1].getObject(double)public PgGeometry getObject(double time)
currentTime<=time.time - Time of the requested key.getNextObject(double)public PgGeometry getNextObject(double time)
currentTime>time,
or null if no more keyframes.time - Time of the requested key.getObject(double)public boolean setTime(PsTimeEvent timeEvent)
HACK: Method should be moved to applications.
setTime in interface PsTimeListenerIfpublic boolean setTime(double time)
public int getNumOfKeys()
public int addKey(PgGeometry object, double time)
public void removeKey(double time)
public void removeKey(int ind)
public double getTimeOfFirstKey()
getTimeOfFirstKey in interface PsKeyframeIfPsAnimation.enableKeys(boolean)public double getTimeOfPreviousKey()
getTimeOfPreviousKey in interface PsKeyframeIfpublic double getTimeOfNextKey()
getTimeOfNextKey in interface PsKeyframeIfPsAnimation.enableKeys(boolean)public double getTimeOfLastKey()
getTimeOfLastKey in interface PsKeyframeIfPsAnimation.enableKeys(boolean)public PsAnimation getAnimation()
setAnimation(PsAnimation).getAnimation in interface PsTimeListenerIfhasAnimation(),
setAnimation(PsAnimation)public boolean hasAnimation()
hasAnimation in interface PsTimeListenerIfgetAnimation(),
setAnimation(PsAnimation)public void setAnimation(PsAnimation anAnimation)
Only one animation object may be assigned to this listener. Subsequent assignments will replace the previous assignment.
setAnimation in interface PsTimeListenerIfgetAnimation(),
hasAnimation()"