|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jv.project.PgGeometry
|
+--jv.geom.PgVectorField
Vector field along a point set, polygon or surfaces. Each vector has a point or element center on the associated geometry as base point. The base points must be implicitly reconstructed from the associated geometry and the flag 'basedOn'.
Note, usually the vector field is also registered in the geometry.
PgPointSet,
PgElementSet, Serialized Form| Field Summary | |
static int |
ELEMENT_BASED
VectorField is given at element centers. |
static int |
VERTEX_BASED
VectorField is given at vertices. |
| 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 | |
PgVectorField(int aVectorDim)
Constructor of an empty vector field which is VERTEX_BASED on default. |
|
PgVectorField(int aVectorDim,
int basedOn)
Constructor of an empty vector field which is VERTEX_BASED on default. |
|
| Method Summary | |
void |
assureVectorColors()
Ensure that array of colors for each vector exists and its size is equal to number of vectors. |
boolean |
blend(double s,
PgVectorField a,
double t,
PgVectorField b)
Blend between two vector fields this = s*a + t*b, e.g. used in interpolation. |
void |
clearTagVector(int anIndex,
int aTag)
|
java.lang.Object |
clone()
Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. |
boolean |
computeGradient(PgElementSet domain,
PgPointSet image)
Compute vector field as gradient of a map from domain triangulation to R. |
void |
copy(PgGeometry aGeom)
Copy instance variables by duplication, not by copying a reference. |
int |
getBasedOn()
Get flag whether vector field is vertex or element based. |
int |
getDimOfVectors()
Get the dimension of vectors, i.e. the number of coordinates of each vector. |
java.awt.Color |
getGlobalVectorColor()
Get global vector color which is used if no local colors are available. |
double |
getGlobalVectorLength()
Get length factor of vectors when drawn in display. |
double |
getGlobalVectorSize()
Get thickness in pixels of vectors when drawn in display. |
int |
getNumVectors()
Get the number of used vectors. |
PdVector |
getVector(int anIndex)
|
java.awt.Color[] |
getVectorColors()
Get array of vector colors. |
PdVector[] |
getVectors()
Get vertex array for read and write access, but do not modify the size of any vector. |
PdVector[] |
getVertices()
Get array of base vertices for read access. |
void |
init()
Initializes and resets geometry. |
void |
makeTangent()
|
boolean |
merge(PgGeometryIf aField)
Merge vector field with current object and store union of both objects in 'this'. |
void |
paint(PvGeometryIf dc)
Major rendering method fills an internal container class supplied by the display. |
boolean |
removeVector(int anIndex)
|
void |
setBasedOn(int basedOn)
|
void |
setGeometry(PgPointSet geom)
Assign a geometry to serve as the carrier of this vector field. |
void |
setGlobalVectorColor(java.awt.Color color)
Set global vector color to be used if no local colors are available. |
void |
setGlobalVectorLength(double length)
Get length factor of vectors when drawn in display. |
void |
setGlobalVectorSize(double size)
Get thickness in pixels of vectors when drawn in display. |
void |
setNumVectors(int aNumVectors)
Set number of vectors. |
void |
setTagVector(int anIndex,
int aTag)
|
void |
setVector(int anIndex,
double x,
double y)
|
void |
setVector(int anIndex,
double x,
double y,
double z)
|
boolean |
setVector(int anIndex,
PdVector aVector)
|
void |
setVectorColors(java.awt.Color[] colorList)
Copy vector colors of list to existing array of vector colors. |
boolean |
setVectors(PdVector[] aVectorList)
Copy all vectors of vector list to an existing array of vectors. |
java.lang.String |
toString()
Create a multi-line string representation with detailed information about all instance variables. |
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed. |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jv.project.PgGeometryIf |
assureInspector, getInfoPanel, getName, setName |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, setParent |
| Field Detail |
public static final int VERTEX_BASED
public static final int ELEMENT_BASED
| Constructor Detail |
public PgVectorField(int aVectorDim)
aVectorDim - uniform number of components of all vectorsPgVectorField(int, int)
public PgVectorField(int aVectorDim,
int basedOn)
The parameter 'basedOn' must be VERTEX_BASED or ELEMENT_BASED. Specifies the number of vectors this instance can hold and alters the interpretation by the viewer (VERTEX_BASED vectors are shown at the vertices, ELEMENT_BASED vectors are shown at the element centers) and possibly other classes.
The dimension of each vector may differ from the dimension of the underlying geometry.
aVectorDim - uniform number of components of all vectorsbasedOn - flag determining how to compute the vector base point from geometry| Method Detail |
public void init()
PgGeometryinit in class PgGeometrypublic java.lang.String toString()
toString in class PgGeometrypublic java.lang.Object clone()
null.
Tags of this object are not copied but maybe copied of subclasses.
Link to associated point set and element set is set to null.
clone in class PgGeometrycopy(PgGeometry)public void copy(PgGeometry aGeom)
copy in class PgGeometrypublic boolean update(java.lang.Object event)
update in class PgGeometryjv.object.PsUpdateIfevent - carries a lot of informationPsObject,
PsUpdateIf.getFather(),
PsUpdateIf.setParent(PsUpdateIf)public void setGeometry(PgPointSet geom)
HACK: Automatically adjust the number of vectors either to the number of vertices or elements of the geometry depending on the value of getBasedOn().
public int getBasedOn()
public void setBasedOn(int basedOn)
basedOn - has to be VERTEX_BASED or ELEMENT_BASED. Specifies the
number of vectors this instance can hold and alters the interpretation by the
viewer (VERTEX_BASED vectors are shown at the vertices,
ELEMENT_BASED vectors are shown at the element centers) and possibly
other classes.public double getGlobalVectorLength()
public double getGlobalVectorSize()
public java.awt.Color getGlobalVectorColor()
public void setGlobalVectorLength(double length)
public void setGlobalVectorSize(double size)
public void setGlobalVectorColor(java.awt.Color color)
public PdVector[] getVectors()
public boolean setVectors(PdVector[] aVectorList)
PgPointSet.getDimOfVectors()
of the geometry.
Dimension of vectors of this vector field is adjusted.
aVectorList - array with new vectorspublic void assureVectorColors()
public java.awt.Color[] getVectorColors()
public void setVectorColors(java.awt.Color[] colorList)
aVertexColorList - array with new vertex colorspublic PdVector[] getVertices()
public int getDimOfVectors()
public int getNumVectors()
public void setNumVectors(int aNumVectors)
public void paint(PvGeometryIf dc)
PgGeometryjv.project.PgGeometryIf for detailed information.paint in class PgGeometryjv.project.PgGeometryPgGeometryIf
public void clearTagVector(int anIndex,
int aTag)
public void setTagVector(int anIndex,
int aTag)
public PdVector getVector(int anIndex)
public boolean removeVector(int anIndex)
public boolean setVector(int anIndex,
PdVector aVector)
public void setVector(int anIndex,
double x,
double y)
public void setVector(int anIndex,
double x,
double y,
double z)
public boolean merge(PgGeometryIf aField)
merge in class PgGeometryaField - Vector field to be merged into 'this'true if method was successfull
public boolean blend(double s,
PgVectorField a,
double t,
PgVectorField b)
this = s*a + t*b, e.g. used in interpolation.double - s, t weights of vectors of each elementSetPgPointSet - a, b two pointSets used for blending
public boolean computeGradient(PgElementSet domain,
PgPointSet image)
As a result the current vector field is the element based gradient of the map, tangential to triangles in the domain.
PgElementSet - domain domain triangulation, may be a curved surfacePgPointSet - image vertices of point set are the image values of mappublic void makeTangent()
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||