jvx.surface
Class PgDomainDescr
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.surface.PgDomainDescr
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf
- Direct Known Subclasses:
- PgSurfaceDescr
public class PgDomainDescr extends PsObject
Two-dimensional domain for parametrized surfaces with variable size and discretization. Info panel allows to adjust size and discretization of domain and grid. The domain in R^2 is the rectangle[uMin,vMin]x[uMax,vMax]withnumULinesresp.numVLinesgrid lines in u-horizontal resp. v-vertical direction.Single parameter lines may be displayed by linking uMin and uMax resp vMin and vMax together.
- See Also:
PgParmSurface, Serialized Form- Author:
- Konrad Polthier
- Version:
- 26.07.04, 1.60 revised (kp) Change color of active slider if single parameter line is shown.
16.01.04, 1.50 revised (kp) Copy and clone methods added.
06.09.99, 1.30 revised (kp) Setting of defaults for numU/VLines moved to constructor.
27.08.99, 1.20 revised (kp) Name PgDomain changed to PgDomainDescr.
04.07.99, 1.10 revised (kp) Number of u/v lines implemented as PuInteger.
Display of single parameter lines.
00.00.97, 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
-
-
Constructor Summary
Constructors Constructor and Description PgDomainDescr(int aVertexDim)Create a new domain descriptor of a planar rectangle and its discretization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners.voidcopy(PsObject object)Copy a geometry into this geometry.booleaneval(double[] z, int ix, int iy)Compute position in domain at specified grid vertex (int, int).java.lang.String[]getNameOfLines()Get name of lines.intgetNumULines()Set number of grid lines in u direction.intgetNumVLines()Set number of grid lines in v direction.doublegetUMax()doublegetUMin()doublegetVMax()doublegetVMin()voidinit()Initialize and reset data structure and all instance variables.booleanisShowingULine()Check whether single u-line is showing or full surface.booleanisShowingVLine()Check whether single v-line is showing or full surface.voidsetDiscr(int uLines, int vLines)Set number of grid lines in u/v direction.voidsetDiscrBounds(int uMin, int vMin, int uMax, int vMax)Set bounds of discretization sliders.voidsetMaxSize(double uMin, double vMin, double uMax, double vMax)Set maximal size of domain in u/v direction to the rectangle[uMin,vMin]x[uMax,vMax].voidsetNameOfLines(java.lang.String uName, java.lang.String vName)Set name of lines.voidsetNumULines(int aNum)Set number of grid lines in u direction.voidsetNumVLines(int aNum)Set number of grid lines in v direction.voidsetSize(double uMin, double vMin, double uMax, double vMax)Set current size of domain in u/v direction to the rectangle[uMin,vMin]x[uMax,vMax].voidsetUMax(double uMax)voidsetUMin(double uMin)voidsetVMax(double vMax)voidsetVMin(double vMin)voidshowULine(boolean flag)Switch between showing a single u-parameter line and the full surface.voidshowVLine(boolean flag)Switch between showing a single v-parameter line and the full surface.java.lang.StringtoString()Create a multi-line string representation with detailed information about all instance variables.booleanupdate(java.lang.Object event)Catch all events from integer and double instance variables.-
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, updatePanels
-
-
-
-
Constructor Detail
-
PgDomainDescr
public PgDomainDescr(int aVertexDim)
Create a new domain descriptor of a planar rectangle and its discretization.Note, currently the dimension of the rectangle must be 2.
-
-
Method Detail
-
init
public void init()
Initialize and reset data structure and all instance variables.
-
clone
public java.lang.Object clone()
Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes.- Overrides:
clonein classPsObject- See Also:
copy(PsObject)- Version:
- 16.01.04, 1.00 created (kp)
-
copy
public void copy(PsObject object)
Copy a geometry into this geometry.- Overrides:
copyin classPsObject- See Also:
PsObject.clone()- Version:
- 16.01.04, 1.00 created (kp)
-
toString
public java.lang.String toString()
Create a multi-line string representation with detailed information about all instance variables.
-
update
public boolean update(java.lang.Object event)
Catch all events from integer and double instance variables.- Specified by:
updatein interfacePsUpdateIf- Overrides:
updatein classPsObject- Parameters:
event- carries a lot of information- Returns:
- true if event has been handled, otherwise false
- See Also:
PsObject.setParent(PsUpdateIf),PsObject.getFather(),PsObject.addUpdateListener(PsUpdateIf)
-
getNameOfLines
public java.lang.String[] getNameOfLines()
Get name of lines.
-
setNameOfLines
public void setNameOfLines(java.lang.String uName, java.lang.String vName)Set name of lines.
-
isShowingULine
public boolean isShowingULine()
Check whether single u-line is showing or full surface.
-
isShowingVLine
public boolean isShowingVLine()
Check whether single v-line is showing or full surface.
-
showULine
public void showULine(boolean flag)
Switch between showing a single u-parameter line and the full surface.
-
showVLine
public void showVLine(boolean flag)
Switch between showing a single v-parameter line and the full surface.
-
setMaxSize
public void setMaxSize(double uMin, double vMin, double uMax, double vMax)Set maximal size of domain in u/v direction to the rectangle[uMin,vMin]x[uMax,vMax].
-
setSize
public void setSize(double uMin, double vMin, double uMax, double vMax)Set current size of domain in u/v direction to the rectangle[uMin,vMin]x[uMax,vMax].
-
getUMin
public double getUMin()
-
getUMax
public double getUMax()
-
getVMin
public double getVMin()
-
getVMax
public double getVMax()
-
setUMin
public void setUMin(double uMin)
-
setUMax
public void setUMax(double uMax)
-
setVMin
public void setVMin(double vMin)
-
setVMax
public void setVMax(double vMax)
-
getNumULines
public int getNumULines()
Set number of grid lines in u direction.
-
getNumVLines
public int getNumVLines()
Set number of grid lines in v direction.
-
setNumULines
public void setNumULines(int aNum)
Set number of grid lines in u direction.
-
setNumVLines
public void setNumVLines(int aNum)
Set number of grid lines in v direction.
-
setDiscr
public void setDiscr(int uLines, int vLines)Set number of grid lines in u/v direction.
-
setDiscrBounds
public void setDiscrBounds(int uMin, int vMin, int uMax, int vMax)Set bounds of discretization sliders.
-
eval
public boolean eval(double[] z, int ix, int iy)Compute position in domain at specified grid vertex (int, int).- Parameters:
z- double array which will contain position in domain on return.ix- grid vertex (ix,iy) at which to evaluate domain.iy- grid vertex (ix,iy) at which to evaluate domain.- Returns:
trueon success,falseif missing or voidz.
-
-
"