JavaView® v2.12

vgp.vector.vectorField
Class PjVectorField

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jv.project.PjProject
              |
              +--jv.loader.PjImportModel
                    |
                    +--vgp.vector.vectorField.PjVectorField
All Implemented Interfaces:
java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf, java.lang.Runnable, java.io.Serializable

public class PjVectorField
extends PjImportModel
implements java.lang.Runnable, java.awt.event.ActionListener

Project Vector Field Visualization and Geodesic Runge-Kutta uses PjImportModel to load models from file. Various models may be loaded and are extended by a (more or less) random tangential vector field.

Version:
29. 8.99, 1.00 created
Author:
Eike Preuß
See Also:
PjImportModel, Serialized Form

Field Summary
static int GEODESIC
          Geodesic completion.
static int GEODESIC2
          Geodesic translation along half angle.
static int GEODESIC3
          Geodesic translation dependent on evaluation point (continous).
static int PROJECTION
          Is used by method calculateRepresentations.
 
Fields inherited from class jv.loader.PjImportModel
CONFIRM_CANCEL, CONFIRM_CLICKED, CONFIRM_OK, DIR_LIST, FULL_INFO_PANEL, SMALL_INFO_PANEL
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS
 
Constructor Summary
PjVectorField()
          If (this.instanceOf("PjVectorField")) it calls init-method.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Starts a new thread that calculates the LIC texture.
 void calculateCurve()
          Calculates the integral curve with initial values internally given.
 void calculateRepresentations()
          Calculates the representations of vectors at every vertexstar.
 void calculateVectorField()
          Calculates (pseudo) random vector field.
 void computeLIC()
           
 void init()
          Initialize and reset project, stops the running animation if any.
 boolean load()
          Gets geometry from PjImportModel and then triangulates, updates the number of elements, gets a vector field and fits that all in the display.
 boolean load(java.lang.String fileName)
          Loads geometry via PjImportModel and then calls load().
 void pickInitial(PvPickEvent pos)
          Initiates calculation of an integral line that starts at picked position.
 void run()
          Gets an apropriate Runge-Kutta class and initiates LIC calculation element by element.
 void setFast(boolean flag)
          Sets integration method to euler-mode or 4th-order Runge-Kutta mode.
 void setMethod(int method)
          Sets method used in calculateRepresentations.
 void start()
          Load geometry file if file name has been specified.
 boolean update(java.lang.Object event)
          Event handling method in the update mechanism.
 
Methods inherited from class jv.loader.PjImportModel
getBaseDir, getCategory, getConfirm, getFileName, getInfoPanel, setBase, setCategory, setFileName, setParentProject, setTypeOfInfoPanel
 
Methods inherited from class jv.project.PjProject
addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setDisplay, setEnabledAutoFit, setParameter, setTime, setViewer, stop, unmarkVertices
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, 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.project.PvPickListenerIf
getName
 
Methods inherited from interface jv.object.PsUpdateIf
getFather, getName, setParent
 

Field Detail

PROJECTION

public static final int PROJECTION
Is used by method calculateRepresentations.

GEODESIC

public static final int GEODESIC
Geodesic completion. Is used by method calculateRepresentations.

GEODESIC2

public static final int GEODESIC2
Geodesic translation along half angle. Is used by method calculateRepresentations.

GEODESIC3

public static final int GEODESIC3
Geodesic translation dependent on evaluation point (continous). Is used by method calculateRepresentations.
Constructor Detail

PjVectorField

public PjVectorField()
If (this.instanceOf("PjVectorField")) it calls init-method.
Method Detail

init

public void init()
Description copied from class: PjProject
Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.
Overrides:
init in class PjImportModel

start

public void start()
Description copied from class: PjImportModel
Load geometry file if file name has been specified. Otherwise do nothing.
Overrides:
start in class PjImportModel
Following copied from class: jv.project.PjProject
See Also:
PvViewerIf.start(), #isEnabledAutoFit(boolean)

update

public boolean update(java.lang.Object event)
Description copied from interface: PsUpdateIf
Event handling method in the update mechanism. Events not handled will be passed to m_parent or super in this sequence.
Overrides:
update in class PsObject
Following copied from interface: jv.object.PsUpdateIf
Parameters:
event - carries a lot of information
Returns:
true if event has been handled, otherwise false
See Also:
PsObject, PsUpdateIf.getFather(), PsUpdateIf.setParent(PsUpdateIf)

setMethod

public void setMethod(int method)
Sets method used in calculateRepresentations.
See Also:
PROJECTION, GEODESIC, GEODESIC2, GEODESIC3

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Starts a new thread that calculates the LIC texture.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
See Also:
run()

calculateVectorField

public void calculateVectorField()
Calculates (pseudo) random vector field.

calculateRepresentations

public void calculateRepresentations()
Calculates the representations of vectors at every vertexstar. If current method in m_method is GEODESIC3,i.e. continous geodesic translation, this calculation is done in the runge-kutta class.
See Also:
PnTranslationRK, PwBary.getGeodRepresentation(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, int, jv.vecmath.PiVector, jv.vecmath.PiVector), PwBary.getTransRepresentation(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, int, jv.vecmath.PiVector, jv.vecmath.PiVector), PwBary.getProjRepresentation(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, int, jv.vecmath.PiVector, jv.vecmath.PiVector)

calculateCurve

public void calculateCurve()
Calculates the integral curve with initial values internally given.

pickInitial

public void pickInitial(PvPickEvent pos)
Initiates calculation of an integral line that starts at picked position.
Overrides:
pickInitial in class PjProject
See Also:
calculateCurve()

setFast

public void setFast(boolean flag)
Sets integration method to euler-mode or 4th-order Runge-Kutta mode.
Parameters:
flag - true: euler; false: 4th-order runge-kutta

load

public boolean load(java.lang.String fileName)
Loads geometry via PjImportModel and then calls load().
Overrides:
load in class PjImportModel
See Also:
load()

load

public boolean load()
Gets geometry from PjImportModel and then triangulates, updates the number of elements, gets a vector field and fits that all in the display.

computeLIC

public void computeLIC()

run

public void run()
Gets an apropriate Runge-Kutta class and initiates LIC calculation element by element.
Specified by:
run in interface java.lang.Runnable
See Also:
PnLIC, PnVertexRK, PnTranslationRK

JavaView® v2.12

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