jv.viewer
Class PvGeometry
- java.lang.Object
-
- jv.object.PsObject
-
- jv.project.PgGeometry
-
- jv.project.PgJvxSrc
-
- jv.viewer.PvGeometry
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf, PvGeometryIf
public final class PvGeometry extends PgJvxSrc implements PvGeometryIf
Container class for display. This class can hold a point set, polygon set, element set, and other subclasses of PgGeometry. Each PgGeometry registered in a PvDisplay has an associated PvGeometry, which is filled each time the display receives an update event from the real geometry. Then PvGeometry calls PgGeometry.paint(this) to allow the PgGeometry to set new values.A subclass of PgGeometry has access to all methods of PvGeometry listed in PvGeometryIf.
- See Also:
PvGeometryIf,PgGeometry,PvDisplay,PvScene, Serialized Form- Author:
- Konrad Polthier
- Version:
- 23.11.14, 6.40 revised (kp) URL handling improved.
16.11.06, 6.30 revised (kp) Better checks if m_bInstanceSharing is enabled.
11.10.06, 6.20 revised (kp) Avoid nullPtr when smoothEdgeColors where enabled.
29.02.04, 6.10 revised (kp) Methods on vectorFields removed which were deprecated before JavaView v2.21.
29.02.04, 6.00 revised (kp) Optimization and number of methods reduced.
30.01.04, 5.30 revised (kp) Remove transformed vertex and element normals if there are no normals any more.
29.01.04, 5.20 revised (kp) Edge arrows now respect vertex size.
23.01.04, 5.10 revised (kp) Marked, picked and focused vertices and edges are now drawn even if thickness is zero.
18.01.04, 5.00 revised (kp) Lighting of textured surfaces implemented, other lighting improved.
17.01.04, 4.95 revised (kp) Several unused methods removed which assign data for individual elements.
13.08.03, 4.90 revised (kp) New internal variable m_bIsClippable determines if a geometry is clipped at all.
15.05.03, 4.80 revised (kp) Range plot now also works for elements. First alpha version.
17.03.03, 4.70 revised (kp) Scene bounding box clipping implemented.
13.03.03, 4.60 revised (kp) Auto-clipping in perspective mode enabled.
07.12.02, 4.50 revised (kp) Perspectivity implemented.
25.11.02, 4.30 revised (kp) Providing direct access to polygon and edge offset for each edge.
20.07.02, 4.20 revised (kp) No longer correct depth of vector fields in z-buffer, antialias.
23.06.02, 4.10 revised (kp) Blending and filtering of texture implemented.
08.06.02, 4.00 revised (kp) Alpha channel in texture and lighting.
19.05.01, 3.50 revised (kp) Most vector methods moved to PgJvxSrc, or deprecated.
12.05.01, 3.30 revised (kp) Display of vertices not referenced by elements and polygons implemented.
13.12.00, 3.20 revised (kp) Rename instance variable m_vectorField from m_vectorfield.
05.12.00, 3.10 revised (kp) Unused methods add/remove/setGeometryPolyygon() removed.
26.09.00, 3.00 revised (kp) Superclass changed to PgJvxSrc from PgGeometry.
02.04.00, 2.30 revised (kp) Everywhere PdColor replaced with Color except static calls.
09.02.00, 2.20 revised (kp) Outline mode added.
20.01.00, 2.10 revised (kp) Vector drawn with arrows.
20.11.99, 2.00 revised (kp) Aura along edges.
23.10.99, 1.90 created (kp) Edge Once Drawing of edges disabled since 10% slower.
04.10.99, 1.80 created (kp) Occurrence of Face replaced with Element.
30.09.99, 1.70 created (kp) Checkbox to print indices in display added.
29.08.99, 1.60 revised (kp) Thick edges added. Some globalSizes changed to integers since check for equality is cheaper.
01.08.99, 1.50 revised (kp) Texture activated.
21.06.99, 1.11 revised (kp) Clipping w.r.t. viewing direction activated.
25.04.99, 1.10 revised (kp) Handling of tagged vertices improved.
02.01.99, 1.01 revised (kp) Additional integer argument for setList calls
00.00.97, 1.00 created (kp)
-
-
Field Summary
Fields Modifier and Type Field and Description booleanm_bPerspectivityHACK JOGL Flag if perspectivity is enabled.-
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
-
Fields inherited from interface jv.project.PvGeometryIf
DRAW_FRAME, DRAW_ORDER_BACK, DRAW_ORDER_FRONT, DRAW_ORDER_STANDARD, ENABLE_DEFAULT_LABEL, ENABLE_NEIGHBOUR, GEOM_BOUNDARY_POLYGON, GEOM_ELEMENT_SET, GEOM_ITEM_EDGE, GEOM_ITEM_ELEMENT, GEOM_ITEM_NAME, GEOM_ITEM_POINT, GEOM_ITEM_POLYGON, GEOM_ITEM_TETRA, GEOM_ITEM_TITLE, GEOM_POINT_SET, GEOM_POLYGON, GEOM_POLYGON_SET, GEOM_TETRA_SET, GEOM_UNKNOWN, GEOM_VECTOR_FIELD, IGNORE_DEPTHCUE, IGNORE_LIGHTING, INDUCE_ELEMENT_FROM_VERTEX_COLORS, IS_BOUNDARY, IS_CREASE, IS_HIDDEN, IS_PICKED, IS_SYMMETRY, SHOW_BACKFACE, SHOW_BNDBOX, SHOW_BOUNDARIES, SHOW_CENTER, SHOW_EDGE_COLOR_FROM_ELEMENTS, SHOW_EDGE_COLOR_FROM_VERTICES, SHOW_EDGE_COLORS, SHOW_EDGE_LABELS, SHOW_EDGE_SIZES, SHOW_EDGES, SHOW_ELEMENT_BACK_COLOR, SHOW_ELEMENT_BACK_COLORS, SHOW_ELEMENT_COLOR_FROM_VERTICES, SHOW_ELEMENT_COLORS, SHOW_ELEMENT_LABELS, SHOW_ELEMENT_NORMAL_ARROW, SHOW_ELEMENT_NORMALS, SHOW_ELEMENT_TEXTURE, SHOW_ELEMENTS, SHOW_INDICES, SHOW_NAME, SHOW_OUTLINE, SHOW_POLYGON_COLORS, SHOW_POLYGON_END_ARROW, SHOW_POLYGON_LABELS, SHOW_POLYGON_NORMAL_ARROW, SHOW_POLYGON_NORMALS, SHOW_POLYGON_SIZES, SHOW_POLYGON_START_ARROW, SHOW_POLYGONS, SHOW_SILHOUETTE, SHOW_SMOOTH_EDGE_COLORS, SHOW_SMOOTH_ELEMENT_COLORS, SHOW_SMOOTH_LIGHTING, SHOW_SMOOTH_SHADING, SHOW_TAGGED_BOUNDARIES, SHOW_TAGGED_EDGES, SHOW_TAGGED_ELEMENTS, SHOW_TAGGED_POLYGONS, SHOW_TAGGED_VERTICES, SHOW_TEXTURE_BACK, SHOW_TEXTURE_FRONT, SHOW_TITLE, SHOW_TRANSPARENCY, SHOW_VECTOR_ARROWS, SHOW_VECTOR_COLORS, SHOW_VECTORS, SHOW_VERTEX_COLORS, SHOW_VERTEX_LABELS, SHOW_VERTEX_NORMAL_ARROW, SHOW_VERTEX_NORMALS, SHOW_VERTEX_OUTLINE, SHOW_VERTEX_SIZES, SHOW_VERTEX_TEXTURE, SHOW_VERTICES, USER_BIT
-
Fields inherited from interface jv.project.PgGeometryIf
AMBIENT_H2_HYPERBOLIC, AMBIENT_H3_HYPERBOLIC, AMBIENT_H4_HYPERBOLIC, AMBIENT_PROJECTIONS, AMBIENT_R1_EUCLIDEAN, AMBIENT_R2_EUCLIDEAN, AMBIENT_R3_EUCLIDEAN, AMBIENT_R4_EUCLIDEAN, AMBIENT_R5_EUCLIDEAN, AMBIENT_S1_SPHERE, AMBIENT_S2_SPHERE, AMBIENT_S3_SPHERE, AMBIENT_S4_SPHERE, AMBIENT_SPACES, BLEND_ALPHA, BLEND_MATERIAL, BLEND_REPLACE, FILTER_DIRECT, FILTER_LINEAR, FILTER_QUADRATIC, HAS_METHOD_MENU, INSPECTOR_CONTROL, INSPECTOR_CONTROL_EXT, INSPECTOR_MATERIAL, INSPECTOR_MATERIAL_EXT, INSPECTOR_TEXTURE, INSPECTOR_TEXTURE_EXT, LABEL_BASE, LABEL_CENTER, LABEL_HEAD, LABEL_MIDDLE, LABEL_TAIL, LABEL_TOP, m_numLabelTypes, METHOD_EXT, PERIODIC_BOTH, PERIODIC_HEIGHT, PERIODIC_NONE, PERIODIC_WIDTH, PROJ_KLEIN_BALL, PROJ_PARALLEL, PROJ_POINCARE_BALL, PROJ_STEREOGRAPHIC, PROJ_UPPER_HALFSPACE, SIDE_BACK, SIDE_BOTH, SIDE_FRONT, SIDE_NONE
-
-
Constructor Summary
Constructors Constructor and Description PvGeometry(int dim)Constructor with dimension of vertices.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intaddPolygon(PiVector aPolygon)Increment the number of polygons and add given polygon.voidassureElementNormals()Assures respectively allocates correct length of transformed element normal array.voidassureVertexNormals()Assures respectively allocates correct length of transformed element normal array.voidclearTagElement(int anIndex, int aTag)Method does nothing and may be overridden by subclasses.voidclearTagPolygon(int anIndex, int aTag)Method does nothing and may be overridden by subclasses.voidclearTagVertex(int anIndex, int aTag)Clear a single tag of a vertex.voiddrawSpline(java.awt.Graphics g, int x1, int y1, int z1, int x2, int y2, int z2, int x3, int y3, int z3)Draw a three-point spline.PdVector[]getBounds(boolean bScene)Compute bounding box if geometry has number of vertices, otherwise return null.intgetDrawingOrder()Get position of geometry in z-direction in display.PgGeometryIfgetGeometry()Get geometry managed by this geometry container.booleangetState(int aKey)Method only partially implemented.booleanhasTagElement(int anIndex, int aTag)Method does nothing and may be overridden by subclasses.booleanhasTagPolygon(int anIndex, int aTag)Method does nothing and may be overridden by subclasses.booleanhasTagVertex(int anIndex, int aTag)Check whether vertex has given tag.voidinit()Initializes and resets geometry.booleanisSpecial()Check if this geometry is a special geometry, for example, bounding box or light.voidprojectItems(PdMatrix projviewMat, PdMatrix projMat, PdMatrix viewMat, PdMatrix modelMat)HACK Made public for JOGL test.voidsetAmbientMatrix(PdMatrix ambientMat, PdMatrix ambientInvMat)Set ambient model matrix of geometry to copy of argument matrix.voidsetDimOfVertices(int dim)Assign dimension of vertices.voidsetDrawingOrder(int pos)Set position of geometry in z-direction in display.voidsetElementNormals(PdVector[] normalList)Method uses superclass to assign and remove element normals, but during removal also removes also the transformed element normels.voidsetGeometry(PgGeometryIf aGeometry)Set geometry to be displayed.voidsetGlobalBndSize(double aSize)Assign global boundary thickness.voidsetGlobalEdgeSize(double aSize)Assign global edge thickness.voidsetGlobalElementNormalSize(double aSize)Set global thickness of element normal vectors.voidsetGlobalPolygonNormalSize(double aSize)Set global thickness of polygon normal vectors.voidsetGlobalPolygonSize(double aSize)Assign global polygon thickness.voidsetGlobalVertexNormalSize(double aSize)Set global thickness of vertex normal vectors.booleansetLabelAttributes(PiVector[] attr)Set offset vector in pixel coordinates of label w.r.t. base point.voidsetLabelColors(java.awt.Color[] col)Set color of all different label type.voidsetLabelFonts(java.lang.String[] name)Set font sizes of all label types.voidsetLabelSizes(PdVector size)Set font sizes of all label types.voidsetLabelStyles(PiVector style)Set font styles of all label types.voidsetModelMatrix(PdMatrix modelMat)Set model matrix of geometry to copy of argument matrix.voidsetNumVectorFields(int num)Set number of allocated and used vector fields.voidsetNumVectors(int ind, int num, int dimOfVectors)Set number of vectors of a vector field with given index.voidsetPolygons(PiVector[] polygon)Copy the first m_numPolygons of given array into polygon array.voidsetSpecial(boolean flag)Set status that this geometry is a special geometry, for example, bounding box or light.voidsetSpecularColor(java.awt.Color col)Set specular color of geometry.voidsetState(int aKey, boolean state)Set drawing flags of the geometry.voidsetStateFromDisplay(int aKey, boolean state)Set drawing flags of the geometry from display.voidsetTagElement(int anIndex, int aTag)Method does nothing and may be overridden by subclasses.voidsetTagPolygon(int anIndex, int aTag)Method does nothing and may be overridden by subclasses.voidsetTagVertex(int anIndex, int aTag)Set a tag of a vertex.voidsetTexture(int[] texturePix, int width, int height, int blendingMode, int filteringType)Set texture image as array of pixels and image dimensions with no multiple repetition.voidsetTexture(int[] texturePix, int width, int height, int tilingWidth, int tilingHeight, int periodic, int blendingMode, int filteringType, int textureSide)Set texture image as array of pixels and image dimensions with multiple repetition.voidsetTransparency(double trans)Transparency is in [0, 1.] where 0. corresponds to opaque and 1. to fully transparent.voidsetVertexNormals(PdVector[] normalList)Method uses superclass to assign and remove vertex normals, but during removal also removes also the transformed vertex normels.voidsetVisible(boolean flag)Show or hide geometry in display.booleanupdate(java.lang.Object event)Update this container geometry whenever the contained geometry has changed.-
Methods inherited from class jv.project.PgJvxSrc
addElement, addVertex, assureEdgeColors, assureEdgeSizes, assureElementBackColors, assureElementColors, assureElementEdges, assureElementTextures, assureNeighbours, assurePolygonColors, assurePolygonNormals, assurePolygonSizes, assureVectorColors, assureVertexColors, assureVertexSizes, assureVertexTextures, clone, copy, getAmbientBounds, getBlendingMode, getBndColor, getBndElementInd, getBndName, getBndNeighbourLocInd, getBndNumVertices, getBndSize, getBndVertexInd, getBndVertices, getBounds, getCreaseAngle, getDimOfElements, getDimOfPolygons, getDimOfTextures, getDimOfVectors, getEdgeColors, getEdges, getEdgeSizes, getElement, getElementBackColors, getElementColors, getElementEdges, getElementNormals, getElements, getElementTextures, getFilterType, getGlobalBndColor, getGlobalBndSize, getGlobalBndTagColor, getGlobalEdgeColor, getGlobalEdgeNormalColor, getGlobalEdgeNormalLength, getGlobalEdgeNormalSize, getGlobalEdgeSize, getGlobalEdgeTagColor, getGlobalElementBackColor, getGlobalElementColor, getGlobalElementNormalColor, getGlobalElementNormalLength, getGlobalElementNormalSize, getGlobalElementTagColor, getGlobalPolygonColor, getGlobalPolygonNormalColor, getGlobalPolygonNormalLength, getGlobalPolygonNormalSize, getGlobalPolygonSize, getGlobalPolygonTagColor, getGlobalVectorColor, getGlobalVectorLength, getGlobalVectorSize, getGlobalVertexColor, getGlobalVertexNormalColor, getGlobalVertexNormalLength, getGlobalVertexNormalSize, getGlobalVertexSize, getGlobalVertexTagColor, getJvx, getNeighbours, getNumBndPolygons, getNumEdges, getNumElements, getNumPolygons, getNumVectorFields, getNumVectors, getNumVertices, getPolygon, getPolygonColors, getPolygonNormals, getPolygons, getPolygonSizes, getShininess, getSpecularColor, getTextureImage, getTextureImageBnd, getTextureImageName, getTexturePeriodic, getTextureSide, getTextureTiling, getTransparency, getVectorFieldColors, getVectorFieldName, getVectors, getVertex, getVertexColors, getVertexFunctions, getVertexNormals, getVertexSizes, getVertexTextures, getVertices, hasEdgeColors, hasElementBackColors, hasElementColors, hasElementNormals, hasElementTextures, hasPolygonColors, hasPolygonNormals, hasVertexColors, hasVertexNormals, hasVertexSizes, hasVertexTextures, isDefaultLabelEnabled, isEnabledIndexLabels, isShowingBackface, isShowingBnd, isShowingBndMaterials, isShowingBoundaries, isShowingEdgeColorFromElements, isShowingEdgeColorFromVertices, isShowingEdgeColors, isShowingEdgeLabels, isShowingEdges, isShowingEdgeSizes, isShowingElementBackColor, isShowingElementBackColors, isShowingElementColorFromVertices, isShowingElementColors, isShowingElementFromVertexColors, isShowingElementLabels, isShowingElementNormalArrow, isShowingElementNormals, isShowingElements, isShowingElementTexture, isShowingIndices, isShowingIndividualMaterial, isShowingPolygonColors, isShowingPolygonEndArrow, isShowingPolygonLabels, isShowingPolygonNormalArrow, isShowingPolygonNormals, isShowingPolygons, isShowingPolygonSizes, isShowingPolygonStartArrow, isShowingSilhouette, isShowingSmoothEdgeColors, isShowingSmoothElementColors, isShowingSmoothLighting, isShowingTaggedElements, isShowingTaggedPolygons, isShowingTaggedVertices, isShowingTransparency, isShowingVectorArrows, isShowingVectorColors, isShowingVectorField, isShowingVectorFieldMaterials, isShowingVectorFields, isShowingVertexColors, isShowingVertexLabels, isShowingVertexNormalArrow, isShowingVertexNormals, isShowingVertexOutline, isShowingVertexSizes, isShowingVertexTexture, isShowingVertices, isVectorElementBased, makeElementColorsFromXYZ, makeElementFromVertexColors, makeElementNormals, makeQuadrConn, makeVertexNormals, paint, reflect, removePolygonSizes, setBlendingMode, setBndColor, setBndElementInd, setBndName, setBndNeighbourLocInd, setBndNumVertices, setBndSize, setBndVertexInd, setBndVertices, setCreaseAngle, setDefaultLabelEnabled, setDimOfElements, setDimOfPolygons, setDimOfTextures, setEdgeColors, setEdges, setEdgeSizes, setElement, setElementBackColors, setElementColors, setElementEdges, setElements, setElementTextures, setEnabledIndexLabels, setFilterType, setGlobalBndColor, setGlobalBndTagColor, setGlobalEdgeColor, setGlobalEdgeNormalColor, setGlobalEdgeNormalLength, setGlobalEdgeNormalSize, setGlobalEdgeTagColor, setGlobalElementBackColor, setGlobalElementColor, setGlobalElementNormalColor, setGlobalElementNormalLength, setGlobalElementTagColor, setGlobalPolygonColor, setGlobalPolygonNormalColor, setGlobalPolygonNormalLength, setGlobalPolygonTagColor, setGlobalVectorColor, setGlobalVectorLength, setGlobalVectorSize, setGlobalVertexColor, setGlobalVertexNormalColor, setGlobalVertexNormalLength, setGlobalVertexSize, setGlobalVertexTagColor, setJvx, setNeighbours, setNumBndPolygons, setNumEdges, setNumElements, setNumPolygons, setNumVertices, setPolygon, setPolygonColors, setPolygonNormals, setPolygonSizes, setShininess, setTextureImage, setTextureImageBnd, setTextureImageName, setTexturePeriodic, setTextureSide, setTextureTiling, setVectorColors, setVectorElementBased, setVectorFieldName, setVectors, setVertex, setVertexColors, setVertexFunctions, setVertexSizes, setVertexTextures, setVertices, showBackface, showBnd, showBndMaterials, showBoundaries, showEdgeColorFromElements, showEdgeColorFromVertices, showEdgeColors, showEdgeLabels, showEdges, showEdgeSizes, showElementBackColor, showElementBackColors, showElementColorFromVertices, showElementColors, showElementFromVertexColors, showElementLabels, showElementNormalArrow, showElementNormals, showElements, showElementTexture, showIndices, showIndividualMaterial, showPolygonColors, showPolygonEndArrow, showPolygonLabels, showPolygonNormalArrow, showPolygonNormals, showPolygons, showPolygonSizes, showPolygonStartArrow, showSilhouette, showSmoothEdgeColors, showSmoothElementColors, showSmoothLighting, showTaggedElements, showTaggedPolygons, showTaggedVertices, showTransparency, showVectorArrows, showVectorColors, showVectorField, showVectorFieldMaterials, showVectorFields, showVertexColors, showVertexLabels, showVertexNormalArrow, showVertexNormals, showVertexOutline, showVertexSizes, showVertexTexture, showVertices
-
Methods inherited from class jv.project.PgGeometry
addDisplay, applyAmbientMatrix, applyModelingMatrix, blend, convertWorldToModel, copy, fillMethodMenu, fillMethodMenu, getAmbientInvMatrix, getAmbientMatrix, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplayList, getDisplays, getGeometryInfo, getLabelAttribute, getLabelColor, getLabelFont, getLabelSize, getLabelStyle, getMaterialPanel, getModelMatrix, getTitle, getType, getVersion, getVersionType, hasAmbientMatrix, hasDisplay, hasModelMatrix, intersectionWithLine, isConfigurable, isEnabledInstanceSharing, isShowingBndBox, isShowingCenter, isShowingName, isShowingTitle, isVisible, merge, projectFromAmbientSpace, removeDisplay, removeElement, removeMethodMenus, removePolygon, removeVertex, setAmbientProjection, setAmbientSpace, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setEnabledInstanceSharing, setGeometryInfo, setLabelAttribute, setLabelAttribute, setLabelColor, setLabelFont, setLabelSize, setLabelStyle, setTitle, setType, setVersion, setVersionType, showBndBox, showCenter, showName, showTitle, toString
-
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.PvGeometryIf
getAmbientProjection, getAmbientSpace, isVisible, setAmbientProjection, setAmbientSpace, setBndColor, setBndElementInd, setBndName, setBndNeighbourLocInd, setBndSize, setCenter, setCreaseAngle, setDimOfElements, setDimOfPolygons, setEdgeColors, setEdges, setEdgeSizes, setElementBackColors, setElementColors, setElementEdges, setElements, setElementTextures, setGlobalBndColor, setGlobalBndTagColor, setGlobalEdgeColor, setGlobalEdgeTagColor, setGlobalElementBackColor, setGlobalElementColor, setGlobalElementNormalColor, setGlobalElementNormalLength, setGlobalElementTagColor, setGlobalPolygonColor, setGlobalPolygonNormalColor, setGlobalPolygonNormalLength, setGlobalPolygonTagColor, setGlobalVectorColor, setGlobalVectorLength, setGlobalVectorSize, setGlobalVertexColor, setGlobalVertexNormalColor, setGlobalVertexNormalLength, setGlobalVertexSize, setGlobalVertexTagColor, setNeighbours, setNumBndPolygons, setNumEdges, setNumElements, setNumPolygons, setNumVertices, setPolygonColors, setPolygonNormals, setPolygonSizes, setShininess, setVectorColors, setVectorElementBased, setVectors, setVertexColors, setVertexSizes, setVertexTextures, setVertices, showBnd, showBndMaterials, showVectorArrows, showVectorColors, showVectorField, showVectorFields
-
Methods inherited from interface jv.project.PgGeometryIf
assureInspector, getInfoPanel, getName, hasTag, setName
-
Methods inherited from interface jv.object.PsUpdateIf
getFather, setParent
-
-
-
-
Field Detail
-
m_bPerspectivity
public boolean m_bPerspectivity
HACK JOGL Flag if perspectivity is enabled.
-
-
Method Detail
-
init
public void init()
Description copied from class:PgJvxSrcInitializes and resets geometry.- Specified by:
initin interfacePvGeometryIf- Overrides:
initin classPgJvxSrc
-
setDimOfVertices
public void setDimOfVertices(int dim)
Description copied from class:PgJvxSrcAssign dimension of vertices. This method only adjusts the size of vertices, and for example, not of vectors. Note, this class is not intended for changing the geometry data once it is assigned.- Specified by:
setDimOfVerticesin interfacePvGeometryIf- Overrides:
setDimOfVerticesin classPgJvxSrc
-
setLabelAttributes
public boolean setLabelAttributes(PiVector[] attr)
Set offset vector in pixel coordinates of label w.r.t. base point. Third component is in [1..3] and indices whether head, center or tail is located at base+offset. Note, (0,0) is in the upper left corner of the screen.- Specified by:
setLabelAttributesin interfacePvGeometryIf- Parameters:
attr- vector with label attributes of all label types.
-
setLabelColors
public void setLabelColors(java.awt.Color[] col)
Set color of all different label type.- Specified by:
setLabelColorsin interfacePvGeometryIf- Parameters:
col- color of all label types.- Version:
- 22.01.04, 1.00 created (kp) since JavaView 3.05.003
-
setLabelSizes
public void setLabelSizes(PdVector size)
Set font sizes of all label types.- Specified by:
setLabelSizesin interfacePvGeometryIf- Parameters:
size- Vector with font sizes- Since:
- JavaView 3.52.002
- Version:
- 15.08.04, 1.00 created (kp)
-
setLabelStyles
public void setLabelStyles(PiVector style)
Set font styles of all label types.- Specified by:
setLabelStylesin interfacePvGeometryIf- Parameters:
style- Vector with font sizes- Since:
- JavaView 3.52.002
- Version:
- 15.08.04, 1.00 created (kp)
-
setLabelFonts
public void setLabelFonts(java.lang.String[] name)
Set font sizes of all label types.- Specified by:
setLabelFontsin interfacePvGeometryIf- Parameters:
name- Array with font names- Since:
- JavaView 3.52.002
- Version:
- 15.08.04, 1.00 created (kp)
-
setVisible
public void setVisible(boolean flag)
Show or hide geometry in display.- Specified by:
setVisiblein interfacePgGeometryIf- Specified by:
setVisiblein interfacePvGeometryIf- Overrides:
setVisiblein classPgGeometry- See Also:
PgGeometry.isVisible()
-
getDrawingOrder
public int getDrawingOrder()
Get position of geometry in z-direction in display. Possible values: BACK, STANDARD, FRONT Currently, only the set of item from geometries of type STANDARD are z-sorted.- Specified by:
getDrawingOrderin interfacePvGeometryIf
-
setDrawingOrder
public void setDrawingOrder(int pos)
Set position of geometry in z-direction in display. Possible values: BACK, STANDARD, FRONT Currently, only the set of item from geometries of type STANDARD are z-sorted.- Specified by:
setDrawingOrderin interfacePvGeometryIf
-
isSpecial
public boolean isSpecial()
Check if this geometry is a special geometry, for example, bounding box or light.- Returns:
- true if this geometry is special
-
setSpecial
public void setSpecial(boolean flag)
Set status that this geometry is a special geometry, for example, bounding box or light.- Parameters:
flag- true if this geometry is special
-
setGeometry
public void setGeometry(PgGeometryIf aGeometry)
Set geometry to be displayed. Name of current container is set to name of geometry with suffix "_Container".- Specified by:
setGeometryin interfacePvGeometryIf
-
getGeometry
public PgGeometryIf getGeometry()
Get geometry managed by this geometry container.- Specified by:
getGeometryin interfacePvGeometryIf
-
getState
public boolean getState(int aKey)
Method only partially implemented.- Overrides:
getStatein classPgGeometry- Parameters:
aKey- flag to be set, choose among PvGeometryIf.SHOW_...- Returns:
- boolean state of this key
-
setState
public void setState(int aKey, boolean state)Set drawing flags of the geometry. TODO: create a BitSet for all these flags.- Specified by:
setStatein interfacePgGeometryIf- Specified by:
setStatein interfacePvGeometryIf- Overrides:
setStatein classPgJvxSrc- Parameters:
aKey- flag to be set, choose among PvGeometryIf.SHOW_...state- enable or disable state
-
setStateFromDisplay
public void setStateFromDisplay(int aKey, boolean state)Set drawing flags of the geometry from display.
-
getBounds
public PdVector[] getBounds(boolean bScene)
Compute bounding box if geometry has number of vertices, otherwise return null. This methods assigns the internal instance variable m_bndBox which is used, for example, to place the title of a geometry.
-
clearTagVertex
public void clearTagVertex(int anIndex, int aTag)Description copied from class:PgJvxSrcClear a single tag of a vertex. For possible tags seePvGeometryIf.- Specified by:
clearTagVertexin interfacePgGeometryIf- Overrides:
clearTagVertexin classPgJvxSrc
-
hasTagVertex
public boolean hasTagVertex(int anIndex, int aTag)Description copied from class:PgJvxSrcCheck whether vertex has given tag. For possible tags seePvGeometryIf.- Specified by:
hasTagVertexin interfacePgGeometryIf- Overrides:
hasTagVertexin classPgJvxSrc
-
setTagVertex
public void setTagVertex(int anIndex, int aTag)Description copied from class:PgJvxSrcSet a tag of a vertex. For possible tags seePvGeometryIf.- Specified by:
setTagVertexin interfacePgGeometryIf- Overrides:
setTagVertexin classPgJvxSrc
-
clearTagPolygon
public void clearTagPolygon(int anIndex, int aTag)Description copied from class:PgGeometryMethod does nothing and may be overridden by subclasses.- Specified by:
clearTagPolygonin interfacePgGeometryIf- Overrides:
clearTagPolygonin classPgGeometry
-
hasTagPolygon
public boolean hasTagPolygon(int anIndex, int aTag)Description copied from class:PgGeometryMethod does nothing and may be overridden by subclasses.- Specified by:
hasTagPolygonin interfacePgGeometryIf- Overrides:
hasTagPolygonin classPgGeometry
-
setTagPolygon
public void setTagPolygon(int anIndex, int aTag)Description copied from class:PgGeometryMethod does nothing and may be overridden by subclasses.- Specified by:
setTagPolygonin interfacePgGeometryIf- Overrides:
setTagPolygonin classPgGeometry
-
clearTagElement
public void clearTagElement(int anIndex, int aTag)Description copied from class:PgGeometryMethod does nothing and may be overridden by subclasses.- Specified by:
clearTagElementin interfacePgGeometryIf- Overrides:
clearTagElementin classPgGeometry
-
hasTagElement
public boolean hasTagElement(int anIndex, int aTag)Description copied from class:PgGeometryMethod does nothing and may be overridden by subclasses.- Specified by:
hasTagElementin interfacePgGeometryIf- Overrides:
hasTagElementin classPgGeometry
-
setTagElement
public void setTagElement(int anIndex, int aTag)Description copied from class:PgGeometryMethod does nothing and may be overridden by subclasses.- Specified by:
setTagElementin interfacePgGeometryIf- Overrides:
setTagElementin classPgGeometry
-
update
public boolean update(java.lang.Object event)
Update this container geometry whenever the contained geometry has changed.- Specified by:
updatein interfacePsUpdateIf- Specified by:
updatein interfacePvGeometryIf- Overrides:
updatein classPgGeometry- 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)- Version:
- 17.03.05, 1.20 revised (kp) Check if polygon or element indices refer to existing vertices.
22.02.01, 1.10 revised (kp) Moved setting of bHasTagged... flags to this method from projectItems().
-
setSpecularColor
public void setSpecularColor(java.awt.Color col)
Set specular color of geometry.- Specified by:
setSpecularColorin interfacePvGeometryIf- Overrides:
setSpecularColorin classPgJvxSrc
-
drawSpline
public void drawSpline(java.awt.Graphics g, int x1, int y1, int z1, int x2, int y2, int z2, int x3, int y3, int z3)Draw a three-point spline.
-
setTexture
public void setTexture(int[] texturePix, int width, int height, int blendingMode, int filteringType)Set texture image as array of pixels and image dimensions with no multiple repetition.- Specified by:
setTexturein interfacePvGeometryIf- See Also:
setTexture(int [], int, int, int, int, int, int, int, int)- Version:
- 15.11.00, 1.10 revised (kp) Reset texture flags if null image passed.
-
setTexture
public void setTexture(int[] texturePix, int width, int height, int tilingWidth, int tilingHeight, int periodic, int blendingMode, int filteringType, int textureSide)Set texture image as array of pixels and image dimensions with multiple repetition.- Specified by:
setTexturein interfacePvGeometryIf- Since:
- JavaView 3.96.012
- See Also:
setTexture(int [], int, int, int, int)- Version:
- 18.06.06, 2.10 revised (kp) Parameter textureSide added.
04.06.06, 2.00 created (kp) Created from body of setTexture(int[],int,int,int,int).
15.11.00, 1.10 revised (kp) Reset texture flags if null image passed.
-
setTransparency
public void setTransparency(double trans)
Transparency is in [0, 1.] where 0. corresponds to opaque and 1. to fully transparent.- Specified by:
setTransparencyin interfacePvGeometryIf- Overrides:
setTransparencyin classPgJvxSrc
-
projectItems
public void projectItems(PdMatrix projviewMat, PdMatrix projMat, PdMatrix viewMat, PdMatrix modelMat)
HACK Made public for JOGL test.
-
setModelMatrix
public void setModelMatrix(PdMatrix modelMat)
Set model matrix of geometry to copy of argument matrix. If argument isnullthen model matrix is removed.- Specified by:
setModelMatrixin interfacePgGeometryIf- Specified by:
setModelMatrixin interfacePvGeometryIf- Overrides:
setModelMatrixin classPgGeometry
-
setAmbientMatrix
public void setAmbientMatrix(PdMatrix ambientMat, PdMatrix ambientInvMat)
Set ambient model matrix of geometry to copy of argument matrix. If argument isnullthen ambient model matrix is removed.- Specified by:
setAmbientMatrixin interfacePgGeometryIf- Specified by:
setAmbientMatrixin interfacePvGeometryIf- Overrides:
setAmbientMatrixin classPgGeometry
-
setGlobalVertexNormalSize
public void setGlobalVertexNormalSize(double aSize)
Set global thickness of vertex normal vectors.- Specified by:
setGlobalVertexNormalSizein interfacePvGeometryIf- Overrides:
setGlobalVertexNormalSizein classPgJvxSrc
-
setGlobalPolygonNormalSize
public void setGlobalPolygonNormalSize(double aSize)
Set global thickness of polygon normal vectors.- Specified by:
setGlobalPolygonNormalSizein interfacePvGeometryIf- Overrides:
setGlobalPolygonNormalSizein classPgJvxSrc
-
setGlobalElementNormalSize
public void setGlobalElementNormalSize(double aSize)
Set global thickness of element normal vectors.- Specified by:
setGlobalElementNormalSizein interfacePvGeometryIf- Overrides:
setGlobalElementNormalSizein classPgJvxSrc
-
setGlobalPolygonSize
public void setGlobalPolygonSize(double aSize)
Assign global polygon thickness.- Specified by:
setGlobalPolygonSizein interfacePvGeometryIf- Overrides:
setGlobalPolygonSizein classPgJvxSrc
-
setGlobalEdgeSize
public void setGlobalEdgeSize(double aSize)
Assign global edge thickness.- Specified by:
setGlobalEdgeSizein interfacePvGeometryIf- Overrides:
setGlobalEdgeSizein classPgJvxSrc
-
setGlobalBndSize
public void setGlobalBndSize(double aSize)
Assign global boundary thickness.- Specified by:
setGlobalBndSizein interfacePvGeometryIf- Overrides:
setGlobalBndSizein classPgJvxSrc
-
setPolygons
public void setPolygons(PiVector[] polygon)
Copy the first m_numPolygons of given array into polygon array. Must callsetNumPolygons(int)before to allocate argument array. If argument array too small do nothing.- Specified by:
setPolygonsin interfacePvGeometryIf- Overrides:
setPolygonsin classPgJvxSrc- Parameters:
polygon- array of polygon vectors to be copied
-
addPolygon
public int addPolygon(PiVector aPolygon)
Increment the number of polygons and add given polygon.- Specified by:
addPolygonin interfacePgGeometryIf- Overrides:
addPolygonin classPgJvxSrc- Parameters:
aPolygon- polygon to be added to polygon list- Returns:
- int index of added polygon in polygon list
-
setVertexNormals
public void setVertexNormals(PdVector[] normalList)
Method uses superclass to assign and remove vertex normals, but during removal also removes also the transformed vertex normels.- Specified by:
setVertexNormalsin interfacePvGeometryIf- Overrides:
setVertexNormalsin classPgJvxSrc- Parameters:
normalList- array with new vertex normals, or null.- Since:
- JavaView 3.07.001
- Version:
- 30.01.04, 1.00 created (kp)
-
assureVertexNormals
public void assureVertexNormals()
Assures respectively allocates correct length of transformed element normal array. Length of array is equal to length of element array. Dimension of normal vectors is equal to dimension of transformed vertices.- Overrides:
assureVertexNormalsin classPgJvxSrc
-
setElementNormals
public void setElementNormals(PdVector[] normalList)
Method uses superclass to assign and remove element normals, but during removal also removes also the transformed element normels.- Specified by:
setElementNormalsin interfacePvGeometryIf- Overrides:
setElementNormalsin classPgJvxSrc- Parameters:
normalList- array with new element normals, or null.- Since:
- JavaView 3.07.001
- Version:
- 30.01.04, 1.00 created (kp)
-
assureElementNormals
public void assureElementNormals()
Assures respectively allocates correct length of transformed element normal array. Length of array is equal to length of element array. Dimension of normal vectors is equal to dimension of transformed vertices.- Overrides:
assureElementNormalsin classPgJvxSrc
-
setNumVectorFields
public void setNumVectorFields(int num)
Set number of allocated and used vector fields. This methods calls the same method of superclass, and allocates arrays for projected vectors.- Specified by:
setNumVectorFieldsin interfacePvGeometryIf- Overrides:
setNumVectorFieldsin classPgJvxSrc- Parameters:
num- number of vector fields
-
setNumVectors
public void setNumVectors(int ind, int num, int dimOfVectors)Set number of vectors of a vector field with given index. After calling same method of superclass, we allocate space for the projected vectors.- Specified by:
setNumVectorsin interfacePvGeometryIf- Overrides:
setNumVectorsin classPgJvxSrc- Parameters:
ind- index of vector fieldnum- number of vectors in that vector fielddimOfVectors- dim of vectors in that vector field
-
-
"