jvx.geom
Class PwEvolve
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.project.PjWorkshop
-
- jvx.geom.PwEvolve
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsTimeListenerIf, PsUpdateIf, PjWorkshopIf
public class PwEvolve extends PjWorkshop implements PsTimeListenerIf
Evolve geometries in direction of a given vector field. For example, the vector field may be the vertex normal or a user defined vector field.Not implemented yet: mean and Gauss curvature vectors.
- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 11.08.14, 3.10 revised (kp) Repeat parameter of animation set to one-way.
10.12.06, 3.00 revised (kp) Renamed to PwEvolve from PjEvolve.
30.03.03, 2.10 revised (kp) Optional update of normals implemented.
28.12.01, 2.00 revised (kp) Full revision when incorporating the new workshop handling.
16.12.00, 1.10 revised (kp) Missing dependencies implemented.
22.09.00, 1.00 created (kp)
-
-
Field Summary
-
Fields inherited from class jv.object.PsObject
HAS_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_TAGS
-
Fields inherited from interface jv.project.PjWorkshopIf
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
-
-
Constructor Summary
Constructors Constructor and Description PwEvolve()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close this workshop, and here, stop and remove any animation.voidcompute()Evolve geometry in direction of the currently active evolution type.PsAnimationgetAnimation()Get the animation object of the project which handles the projects animations.intgetDirection()Get direction currently used for evolution.doublegetOffsetFactor()Get evolution distance.booleanhasAnimation()Check whether this project is registered as listener of an animation object.voidinit()InitializationbooleanisEnabledFlip()Check if direction of flow is flip against direction of vector field.booleanisEnabledUpdateNormals()Check if update of normal vectors after each timestep is enabled.voidreset()Reset workshop and geometry to original state.voidsetAnimation(PsAnimation anAnimation)Assign the animation object where this listener is registered.intsetDirection(int dir)Set direction currently used for evolution.voidsetEnabledFlip(boolean flag)Set if direction of flow is flip against direction of vector field.voidsetEnabledUpdateNormals(boolean flag)Enable update of normal vectors after each timestep.voidsetGeometry(PgPointSet geom)Assign geometry on which this workshop operates.voidsetOffsetFactor(double offsetFactor)Set evolution distance.booleansetTime(PsTimeEvent time)Compute evolution.voidstart()Create a new animation and start it.voidstop()Stop the animation.booleanupdate(java.lang.Object event)Update the class whenever a child has changed.-
Methods inherited from class jvx.project.PjWorkshop
cancel, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer
-
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jv.anim.PsTimeListenerIf
getName
-
Methods inherited from interface jv.object.PsUpdateIf
getFather, getName, setParent
-
-
-
-
Method Detail
-
init
public void init()
Initialization- Overrides:
initin classPjWorkshop
-
reset
public void reset()
Reset workshop and geometry to original state.- Overrides:
resetin classPjWorkshop
-
update
public boolean update(java.lang.Object event)
Update the class whenever a child has changed. Method is usually invoked from the children.- Specified by:
updatein interfacePsUpdateIf- Overrides:
updatein classPjWorkshop- Parameters:
event- sender of this update.- Returns:
- true if update was correctly handled by superclass.
- See Also:
PsObject.setParent(PsUpdateIf),PsObject.getFather(),PsObject.addUpdateListener(PsUpdateIf)
-
setGeometry
public void setGeometry(PgPointSet geom)
Assign geometry on which this workshop operates.
-
close
public void close()
Close this workshop, and here, stop and remove any animation.- Overrides:
closein classPjWorkshop
-
isEnabledFlip
public boolean isEnabledFlip()
Check if direction of flow is flip against direction of vector field.- Since:
- JavaView 2.60.001
- Version:
- 11.03.03, 1.00 created (kp)
-
setEnabledFlip
public void setEnabledFlip(boolean flag)
Set if direction of flow is flip against direction of vector field.- Since:
- JavaView 2.60.001
- Version:
- 11.03.03, 1.00 created (kp)
-
isEnabledUpdateNormals
public boolean isEnabledUpdateNormals()
Check if update of normal vectors after each timestep is enabled.- Since:
- JavaView 2.66.001
- Version:
- 30.03.03, 1.00 created (kp)
-
setEnabledUpdateNormals
public void setEnabledUpdateNormals(boolean flag)
Enable update of normal vectors after each timestep.- Since:
- JavaView 2.66.001
- Version:
- 30.03.03, 1.00 created (kp)
-
getDirection
public int getDirection()
Get direction currently used for evolution. Possible values arePnEvolve#OFFSET_VERTEX_NORMAL,PnEvolve#OFFSET_VERTEX_VECTORand others, see PnEvolve. and others.
-
setDirection
public int setDirection(int dir)
Set direction currently used for evolution. Possible values arePnEvolve#OFFSET_VERTEX_NORMAL,PnEvolve#OFFSET_VERTEX_VECTORand others, see PnEvolve. and others.
-
getOffsetFactor
public double getOffsetFactor()
Get evolution distance. The evolution distance is equal to offsetFactor*vector.
-
setOffsetFactor
public void setOffsetFactor(double offsetFactor)
Set evolution distance. The evolution distance is equal to offsetFactor*vector.
-
compute
public void compute()
Evolve geometry in direction of the currently active evolution type. The evolution distance is equal to offsetFactor*vector.
-
setTime
public boolean setTime(PsTimeEvent time)
Compute evolution.- Specified by:
setTimein interfacePsTimeListenerIf
-
start
public void start()
Create a new animation and start it.- Version:
- 11.08.14, 1.10 revised (kp) Repeat set to one-way.
-
stop
public void stop()
Stop the animation.
-
getAnimation
public PsAnimation getAnimation()
Get the animation object of the project which handles the projects animations. This listener may only have a single animation object which is assigned by the animation object when this listener is registered usingsetAnimation(PsAnimation).- Specified by:
getAnimationin interfacePsTimeListenerIf- See Also:
hasAnimation(),setAnimation(PsAnimation)
-
hasAnimation
public boolean hasAnimation()
Check whether this project is registered as listener of an animation object.- Specified by:
hasAnimationin interfacePsTimeListenerIf- See Also:
getAnimation(),setAnimation(PsAnimation)
-
setAnimation
public void setAnimation(PsAnimation anAnimation)
Assign the animation object where this listener is registered. This method is invoked by the animation object during registration of this listener, and usually is not required to be called by a user. If this listener has an assigned animation object, then its animation panel may be shown to change the current time of this listener.Only one animation object may be assigned to this listener. Subsequent assignments will replace the previous assignment.
- Specified by:
setAnimationin interfacePsTimeListenerIf- See Also:
getAnimation(),hasAnimation()
-
-
"