JavaView© v3.95.000

jvx.geom
Class PjEvolve

java.lang.Object
  extended byjv.object.PsObject
      extended byjvx.project.PjWorkshop
          extended byjvx.geom.PjEvolve
All Implemented Interfaces:
java.lang.Cloneable, PjWorkshopIf, PsTimeListenerIf, PsUpdateIf, java.io.Serializable

public class PjEvolve
extends PjWorkshop
implements PsTimeListenerIf

Evolve geometries in direction of a given vector field. For example, the vector field may be the vertex or element/edge normal, or it may be any user defined vector field.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jv.object.PsObject
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
 
Constructor Summary
PjEvolve()
          Constructor
 
Method Summary
 void close()
          Close this workshop, and here, stop and remove any animation.
 void compute()
          Evolve geometry in direction of the currently active evolution type.
 PsAnimation getAnimation()
          Get the animation object of the project which handles the projects animations.
 int getDirection()
          Get direction currently used for evolution.
 double getOffsetFactor()
          Get evolution distance.
 boolean hasAnimation()
          Check whether this project is registered as listener of an animation object.
 void init()
          Initialisation
 boolean isEnabledFlip()
          Check if direction of flow is flip against direction of vector field.
 boolean isEnabledUpdateNormals()
          Check if update of normal vectors after each timestep is enabled.
 void reset()
          Reset workshop and geometry to original state.
 void setAnimation(PsAnimation anAnimation)
          Assign the animation object where this listener is registered.
 int setDirection(int dir)
          Set direction currently used for evolution.
 void setEnabledFlip(boolean flag)
          Set if direction of flow is flip against direction of vector field.
 void setEnabledUpdateNormals(boolean flag)
          Enable update of normal vectors after each timestep.
 void setGeometry(PgPointSet geom)
          Assign geometry on which this workshop operates.
 void setOffsetFactor(double offsetFactor)
          Set evolution distance.
 boolean setTime(PsTimeEvent time)
          Compute evolution.
 void start()
          Create a new animation and start it.
 void stop()
          Stop the animation.
 boolean update(java.lang.Object event)
          Update the class whenever a child has changed.
 
Methods inherited from class jvx.project.PjWorkshop
cancel, getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, isModal, ok, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, 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
 

Constructor Detail

PjEvolve

public PjEvolve()
Constructor

Method Detail

init

public void init()
Initialisation

Overrides:
init in class PjWorkshop

reset

public void reset()
Reset workshop and geometry to original state.

Overrides:
reset in class PjWorkshop

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:
update in interface PsUpdateIf
Overrides:
update in class PjWorkshop
Parameters:
event - sender of this update.
Returns:
true if update was correctly handled by superclass.

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:
close in class PjWorkshop

isEnabledFlip

public boolean isEnabledFlip()
Check if direction of flow is flip against direction of vector field.

Since:
JavaView 2.60.001

setEnabledFlip

public void setEnabledFlip(boolean flag)
Set if direction of flow is flip against direction of vector field.

Since:
JavaView 2.60.001

isEnabledUpdateNormals

public boolean isEnabledUpdateNormals()
Check if update of normal vectors after each timestep is enabled.

Since:
JavaView 2.66.001

setEnabledUpdateNormals

public void setEnabledUpdateNormals(boolean flag)
Enable update of normal vectors after each timestep.

Since:
JavaView 2.66.001

getDirection

public int getDirection()
Get direction currently used for evolution. Possible values are PwEvolve#OFFSET_VERTEX_NORMAL and others.


setDirection

public int setDirection(int dir)
Set direction currently used for evolution. Possible values are PwEvolve#OFFSET_VERTEX_NORMAL 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:
setTime in interface PsTimeListenerIf

start

public void start()
Create a new animation and start it.


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 using setAnimation(PsAnimation).

Specified by:
getAnimation in interface PsTimeListenerIf
See Also:
hasAnimation(), setAnimation(PsAnimation)

hasAnimation

public boolean hasAnimation()
Check whether this project is registered as listener of an animation object.

Specified by:
hasAnimation in interface PsTimeListenerIf
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:
setAnimation in interface PsTimeListenerIf
See Also:
getAnimation(), hasAnimation()

JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.