|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjv.object.PsObject
jv.project.PgGeometry
Abstract class for all geometry classes in JavaView, and implementation of
PgGeometryIf.
Users may derive their own geometry classes either from this class
resp. its subclasses, or by writing a class implementing the interface
PgGeometryIf. Either of the two options is required to view the geometry in
a JavaView display.
PgGeometryIf,
PvDisplayIf,
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 | |
PgGeometry()
Constructor. |
|
PgGeometry(int aDim)
Constructor with dimension of geometric points, must be constant for all points. |
|
| Method Summary | |
boolean |
addDisplay(PvDisplayIf display)
Register a new display. |
int |
addElement(PiVector anElement)
Method does nothing and may be overriden by subclasses. |
int |
addPolygon(PiVector aPolygon)
Method does nothing and may be overriden by subclasses. |
int |
addVertex(PdVector aVertex)
Method does nothing and may be overriden by subclasses. |
boolean |
applyAmbientMatrix()
Multiply the ambient matrix to all geometry items. |
boolean |
applyModelingMatrix()
Multiply the modeling matrix to all geometry items. |
boolean |
blend(double s,
PgGeometry a,
double t,
PgGeometry b)
Blend between two geometries, used in interpolation and computing the associate surfaces this = s*a + t*b. |
void |
clearTagElement(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
void |
clearTagPolygon(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
void |
clearTagVertex(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
java.lang.Object |
clone()
Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. |
void |
copy(PsObject object)
Copy argument object into this object by recursively copying all instance variables. |
java.awt.Menu |
fillMethodMenu(java.awt.Menu menu)
Deprecated. use fillMethodMenu(Menu, PvViewerIf) |
java.awt.Menu |
fillMethodMenu(java.awt.Menu menu,
PvViewerIf viewer)
Fill menu with items to invoke advanced methods of this geometry. |
PdVector[] |
getAmbientBounds()
Compute bounding box of this geometry from the set of all vertices, or return null if no vertices. |
PdMatrix |
getAmbientInvMatrix()
Get a reference of the inverse ambient model matrix of geometry. |
PdMatrix |
getAmbientMatrix()
Get a reference of the ambient model matrix of geometry. |
int |
getAmbientProjection()
Get projection mode of ambient space used in model transformations. |
int |
getAmbientSpace()
Get ambient space used in model transformations. |
PsAuthorInfo |
getAuthorInfo()
Get a reference to this author information. |
PsAuthorInfo |
getAuthors()
Deprecated. used getAuthorInfo() |
PdVector[] |
getBounds()
Compute bounding box of the vertices which are transformed with ambient and model matrix. |
PdVector |
getCenter()
Get center of geometry which local transformations use as origin. |
static PdVector |
getCenterOfElement(PdVector center,
PdVector[] vertex,
int[] vertInd)
Compute the barycenter of a geometry element like face or polygon edge. |
PsPanel |
getControlPanel()
Get control panel - if it does not exist try to allocate it. |
double |
getDiameter()
Get diameter of object which is the diagonal in the bounding box. |
int |
getDimOfSimplex()
Get dimension of simplicial complex, i.e. maximal dimension of occurring simplices. |
int |
getDimOfVertices()
Retrieve dimension of vertices, which must be the same for all vertices. |
java.util.Vector |
getDisplayList()
Get all registered displays as vector. |
java.util.Enumeration |
getDisplays()
Get all registered displays as enumeration. |
PiVector |
getElement(int anIndex)
Method does nothing and may be overriden by subclasses. |
PsGeometryInfo |
getGeometryInfo()
Get geometry information. |
PgJvxSrc |
getJvx()
Fills a geometry object with data from this instance, for example, to print to file. |
PiVector |
getLabelAttribute(int type)
Get offset vector in pixel coordinates of label w.r.t. base point. |
java.awt.Color |
getLabelColor(int type)
Get color of specified label type. |
java.lang.String |
getLabelFont(int type)
Get font name of specified label type. |
double |
getLabelSize(int type)
Get font size of specified label type. |
int |
getLabelStyle(int type)
Get font style of specified label type. |
PsPanel |
getMaterialPanel()
Get material panel - if it does not exist try to allocate it. |
PdMatrix |
getModelMatrix()
Get a copy of the model matrix of geometry. |
PiVector |
getPolygon(int anIndex)
Method does nothing and may be overriden by subclasses. |
boolean |
getState(int aKey)
Get a drawing flag of this geometry. |
java.awt.Image |
getTextureImage()
Get image of texture. |
java.lang.String |
getTextureImageName()
Get name of texture image, a full URL or a relative file name. |
java.lang.String |
getTitle()
Get the title of a geometry which may be the same for several geometries of a scene indicating a grouping or other purposes. |
int |
getType()
Get type of geometry, for example PvGeometryIf#GEOM_POINT_SET
and PvGeometryIf#GEOM_ELEMENT_SET. |
java.lang.String |
getVersion()
|
java.lang.String |
getVersionType()
|
PdVector |
getVertex(int anIndex)
Method does nothing and may be overriden by subclasses. |
boolean |
hasAmbientMatrix()
Check for ambient model matrix of geometry. |
boolean |
hasDisplay(PvDisplayIf display)
Check if a given display is registered in this geometry. |
boolean |
hasModelMatrix()
Check if geometry has a model matrix. |
boolean |
hasTagElement(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
boolean |
hasTagPolygon(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
boolean |
hasTagVertex(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
void |
init()
Initializes and resets geometry. |
PvPickEvent |
intersectionWithLine(PdVector base,
PdVector dir)
Method used for picking, should be overriden by subclasses. |
boolean |
isConfigurable(int panel)
Determine whether class has a configuration panel of a given type. |
boolean |
isEnabledInstanceSharing()
Determines if sharing of vertices and other instances with a base geometry is enabled when this instance is filled in PgGeomtry#getJvx(). |
boolean |
isShowingBndBox()
Set flag to enable drawing of bounding box. |
boolean |
isShowingCenter()
Set flag to enable drawing of center of geometry. |
boolean |
isShowingName()
Check whether showing of name of geometry is switched on. |
boolean |
isShowingTitle()
Check whether showing of title of geometry is switched on. |
boolean |
isVisible()
Check the visibility flag of the geometry. |
boolean |
merge(PgGeometryIf geomIf)
Add another of same geometry of same type to this geometry. |
void |
paint(PvGeometryIf dc)
Major rendering method fills an internal container class supplied by the display. |
boolean |
projectFromAmbientSpace()
Apply projection matrix and perform projection determined by projection flag of the surface in a Euclidean model R3, R2, or R1 with parallel projection. |
PgGeometry |
reflect(PdMatrix mat,
boolean bOrient,
boolean bVector)
Generate a cloned geometry and transform vertices by a matrix. |
boolean |
removeDisplay(PvDisplayIf display)
Remove a registered display from list of registered displays. |
int[] |
removeElement(int anIndex)
Method does nothing and may be overriden by subclasses. |
void |
removeMethodMenus()
Remove all menus with items to invoke advanced methods of this geometry. |
int[] |
removePolygon(int anIndex)
Method does nothing and may be overriden by subclasses. |
int[] |
removeVertex(int anIndex)
Method does nothing and may be overriden by subclasses. |
void |
setAmbientMatrix(PdMatrix ambientMat,
PdMatrix ambientInvMat)
Set ambient model matrix of geometry to copy of argument matrix. |
void |
setAmbientProjection(int mode)
Set projection mode of ambient space used in model transformations. |
void |
setAmbientSpace(int mode)
Set ambient space used in model transformations. |
void |
setAuthorInfo(PsAuthorInfo authorInfo)
Set author information by copying or cloning the argument author info. |
void |
setAuthors(PsAuthorInfo author)
Deprecated. used setAuthorInfo(PsAuthorInfo) |
void |
setCenter(PdVector center)
Set center of geometry which local transformations use as origin. |
void |
setDimOfSimplex(int dim)
Set dimension of simplicial complex, i.e. maximal dimension of occurring simplices. |
boolean |
setElement(int anIndex,
PiVector aElement)
Method does nothing and may be overriden by subclasses. |
void |
setEnabledInstanceSharing(boolean flag)
Determines if sharing of vertices and other instances with a base geometry is enabled when this instance is filled in PgGeomtry#getJvx(). |
void |
setGeometryInfo(PsGeometryInfo geometryInfo)
Set geometry information by copying or cloning the argument geometry info. |
void |
setJvx(PgJvxSrc src)
Fill this instance with data from a geometry source, for example, previously read from file. |
boolean |
setLabelAttribute(int type,
int xOffset,
int yOffset,
int horAdjust,
int verAdjust,
int font)
Set offset vector in pixel coordinates of label w.r.t. base point. |
boolean |
setLabelAttribute(int type,
PiVector labelAtt)
Set attributes of labels of given type. |
void |
setLabelColor(int type,
java.awt.Color color)
Set color of specified label type. |
void |
setLabelFont(int type,
java.lang.String font)
Set font name of specified label type. |
void |
setLabelSize(int type,
double size)
Set font size of specified label type. |
void |
setLabelStyle(int type,
int style)
Set font style of specified label type. |
void |
setModelMatrix(PdMatrix modelMat)
Set model matrix of geometry to copy of argument matrix. |
boolean |
setPolygon(int anIndex,
PiVector aPolygon)
Method does nothing and may be overriden by subclasses. |
void |
setState(int aKey,
boolean aState)
Set a drawing flag of this geometry. |
void |
setTagElement(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
void |
setTagPolygon(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
void |
setTagVertex(int index,
int aTag)
Method does nothing and may be overriden by subclasses. |
void |
setTextureImage(java.awt.Image img)
Set texture image for vertex and element textures. |
void |
setTextureImageName(java.lang.String name)
Set name of texture image, a URL or a relative file name. |
void |
setTitle(java.lang.String title)
Set the title of a geometry which may be the same for several geometries of a scene indicating a grouping or other purposes. |
void |
setType(int type)
Set type of geometry, for example PvGeometryIf#GEOM_POINT_SET
and PvGeometryIf#GEOM_ELEMENT_SET.
|
void |
setVersion(java.lang.String version)
|
void |
setVersionType(java.lang.String versionType)
|
boolean |
setVertex(int anIndex,
PdVector aVertex)
Method does nothing and may be overriden by subclasses. |
void |
setVisible(boolean flag)
Set the visibility flag of the geometry. |
void |
showBndBox(boolean flag)
Set flag to enable drawing of bounding box. |
void |
showCenter(boolean flag)
Set flag to enable drawing of center of geometry. |
void |
showName(boolean flag)
Enable and disable showing of name of geometry in display. |
void |
showTitle(boolean flag)
Enable and disable showing of title of geometry in display. |
java.lang.String |
toString()
Create a multi-line string representation with detailed information about all instance variables. |
boolean |
update(java.lang.Object event)
Update method of geometry updates registered panels, update listeners, and invokes a repaint in the registered displays. |
| 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 |
| 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, hasTag, setName |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, setParent |
| Constructor Detail |
public PgGeometry()
public PgGeometry(int aDim)
aDim - dimension of geometric pointsgetDimOfVertices()| Method Detail |
public void init()
init in class PsObjectpublic boolean isEnabledInstanceSharing()
public void setEnabledInstanceSharing(boolean flag)
If sharing is enabled then base geometry and this container physically share memory of many instance arrays such as vertex, normal, face etc arrays. Sharing should be carefully enabled and special care must be taken.
public PsAuthorInfo getAuthorInfo()
getAuthorInfo in interface PgGeometryIfpublic void setAuthorInfo(PsAuthorInfo authorInfo)
setAuthorInfo in interface PgGeometryIfpublic PsAuthorInfo getAuthors()
public void setAuthors(PsAuthorInfo author)
public PsGeometryInfo getGeometryInfo()
getGeometryInfo in interface PgGeometryIfpublic void setGeometryInfo(PsGeometryInfo geometryInfo)
setGeometryInfo in interface PgGeometryIfpublic int getType()
PvGeometryIf#GEOM_POINT_SET
and PvGeometryIf#GEOM_ELEMENT_SET.
getType in interface PgGeometryIfpublic void setType(int type)
PvGeometryIf#GEOM_POINT_SET
and PvGeometryIf#GEOM_ELEMENT_SET.
Change display of vertices to default setting depending on geometry type.
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
public java.lang.String getVersionType()
public void setVersionType(java.lang.String versionType)
public java.lang.String getTitle()
getTitle in interface PgGeometryIfPsObject.setName(String),
showTitle(boolean),
setTitle(String)public void setTitle(java.lang.String title)
setTitle in interface PgGeometryIfPsObject.setName(String),
showTitle(boolean),
setTitle(String)public double getDiameter()
public PdVector[] getBounds()
The two returned bounding box vectors are 3-dimensional. If dimension of vertices is less than 3 then remaining components are zeroed.
Note, transformation not supported yet.
getAmbientBounds()public PdVector[] getAmbientBounds()
Subclasses may return null if no geometric size information available, for example, no vertices allocated yet.
Note, the bounding box does not include transformations from the ambient or model matrix.
getBounds()public PdVector getCenter()
public void setCenter(PdVector center)
center - vector which becomes the local origin of the geometrypublic boolean isConfigurable(int panel)
HAS_INFO_PANEL or
HAS_MATERIAL_PANEL or
HAS_TEXTURE_PANEL or
HAS_CONFIG_PANEL.
isConfigurable in interface PgGeometryIfpanel - Identifier of panelpublic int getDimOfSimplex()
getDimOfSimplex in interface PgGeometryIfsetDimOfSimplex(int)public void setDimOfSimplex(int dim)
getDimOfSimplex()public PgJvxSrc getJvx()
getJvx in interface PgGeometryIfpublic void setJvx(PgJvxSrc src)
setJvx in interface PgGeometryIfsrc - a geometry source used to fill this instance with data.public java.lang.String toString()
toString in interface PgGeometryIftoString in class PsObjectpublic java.lang.Object clone()
null.
Display list is not cloned but set to null. Method menu is not cloned.
clone in interface PgGeometryIfclone in class PsObjectcopy(PsObject)public void copy(PsObject object)
The argument was changed from PgGeometry to PsObject since there were problems in J/Link which preferred to use PsObject#copy(PsObject) instead of PgGeometry#copy(PsObject).
copy in class PsObjectPsObject.clone()public boolean update(java.lang.Object event)
update in interface PsUpdateIfupdate in class PsObjectPsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public void paint(PvGeometryIf dc)
jv.project.PgGeometryIf for detailed information.
paint in interface PgGeometryIfPgGeometryIfpublic int getDimOfVertices()
getDimOfVertices in interface PgGeometryIfPgGeometry(int)public int getAmbientSpace()
getAmbientSpace in interface PgGeometryIfpublic void setAmbientSpace(int mode)
setAmbientSpace in interface PgGeometryIfmode - One of the values PgGeometryIf#AMBIENT_...public int getAmbientProjection()
getAmbientProjection in interface PgGeometryIfpublic void setAmbientProjection(int mode)
setAmbientProjection in interface PgGeometryIfmode - One of the values PgGeometryIf#PROJ_...public boolean getState(int aKey)
This method catches unhandled keys of subclasses. Subclasses should overwrite this method and call super for unhandled keys.
aKey - flag to be set, choose among PvGeometryIf.SHOW_...
public void setState(int aKey,
boolean aState)
This method catches unhandled keys of subclasses. Subclasses should overwrite this method and call super for unhandled keys.
setState in interface PgGeometryIfaKey - flag to be set, choose among PvGeometryIf.SHOW_...aState - enable or disable statepublic PdMatrix getModelMatrix()
getModelMatrix in interface PgGeometryIfpublic boolean hasModelMatrix()
hasModelMatrix in interface PgGeometryIfpublic void setModelMatrix(PdMatrix modelMat)
null then model matrix is removed.
setModelMatrix in interface PgGeometryIfpublic boolean applyModelingMatrix()
true if this geometry has a model matrix.public boolean applyAmbientMatrix()
true if this geometry has a ambient matrix.public PdMatrix getAmbientMatrix()
getAmbientMatrix in interface PgGeometryIfpublic PdMatrix getAmbientInvMatrix()
getAmbientInvMatrix in interface PgGeometryIfpublic boolean hasAmbientMatrix()
hasAmbientMatrix in interface PgGeometryIf
public void setAmbientMatrix(PdMatrix ambientMat,
PdMatrix ambientInvMat)
null then the ambient model matrices are
removed. Note, the ambient projection remains unchanged.
setAmbientMatrix in interface PgGeometryIfpublic boolean projectFromAmbientSpace()
true if operation was applied successfully.public boolean isVisible()
isVisible in interface PgGeometryIfsetVisible(boolean)public void setVisible(boolean flag)
setVisible in interface PgGeometryIfisVisible()public boolean isShowingTitle()
PsObject.setName(String),
showName(boolean),
setTitle(String)public void showTitle(boolean flag)
PsObject.setName(String),
showName(boolean),
setTitle(String)public boolean isShowingName()
showTitle(boolean),
PsObject.setName(String)public void showName(boolean flag)
showTitle(boolean),
PsObject.setName(String)public boolean isShowingBndBox()
public void showBndBox(boolean flag)
public boolean isShowingCenter()
public void showCenter(boolean flag)
public PiVector getLabelAttribute(int type)
PvGeometryIf#GEOM_ITEM_POINT
and other items.
type - type of label, vertex, polygon, element or title labels.
public boolean setLabelAttribute(int type,
int xOffset,
int yOffset,
int horAdjust,
int verAdjust,
int font)
First two components of attr are pixel coordinates determining the offset with respect to the base point. For example, an offset pair (1,-2) locates label center 1 to the right and 2 pixels up of the base point (since the upper left corner of the display is (0,0) in screen coordinates).
Third component of attr is
PgGeometryIf.LABEL_HEAD or
PgGeometryIf.LABEL_CENTER or
PgGeometryIf.LABEL_TAIL
and indicates whether head, tail, or center
of label is located at base+offset.
Fourth component of attr is
PgGeometryIf.LABEL_TOP or
PgGeometryIf.LABEL_MIDDLE or
PgGeometryIf.LABEL_BASE
and indicates whether top, middle, or base
of label is located at base+offset. Not implemented yet.
Fifth component of attr indicates font. For possible fonts see PsConfig.
Note, it is currently not possible to set the label attribute, say, of a single vertex unless you have a geometry with just one vertex.
There exist one vector for each of the basic primitive types GEOM_ITEM_POINT,
GEOM_ITEM_EDGE,GEOM_ITEM_POLYGON,GEOM_ITEM_ELEMENT,GEOM_ITEM_TETRA,
GEOM_ITEM_NAME and GEOM_ITEM_TITLE. For possible type see
PvGeometryIf#GEOM_ITEM_POINT
and other items.
type - Type of geometry items affected by this settingxOffset - Offset in x-direction in pixels.yOffset - Offset in y-direction in pixels.horAdjust - Layout in horizontal direction, see PgGeometryIf#LABEL_.verAdjust - Layout in vertikal direction, see PgGeometryIf#LABEL_.font - Identifier of font, see PsConfig#FONT_
false if type is unknown.
public boolean setLabelAttribute(int type,
PiVector labelAtt)
setLabelAttribute(int,int,int,int,int,int)
with integer arguments.
Length of vector must be equal to (or larger than) 5.
type - Type of geometry items affected by this settinglabelAtt - Vector with different attribute valuespublic java.awt.Color getLabelColor(int type)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this setting
public void setLabelColor(int type,
java.awt.Color color)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this settingcolor - Color used to draw the labelpublic double getLabelSize(int type)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this setting
public void setLabelSize(int type,
double size)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this settingsize - Font size used to draw the labelpublic java.lang.String getLabelFont(int type)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this setting
public void setLabelFont(int type,
java.lang.String font)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this settingfont - Font used to draw the labelpublic int getLabelStyle(int type)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this setting
public void setLabelStyle(int type,
int style)
Basic primitive types are GEOM_ITEM_POINT, GEOM_ITEM_EDGE, GEOM_ITEM_POLYGON,
GEOM_ITEM_ELEMENT, GEOM_ITEM_TETRA, GEOM_ITEM_NAME and GEOM_ITEM_TITLE.
For possible type see
PvGeometryIf#GEOM_ITEM_POINT.
type - Type of geometry items affected by this settingstyle - Font style used to draw the labelpublic PsPanel getMaterialPanel()
Method is a shortcut to avoid checking, creating, and adding the panel to the inspector list.
getMaterialPanel in interface PgGeometryIfpublic PsPanel getControlPanel()
Method is a shortcut to avoid checking, creating, and adding the panel to the inspector list.
getControlPanel in interface PgGeometryIfpublic java.awt.Menu fillMethodMenu(java.awt.Menu menu)
fillMethodMenu in interface PgGeometryIf
public java.awt.Menu fillMethodMenu(java.awt.Menu menu,
PvViewerIf viewer)
fillMethodMenu in interface PgGeometryIfmenu - parent menu to which this menu is added.viewer - optional viewer manager from which methods may access displays and inspectors.public void removeMethodMenus()
removeMethodMenus in interface PgGeometryIfpublic boolean addDisplay(PvDisplayIf display)
update() whenever geometry changes
require a repaint of the display.
For example, method is called from PvDisplay when registering the geometry in the
display.
addDisplay in interface PgGeometryIfdisplay - Display to be registered
false if instance already registered.getDisplays()public java.util.Vector getDisplayList()
null if no displays found.getDisplays()public java.util.Enumeration getDisplays()
getDisplays in interface PgGeometryIfnull if no displays found.TODO: use getDisplayList() since Enumeration may become obsolete in multi-threading.public boolean hasDisplay(PvDisplayIf display)
hasDisplay in interface PgGeometryIfdisplay - Display which is checked if registered
true if registered display found.addDisplay(PvDisplayIf),
getDisplays()public boolean removeDisplay(PvDisplayIf display)
removeDisplay in interface PgGeometryIfdisplay - Registered display to be removed
false if display does not exists.addDisplay(PvDisplayIf)public int addVertex(PdVector aVertex)
addVertex in interface PgGeometryIfaVertex - vector with new vertex coordinatespublic PdVector getVertex(int anIndex)
getVertex in interface PgGeometryIfanIndex - index of vertex to be returned
public int[] removeVertex(int anIndex)
removeVertex in interface PgGeometryIfanIndex - index of vertex to be removed
public boolean setVertex(int anIndex,
PdVector aVertex)
setVertex in interface PgGeometryIfanIndex - index of vertex to be changedaVertex - vector with new vertex coordinatespublic int addPolygon(PiVector aPolygon)
addPolygon in interface PgGeometryIfaPolygon - vector with indices of vertices in global vertex arraypublic PiVector getPolygon(int anIndex)
getPolygon in interface PgGeometryIfanIndex - index of polygon to be returned
public int[] removePolygon(int anIndex)
removePolygon in interface PgGeometryIfanIndex - index of polygon to be removed
public boolean setPolygon(int anIndex,
PiVector aPolygon)
setPolygon in interface PgGeometryIfanIndex - index of polygon to be changedaPolygon - vector with indices of vertices in global vertex arraypublic int addElement(PiVector anElement)
addElement in interface PgGeometryIfanElement - vector with indices of vertices in global vertex arraypublic PiVector getElement(int anIndex)
getElement in interface PgGeometryIfanIndex - index of element to be returned
public int[] removeElement(int anIndex)
removeElement in interface PgGeometryIfanIndex - index of element to be removed
public boolean setElement(int anIndex,
PiVector aElement)
setElement in interface PgGeometryIfanIndex - index of element to be changedaElement - vector with indices of vertices in global vertex array
public void clearTagVertex(int index,
int aTag)
clearTagVertex in interface PgGeometryIf
public boolean hasTagVertex(int index,
int aTag)
hasTagVertex in interface PgGeometryIf
public void setTagVertex(int index,
int aTag)
setTagVertex in interface PgGeometryIf
public void clearTagPolygon(int index,
int aTag)
clearTagPolygon in interface PgGeometryIf
public boolean hasTagPolygon(int index,
int aTag)
hasTagPolygon in interface PgGeometryIf
public void setTagPolygon(int index,
int aTag)
setTagPolygon in interface PgGeometryIf
public void clearTagElement(int index,
int aTag)
clearTagElement in interface PgGeometryIf
public boolean hasTagElement(int index,
int aTag)
hasTagElement in interface PgGeometryIf
public void setTagElement(int index,
int aTag)
setTagElement in interface PgGeometryIf
public PvPickEvent intersectionWithLine(PdVector base,
PdVector dir)
intersectionWithLine in interface PgGeometryIf
public boolean blend(double s,
PgGeometry a,
double t,
PgGeometry b)
this = s*a + t*b.
blend in interface PgGeometryIfs - weight of vertices of first elementSett - weight of vertices of second elementSeta - first source geometry used for blendingb - second source geometry used for blending
true on successpublic boolean merge(PgGeometryIf geomIf)
Method applies model and ambient matrices to argument geometry if such local transformation matrices exist.
merge in interface PgGeometryIfgeomIf - geometry merged into the current geometry
true on success
public static PdVector getCenterOfElement(PdVector center,
PdVector[] vertex,
int[] vertInd)
center - existing vector of dimension m_dim which will be filled and returnedvertex - vertex array to which the index vector refersvertInd - index vector with indices in the vertex array
public PgGeometry reflect(PdMatrix mat,
boolean bOrient,
boolean bVector)
reflect in interface PgGeometryIfmat - 3*3 or 4*4 transformation matrixbOrient - flag whether to keep the orientation of the geometrybVector - flag whether to keep the orientation of vectors
public java.lang.String getTextureImageName()
getTextureImageName in interface PgGeometryIfpublic void setTextureImageName(java.lang.String name)
setTextureImageName in interface PgGeometryIfpublic java.awt.Image getTextureImage()
getTextureImage in interface PgGeometryIfpublic void setTextureImage(java.awt.Image img)
setTextureImage in interface PgGeometryIf
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||