vgp.surface.common
Class PgSurface
- java.lang.Object
-
- jv.object.PsObject
-
- jv.project.PgGeometry
-
- jv.geom.PgPointSet
-
- jv.geom.PgElementSet
-
- vgp.surface.common.PgSurface
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf
- Direct Known Subclasses:
- PgKleinBottle
public class PgSurface extends PgElementSet
Computes parameterized surfaces defined by a surface descriptor. Surface is not constrained to 3D Euclidean space but may lie in spaces like the 3-sphere, 3-hyperbolic space, or a higher dimensional Euclidean space.- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 04.08.03, 1.20 revised (kp) Clone and copy implemented.
06.05.01, 1.10 revised (kp) Ambient space settings forwarded to descriptor.
11.06.99, 1.02 revised (ep) computeSurface: argument removed.
09.06.99, 1.01 revised (kp) Always check whether descriptor is available.
07.12.98, 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
-
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 PgSurface()Constructor of a parametrized surface in three-dimensional space.PgSurface(int dim)Constructor of a parametrized surface with vertex dimension.
-
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.voidcomputeSurface()Recompute surface using current descriptor.voidcopy(PsObject object)Copy instance variables by duplication, not by copying a reference.PgSurfaceDescrgetDescr()Get the descriptor of this surface.booleangetDiamondDirection()Check if diamond is oriented in u- or v-direction.voidinit()Initialize and reset instance variables after call to super.init().booleanisEnabledAlternateGrid()Check if ordinary uv-mesh and diamond mesh is enabled where every other row is shifted.booleanisEnabledDualGrid()Check if dual grid is enabled.voidsetAmbientProjection(int mode)Set projection mode of ambient space used in model transformations.voidsetAmbientSpace(int mode)Set ambient space used in model transformations.voidsetDescr(PgSurfaceDescr descr)Assign a surface descriptor which completely describes this surface.voidsetDiamondDirection(boolean bDirection)Determine if diamond is oriented in u- or v-direction.voidsetEnabledAlternateGrid(boolean bAlternate)Switch among ordinary uv-mesh to diamond mesh where every other row is shifted.voidsetEnabledDualGrid(boolean bDualGrid)Determine if dual grid is enabled.booleansetSurface(int surfaceID)Creates a surface descriptor and assign it using setDescr(PgSurfaceDescr descr).booleansetSurfaceName(java.lang.String aSurface, java.lang.String baseSurfaceName)Creates a surface descriptor and assign it using setDescr(PgSurfaceDescr descr).booleanupdate(java.lang.Object event)Update the class whenever a child has changed.-
Methods inherited from class jv.geom.PgElementSet
addElement, addElement, allocateEdgeStars, applyModelingMatrix, assureBoundary, assureDimOfElements, assureEdgeColors, assureEdgeSizes, assureElementBackColors, assureElementColors, assureElementNormals, assureElementTextures, blend, buildPolygon, buildQuadr, buildQuadrFromCurve, buildTriangle, buildTriangleFromCurve, checkNeighbour, checkNeighbour, clearTagElement, close, computeCone, computeCylinder, computeDisk, computePlane, computeRotation, computeSnail, computeSphere, computeTorus, copyConnectivity, copyConnectivitySelect, copyElementSet, copyElementSetSelect, copySelect, fixBoundaries, flipEdges, flipOrientation, getArea, getAreaOfElement, getBoundaries, getCenterOfElement, getCreaseAngle, getDimOfElement, getDimOfElements, getEdge, getEdge, getEdgeColors, getEdgeLength, getEdgeSizes, getEdgeStar, getEdgeStars, getElement, getElementBackColor, getElementBackColors, getElementColor, getElementColors, getElementEdge, getElementEdges, getElementNormal, getElementNormals, getElements, getElementTexture, getElementTextures, getElementVertices, getElementWithVertex, getFVector, getGlobalBndColor, getGlobalBndSize, getGlobalBndTagColor, getGlobalEdgeColor, getGlobalEdgeSize, getGlobalEdgeTagColor, getGlobalElementBackColor, getGlobalElementColor, getGlobalElementNormalColor, getGlobalElementNormalLength, getGlobalElementNormalSize, getGlobalElementTagColor, getIndexOfBndPolygon, getJvx, getL2Matrix, getL2Norm, getMaxDimOfElements, getMaxNumElements, getNeighbour, getNeighbourLocInd, getNeighbours, getNumBoundaries, getNumBoundaryEdges, getNumBoundaryVertices, getNumEdges, getNumEdgeStars, getNumElementIndices, getNumElements, getNumUnusedVertices, getOppVertexInd, getOppVertexLocInd, getSavedElements, getSavedNumVertices, getSelectedBndPolygon, getVertexAngle, getVertexTextures, getVertexValence, getVolume, getVolumeOfElement, hasBoundary, hasEdgeColors, hasEdgeSizes, hasElementBackColors, hasElementColors, hasElementNormals, hasElementTextures, hasTagElement, intersectionWithLine, isConforming, isEnabledEdges, isShowingBackface, isShowingBoundaries, isShowingEdgeColorFromElements, isShowingEdgeColorFromVertices, isShowingEdgeColors, isShowingEdgeLabels, isShowingEdges, isShowingEdgeSizes, isShowingElementBackColor, isShowingElementBackColors, isShowingElementColorFromVertices, isShowingElementColors, isShowingElementFromVertexColors, isShowingElementLabels, isShowingElementNormalArrow, isShowingElementNormals, isShowingElements, isShowingElementTexture, isShowingElementTextures, isShowingSilhouette, isShowingSmoothEdgeColors, isShowingSmoothElementColors, isShowingSmoothLighting, isShowingTaggedBoundaries, isShowingTaggedEdges, isShowingTaggedElements, makeAlternatingQuadrConn, makeCylinderConn, makeEdgeStars, makeEdgeStarsFromNeighbour, makeElementColorsFromNormal, makeElementColorsFromXYZ, makeElementColorsFromZ, makeElementColorsFromZHue, makeElementFromVertexColors, makeElementFromVertexTexture, makeElementNormals, makeNeighbour, makeQuadrBnd, makeQuadrConn, makeQuadrElementTexture, makeTriangleBnd, makeTriangleConn, makeVertexFromElementColors, makeVertexNormals, markBoundary, merge, paint, printEdgeList, projectFromAmbientSpace, refineGlobalIntoFour, refineGlobalIntoFour, reflect, removeBoundaries, removeDeletedBoundaries, removeEdgeColors, removeEdgeSizes, removeElement, removeElementBackColors, removeElementColors, removeElementEdges, removeElementNormals, removeMarkedElements, removeMarkedVertices, removeTexture, removeUnusedVertices, resetBoundaryNormals, selectBndPolygon, setBoundary, setConforming, setCreaseAngle, setDimOfColors, setDimOfElement, setDimOfElements, setDimOfVectors, setDimOfVertices, setEdgeColors, setEdgeSizes, setEdgeStar, setElement, setElement, setElement, setElement, setElementBackColor, setElementBackColors, setElementColor, setElementColors, setElementEdges, setElementNormal, setElementNormals, setElements, setElementTexture, setElementTextures, setElementTexturesFromList, setElementVertices, setEnabledEdges, setGlobalBndColor, setGlobalBndSize, setGlobalBndTagColor, setGlobalEdgeColor, setGlobalEdgeSize, setGlobalEdgeTagColor, setGlobalElementBackColor, setGlobalElementColor, setGlobalElementNormalColor, setGlobalElementNormalLength, setGlobalElementNormalSize, setGlobalElementTagColor, setGlobalVertexNormalColor, setGlobalVertexNormalLength, setGlobalVertexNormalSize, setJvx, setMaxNumElements, setNeighbour, setNeighbours, setNumElements, setSavedElements, setSavedNumVertices, setTagElement, showBackface, showBoundaries, showEdgeColorFromElements, showEdgeColorFromVertices, showEdgeColors, showEdgeLabels, showEdges, showEdgeSizes, showElementBackColor, showElementBackColors, showElementColorFromVertices, showElementColors, showElementFromVertexColors, showElementLabels, showElementNormalArrow, showElementNormals, showElements, showElementTexture, showSilhouette, showSmoothEdgeColors, showSmoothElementColors, showSmoothLighting, showTaggedBoundaries, showTaggedEdges, showTaggedElements, showVertexTexture, toString, triangulate
-
Methods inherited from class jv.geom.PgPointSet
addGeometryItem, addVectorField, addVertex, applyAmbientMatrix, assureVertexColors, assureVertexNormals, assureVertexSizes, assureVertexTextures, clearTagVertex, getAmbientBounds, getBounds, getCenterOfBndBox, getCenterOfGravity, getDimOfColors, getDimOfTextures, getDimOfVectors, getEulerCharacteristic, getGlobalVectorColor, getGlobalVectorLength, getGlobalVectorSize, getGlobalVertexColor, getGlobalVertexNormalColor, getGlobalVertexNormalLength, getGlobalVertexNormalSize, getGlobalVertexSize, getGlobalVertexTagColor, getIndexOfVectorField, getMarkedVertices, getMarkedVertices, getMaxNumVertices, getNumVectorFields, getNumVertices, getSelectedVectorField, getShininess, getSpecularColor, getTexture, getTextureImage, getTextureImageName, getTransparency, getVectorField, getVectorField, getVertex, getVertexColor, getVertexColors, getVertexNormal, getVertexNormals, getVertexSize, getVertexSizes, getVertexTexture, getVertices, hasTagVertex, hasVertex, hasVertex, hasVertexColors, hasVertexNormals, hasVertexSizes, hasVertexTextures, isDefaultLabelEnabled, isEnabledIndexLabels, isShowingIndices, isShowingSingleVectorField, isShowingTaggedVertices, isShowingTransparency, isShowingVectorArrow, isShowingVectorArrows, isShowingVectorColors, isShowingVectorField, isShowingVectorFields, isShowingVertexColors, isShowingVertexLabels, isShowingVertexNormalArrow, isShowingVertexNormals, isShowingVertexOutline, isShowingVertexSizes, isShowingVertexTexture, isShowingVertices, makeColorFromVectorLength, makeQuadrVertexTexture, makeVertexColorsFromNormal, makeVertexColorsFromXYZ, makeVertexColorsFromZ, makeVertexColorsFromZHue, makeVertexTextureFromBndBox, makeVertexTextureFromCylinder, makeVertexTextureFromSphere, makeVertexTextureFromUV, projectToSphere, removeAllVectorFields, removeHiddenVectorFields, removeVectorField, removeVertex, removeVertexColors, removeVertexNormals, removeVertexSizes, scale, scale, selectVectorField, setCenterOfBndBox, setDefaultLabelEnabled, setDimOfTextures, setEnabledIndexLabels, setGlobalVectorColor, setGlobalVectorLength, setGlobalVectorSize, setGlobalVertexColor, setGlobalVertexSize, setGlobalVertexSize, setGlobalVertexTagColor, setMaxNumVertices, setNumVertices, setShininess, setSpecularColor, setState, setTagVertex, setTexture, setTextureImage, setTextureImageName, setTransparency, setVertex, setVertex, setVertex, setVertex, setVertexColor, setVertexColors, setVertexNormal, setVertexNormals, setVertexSize, setVertexSizes, setVertexTexture, setVertexTextures, setVertices, showIndices, showSingleVectorField, showTaggedVertices, showTransparency, showVectorArrow, showVectorArrows, showVectorColors, showVectorField, showVectorFields, showVertexColors, showVertexLabels, showVertexNormalArrow, showVertexNormals, showVertexOutline, showVertexSizes, showVertices, translate
-
Methods inherited from class jv.project.PgGeometry
addDisplay, addPolygon, clearTagPolygon, convertWorldToModel, fillMethodMenu, fillMethodMenu, getAmbientInvMatrix, getAmbientMatrix, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplayList, getDisplays, getGeometryInfo, getLabelAttribute, getLabelColor, getLabelFont, getLabelSize, getLabelStyle, getMaterialPanel, getModelMatrix, getPolygon, getState, getTitle, getType, getVersion, getVersionType, hasAmbientMatrix, hasDisplay, hasModelMatrix, hasTagPolygon, isConfigurable, isEnabledInstanceSharing, isShowingBndBox, isShowingCenter, isShowingName, isShowingTitle, isVisible, removeDisplay, removeMethodMenus, removePolygon, setAmbientMatrix, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setEnabledInstanceSharing, setGeometryInfo, setLabelAttribute, setLabelAttribute, setLabelColor, setLabelFont, setLabelSize, setLabelStyle, setModelMatrix, setPolygon, setTagPolygon, setTitle, setType, setVersion, setVersionType, setVisible, showBndBox, showCenter, showName, showTitle
-
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
-
PgSurface
public PgSurface()
Constructor of a parametrized surface in three-dimensional space.This constructor allows to create a geometry by specifying the class name as string. By default, showing of vertices is enabled.
-
PgSurface
public PgSurface(int dim)
Constructor of a parametrized surface with vertex dimension.- Parameters:
dim- number of coordinates of each vertex
-
-
Method Detail
-
init
public void init()
Description copied from class:PgElementSetInitialize and reset instance variables after call to super.init().- Overrides:
initin classPgElementSet
-
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. In general, all links of the clone to external objects are set tonull.- Specified by:
clonein interfacePgGeometryIf- Overrides:
clonein classPgElementSet- Since:
- JavaView 2.89.000
- See Also:
copy(PsObject)- Version:
- 30.07.03, 1.00 created (kp)
-
copy
public void copy(PsObject object)
Copy instance variables by duplication, not by copying a reference.The argument was changed from PgGeometry to PsObject since there were problems in J/Link which preferred to use jv.object.PsObject#copy(PsObject) instead of jv.project.PgGeometry#copy(PsObject).
- Overrides:
copyin classPgElementSet- Since:
- JavaView 2.89.000
- See Also:
clone()- Version:
- 30.07.03, 1.00 created (kp)
-
update
public boolean update(java.lang.Object event)
Update the class whenever a child has changed. Method is usually invoked from the children. Here, recompute this surface whenever the descriptor has changed.- Specified by:
updatein interfacePsUpdateIf- Overrides:
updatein classPgElementSet- 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)
-
isEnabledAlternateGrid
public boolean isEnabledAlternateGrid()
Check if ordinary uv-mesh and diamond mesh is enabled where every other row is shifted.
-
setEnabledAlternateGrid
public void setEnabledAlternateGrid(boolean bAlternate)
Switch among ordinary uv-mesh to diamond mesh where every other row is shifted.
-
getDiamondDirection
public boolean getDiamondDirection()
Check if diamond is oriented in u- or v-direction.
-
setDiamondDirection
public void setDiamondDirection(boolean bDirection)
Determine if diamond is oriented in u- or v-direction.
-
isEnabledDualGrid
public boolean isEnabledDualGrid()
Check if dual grid is enabled.
-
setEnabledDualGrid
public void setEnabledDualGrid(boolean bDualGrid)
Determine if dual grid is enabled.
-
setAmbientSpace
public void setAmbientSpace(int mode)
Set ambient space used in model transformations. This method overwrites the superclass method to notify its descriptor.- Specified by:
setAmbientSpacein interfacePgGeometryIf- Overrides:
setAmbientSpacein classPgGeometry- Parameters:
mode- One of the values PgGeometryIf#AMBIENT_...
-
setAmbientProjection
public void setAmbientProjection(int mode)
Set projection mode of ambient space used in model transformations. This method overwrites the superclass method to notify its descriptor.- Specified by:
setAmbientProjectionin interfacePgGeometryIf- Overrides:
setAmbientProjectionin classPgGeometry- Parameters:
mode- One of the values PgGeometryIf#PROJ_...
-
setSurface
public boolean setSurface(int surfaceID)
Creates a surface descriptor and assign it using setDescr(PgSurfaceDescr descr).- Parameters:
surfaceID- choose from PgSurfaceDescr, e.g. PgSurfaceDescr.KLEINBOTTLE- Since:
- JavaView v4.70.010
- Version:
- 26.10.16, 1.00 created (kp)
-
setSurfaceName
public boolean setSurfaceName(java.lang.String aSurface, java.lang.String baseSurfaceName)Creates a surface descriptor and assign it using setDescr(PgSurfaceDescr descr).This method is a shortcut and should be avoided since this method must instantiate a class by name.
-
getDescr
public PgSurfaceDescr getDescr()
Get the descriptor of this surface.
-
setDescr
public void setDescr(PgSurfaceDescr descr)
Assign a surface descriptor which completely describes this surface. This surface is registered as parent of the descriptor and obtains its name as surface name.
-
computeSurface
public void computeSurface()
Recompute surface using current descriptor.- Author:
- Konrad Polthier
- Version:
- 12.06.99, 1.03 revised (kp) Check for empty descriptor.
11.06.99, 1.02 revised (ep) Argument removed.
07.12.98, 1.00 created (kp)
-
-
"