JavaView® v2.12

jvx.geom
Class PwVectorField

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jvx.geom.PwVectorField
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable

public class PwVectorField
extends PsObject

With this class one is allowed to create a vector field to a given geometry right from scrap.

Version:
26.09.01, 2.40 revised (ep) Disable some things for geometries with vertex dimension > 2.
19.09.01, 2.30 revised (ep) Restore visibility of elements after close.
30.08.01, 2.20 revised (ep) Added constructor without display parameter.
07.06.01, 2.10 revised (ep) Send an update in addVF and removeVF, and some checks for null.
28.05.01, 2.00 revised (ep) Do not set display to XY.
11.05.00, 1.00 created (ep)
Author:
Eike Preuss
See Also:
Serialized Form

Field Summary
static int TYPE_GRADIENT
           
static int TYPE_LINEAR
           
static int TYPE_ROTATION
           
static int TYPE_STRAIGHT
           
static int TYPE_Z_K
           
 
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
PwVectorField()
           
PwVectorField(PvDisplayIf disp)
           
 
Method Summary
 void addCenter(int type)
          with default values for parameters
 void addCenter(int type, double infl)
          sets all parameters to 'infl'
 void addCenter(PdVector position, int type)
           
 void addCenter(PdVector position, int type, double infl)
           
 void calculateVF()
           
 void clearCenter()
           
 void close()
           
 void fixVF()
           
 int getCenterType(int index)
           
 PgElementSet getElementSet()
           
 int getNumCenters()
           
 int getNumVectorFields()
           
 int getSelectedCenter()
           
 int getSelectedVF()
           
 void init()
          If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
 void makeNewVF(int type)
           
 void removeCenter(int index)
           
 void removeVF(int index)
           
 void selectCenter(int index)
           
 void selectVF(int index)
           
 void setCenterInfluence(int center, double influence)
           
 void setCenterType(int center, int type)
           
 void setDisplay(PvDisplayIf disp)
           
 void setGeometry(PgElementSet geom)
           
 void setMakeTangential(boolean flag)
           
 boolean update(java.lang.Object event)
          Update all inspector panels, send update to all registered update listeners and finally update parent.
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, 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
 

Field Detail

TYPE_ROTATION

public static final int TYPE_ROTATION

TYPE_GRADIENT

public static final int TYPE_GRADIENT

TYPE_STRAIGHT

public static final int TYPE_STRAIGHT

TYPE_LINEAR

public static final int TYPE_LINEAR

TYPE_Z_K

public static final int TYPE_Z_K
Constructor Detail

PwVectorField

public PwVectorField()

PwVectorField

public PwVectorField(PvDisplayIf disp)
Method Detail

init

public void init()
Description copied from class: PsObject
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
Overrides:
init in class PsObject

setDisplay

public void setDisplay(PvDisplayIf disp)

update

public boolean update(java.lang.Object event)
Description copied from class: PsObject
Update all inspector panels, send update to all registered update listeners and finally update parent. Each of those updates has this object as event independent of the argument of this method.

Central update method of this object. Must be overwritten if this class receives unknown events, say, from new children. Any subclass must class invoke super.update(event) on all events it does handle itself.

Overrides:
update in class PsObject
Following copied from class: jv.object.PsObject
See Also:
PsObject.setParent(PsUpdateIf), PsObject.getFather(), PsObject.addUpdateListener(PsUpdateIf)

setCenterType

public void setCenterType(int center,
                          int type)
Parameters:
center - starts at 0

setCenterInfluence

public void setCenterInfluence(int center,
                               double influence)
Parameters:
center - starts at 0

selectCenter

public void selectCenter(int index)
Parameters:
center - starts at 0

getCenterType

public int getCenterType(int index)
Parameters:
index - starts at 0

getNumCenters

public int getNumCenters()

getSelectedCenter

public int getSelectedCenter()

getSelectedVF

public int getSelectedVF()

addCenter

public void addCenter(int type)
with default values for parameters

addCenter

public void addCenter(int type,
                      double infl)
sets all parameters to 'infl'

addCenter

public void addCenter(PdVector position,
                      int type,
                      double infl)

addCenter

public void addCenter(PdVector position,
                      int type)

removeCenter

public void removeCenter(int index)
Parameters:
index - starts at 0

clearCenter

public void clearCenter()

removeVF

public void removeVF(int index)
Parameters:
index - starts at 0

getElementSet

public PgElementSet getElementSet()

setGeometry

public void setGeometry(PgElementSet geom)

makeNewVF

public void makeNewVF(int type)
Parameters:
type - element based or vertex based
See Also:
PgVectorField, PgVectorField.setBasedOn(int)

getNumVectorFields

public int getNumVectorFields()

selectVF

public void selectVF(int index)
Parameters:
index - starts at 0

fixVF

public void fixVF()

setMakeTangential

public void setMakeTangential(boolean flag)

close

public void close()

calculateVF

public void calculateVF()

JavaView® v2.12

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