Class PgTube
- java.lang.Object
-
- jv.object.PsObject
-
- jv.project.PgGeometry
-
- jv.geom.PgPointSet
-
- jv.geom.PgElementSet
-
- jvx.curve.PgTube
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf
public class PgTube extends PgElementSet
Class generates a tube either around a given polygon or around edges of an elementSet. In case of polygons tube is generated e.g. by parallel translating a frame. It requires an existing polygon of classPgPolygonand produces a tube which is a subclass ofPgElementSet. In case of element sets tube is generated by using vertex normals.Note: Currently, the dimension of vertices of tube and of base geometry must be 3.
- See Also:
PgPolygon,PgPolygonSet,PgElementSet, Serialized Form- Author:
- Konrad Polthier
- Version:
- 29.10.03, 4.30 revised (kp) Method setEnabledArrowPanel() added.
30.08.03, 4.20 revised (kp) Method setEnabled() added.
23.06.03, 4.10 revised (ur) Missing color handling for PgElementSets added.
01.06.03, 4.00 revised (kp) Handling of color and update improved.
05.05.03, 3.80 revised (ep) Arrow and tube colors from polygon.
02.05.03, 3.70 revised (ep) Arrow colors from polygon set.
19.11.02, 3.60 revised (ep) Tube arrows added.
13.03.02, 3.50 revised (ur) Distribute distortion evenly for closed polygons;
use polygon colors in PolygonSets to generate ElementColors.
16.01.02, 3.40 revised (ep) Internationalization.
29.12.01, 3.30 revised (kp) Two new methods to set the default bounds.
26.11.01, 3.20 revised (ur) Extended to work on PgPolygonSets.
11.06.01, 3.10 revised (ur) Set tube as updateListener of polygon/elementSet.
01.04.00, 3.00 revised (kp) Moved from package jv.rsrc to jvx.geom.
07.11.99, 2.02 revised (kp) Lower limit of tube discr increased to 2.
16.07.99, 2.01 revised (kp) update() now ensures that info panel is updated.
14.02.99, 2.00 revised (kp) Extended to thicken edges of elementSets too.
13.02.99, 1.50 revised (kp) Tube is now subclass of PgElementSet instead of PgPolygon.
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
-
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 PgTube(int aDim)Constructs a tube with given dimension of vertices.
-
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.voidcomputeTube()Recompute the tube after configuration parameters of the tube have been changed.voidcopy(PsObject object)Copy instance variables by duplication, not by copying a reference.PgFrame[]generateFrames()Parallel translate a frame along the polygon and store one frame per polygon vertex.PgFrame[]generatePolygonSetFrames()Parallel translate a frame along the polygons of a polygonSet and store one frame per polygon vertex.voidgenerateThickEdges()Make tube around edges of elementSet using instance variables m_disr and m_thickness.voidgenerateTube()Make tube around polygon using array of previously computed frames and instance variables m_discr and m_thickness.PuDoublegetArrowLength()Get length of arrows in percent of arrow diameter.PuDoublegetArrowThickness()Get radius of arrow in percent of tube radius.PuIntegergetDiscr()Get number of vertices around the tube.PuDoublegetThickness()Get radius respectively thickness of the tube.booleanguessThicknessFromDiameter(double diam)Based on given diameter of a geometry the method guesses value and bounds of the thickness slider.voidinit()Initialize tube parameters to default values.booleanisEnabled()Check if tube is enabled or disabled, including its components.booleanisEnabledArrowPanel()Check if showing of arrow panel in control panel of tube is enabled.booleanisEnabledEndArrow()Check flag if arrow is shown at the tail of each tube.booleanisEnabledInduceColors()Check flag whether color of tube are induced from the base geometry.booleanisEnabledStartArrow()Check flag if arrow is shown at the head of each tube.voidremoveElementSet()Remove the current element set.voidremovePolygon()Remove the current polygon.voidremovePolygonSet()Remove the current polygonSet.voidsetArrowLength(double percent)Set length of arrows in percent of arrow diameter.voidsetArrowThickness(double percent)Set thickness of arrow in percent of tube radius.voidsetDefArrowLength(double defArrLen)Set default length of arrows in percent of arrow diameter.voidsetDefArrowLengthBounds(double min, double max, double lineIncr, double pageIncr)Set default bounds of arrows in percent of arrow diameter.voidsetDefArrowThickness(double defArrThick)Set default thickness of arrow in percent of tube radius.voidsetDefArrowThicknessBounds(double min, double max, double lineIncr, double pageIncr)Set default bounds for thickness of arrows in percent of tube radius.voidsetDefDiscr(int defDiscr)Set default number of vertices around the tube.voidsetDefDiscrBounds(int min, int max, int lineIncr, int pageIncr)Set default bounds for discretization slider.voidsetDefThickness(double defThickness)Set default radius respectively thickness of the tube.voidsetDefThicknessBounds(double min, double max, double lineIncr, double pageIncr)Set default bounds for radius slider.voidsetDiscr(int discr)Set number of vertices around the tube.voidsetElementSet(PgElementSet elementSet)Set elementSet to compute thick edges from.voidsetEnabled(boolean flag)Enable or disable the tube for interactive use.voidsetEnabledArrowPanel(boolean flag)Enable showing of arrow panel in control panel of tube.voidsetEnabledEndArrow(boolean flag)Set flag if arrow is shown at the tail of each tube.voidsetEnabledInduceColors(boolean flag)Set flag whether color of tube are induced from the base geometry.voidsetEnabledStartArrow(boolean flag)Set flag if arrow is shown at the head of each tube.voidsetPolygon(PgPolygon polygon)Set polygon, but does not compute the tube.voidsetPolygonSet(PgPolygonSet polygonSet)Set polygonSet, but does not compute the tube.voidsetThickness(double thickness)Set radius respectively thickness of the tube.booleanupdate(java.lang.Object event)A call ofupdatewith the polygon as set bysetPolygon(PgPolygon)re-computes frames and tube.-
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, setAmbientProjection, setAmbientSpace, 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
-
PgTube
public PgTube(int aDim)
Constructs a tube with given dimension of vertices. Note: Currently, the dimension of vertices must be 3.
-
-
Method Detail
-
init
public void init()
Initialize tube parameters to default values.- Overrides:
initin classPgElementSet
-
isEnabledArrowPanel
public boolean isEnabledArrowPanel()
Check if showing of arrow panel in control panel of tube is enabled.- Since:
- JavaView 2.99.040
- Version:
- 29.10.03, 1.00 created (kp)
-
setEnabledArrowPanel
public void setEnabledArrowPanel(boolean flag)
Enable showing of arrow panel in control panel of tube.- Since:
- JavaView 2.99.040
- Version:
- 29.10.03, 1.00 created (kp)
-
isEnabled
public boolean isEnabled()
Check if tube is enabled or disabled, including its components.- Since:
- JavaView 2.99.012
- Version:
- 30.08.03, 1.00 created (kp)
-
setEnabled
public void setEnabled(boolean flag)
Enable or disable the tube for interactive use. If disabled, then the tube can still be modified by method calls and its sliders are always updated.- Since:
- JavaView 2.99.012
- Version:
- 30.08.03, 1.00 created (kp)
-
getDiscr
public PuInteger getDiscr()
Get number of vertices around the tube.
-
setDiscr
public void setDiscr(int discr)
Set number of vertices around the tube.
-
setDefDiscr
public void setDefDiscr(int defDiscr)
Set default number of vertices around the tube.
-
setDefDiscrBounds
public void setDefDiscrBounds(int min, int max, int lineIncr, int pageIncr)Set default bounds for discretization slider.
-
guessThicknessFromDiameter
public boolean guessThicknessFromDiameter(double diam)
Based on given diameter of a geometry the method guesses value and bounds of the thickness slider. Internally applied when a new geometry is assigned.- Parameters:
diam- diameter of parent geometry- Returns:
- true if thickness has been changed.
-
getThickness
public PuDouble getThickness()
Get radius respectively thickness of the tube.
-
setThickness
public void setThickness(double thickness)
Set radius respectively thickness of the tube.
-
setDefThickness
public void setDefThickness(double defThickness)
Set default radius respectively thickness of the tube.
-
setDefThicknessBounds
public void setDefThicknessBounds(double min, double max, double lineIncr, double pageIncr)Set default bounds for radius slider.
-
getArrowThickness
public PuDouble getArrowThickness()
Get radius of arrow in percent of tube radius.- Since:
- JavaView 2.44
-
setArrowThickness
public void setArrowThickness(double percent)
Set thickness of arrow in percent of tube radius.- Since:
- JavaView 2.44
-
setDefArrowThickness
public void setDefArrowThickness(double defArrThick)
Set default thickness of arrow in percent of tube radius.- Since:
- JavaView 2.44
-
setDefArrowThicknessBounds
public void setDefArrowThicknessBounds(double min, double max, double lineIncr, double pageIncr)Set default bounds for thickness of arrows in percent of tube radius.- Since:
- JavaView 2.44
-
getArrowLength
public PuDouble getArrowLength()
Get length of arrows in percent of arrow diameter.- Since:
- JavaView 2.44
-
setArrowLength
public void setArrowLength(double percent)
Set length of arrows in percent of arrow diameter.- Since:
- JavaView 2.44
-
setDefArrowLength
public void setDefArrowLength(double defArrLen)
Set default length of arrows in percent of arrow diameter.- Since:
- JavaView 2.44
-
setDefArrowLengthBounds
public void setDefArrowLengthBounds(double min, double max, double lineIncr, double pageIncr)Set default bounds of arrows in percent of arrow diameter.- Since:
- JavaView 2.44
-
isEnabledStartArrow
public boolean isEnabledStartArrow()
Check flag if arrow is shown at the head of each tube.
-
setEnabledStartArrow
public void setEnabledStartArrow(boolean flag)
Set flag if arrow is shown at the head of each tube.- Since:
- JavaView 2.44
-
isEnabledEndArrow
public boolean isEnabledEndArrow()
Check flag if arrow is shown at the tail of each tube.
-
setEnabledEndArrow
public void setEnabledEndArrow(boolean flag)
Set flag if arrow is shown at the tail of each tube.- Since:
- JavaView 2.44
-
isEnabledInduceColors
public boolean isEnabledInduceColors()
Check flag whether color of tube are induced from the base geometry. If true then both global and local colors are induced.- Since:
- JavaView 2.80
- Version:
- 31.05.03, 1.00 created (kp)
-
setEnabledInduceColors
public void setEnabledInduceColors(boolean flag)
Set flag whether color of tube are induced from the base geometry. If true then both global and local colors are induced. If parameter isfalsethen vertex and element colors are removed from tube.Changing this flag will automatically adjust the visibility of local element colors.
- Since:
- JavaView 2.80
- Version:
- 16.11.03, 1.20 revised (kp) Synchronize flag for showing element colors.
30.08.03, 1.10 revised (kp) Remove local colors when argument is false.
31.05.03, 1.00 created (kp)
-
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- See Also:
PgElementSet.copy(PsObject)- Version:
- 04.08.08, 2.00 revised (kp) All sliders now have correct parents.
18.03.02, 1.00 created (ur)
-
copy
public void copy(PsObject object)
Copy instance variables by duplication, not by copying a reference.- Overrides:
copyin classPgElementSet- See Also:
clone()- Version:
- 04.08.08, 1.00 created (kp)
-
setElementSet
public void setElementSet(PgElementSet elementSet)
Set elementSet to compute thick edges from. You must compute frames and tube per hand or send an update with the polygon as argument.Method registers this class as updateListener in the polygon.
If argument is already registered, method just return. If current elementSet is not null, then it is removed.
- See Also:
generateThickEdges(),update(Object)- Version:
- 06.10.02, 1.10 revised (kp) Check existing elementSet.
-
removeElementSet
public void removeElementSet()
Remove the current element set.Method removes this class as updateListener of the element set.
- See Also:
setElementSet(PgElementSet)- Version:
- 16.11.03, 1.10 revised (kp) No longer initialize this tube when parent is removed.
-
setPolygon
public void setPolygon(PgPolygon polygon)
Set polygon, but does not compute the tube. You must compute frames and tube per hand or send an update with the polygon as argument.Method registers this class as updateListener in the polygon.
If argument is already registered, method just return. If current polygon is not null, then it is removed.
- See Also:
generateFrames(),generateTube(),update(Object)- Version:
- 06.10.02, 1.10 revised (kp) Check existing polygon.
-
removePolygon
public void removePolygon()
Remove the current polygon.Method removes this class as updateListener of the polygon.
- See Also:
setPolygon(PgPolygon)- Version:
- 16.11.03, 1.10 revised (kp) No longer initialize this tube when parent is removed.
-
setPolygonSet
public void setPolygonSet(PgPolygonSet polygonSet)
Set polygonSet, but does not compute the tube. You must compute frames and tube per hand or send an update with the polygonSet as argument.Method registers this class as updateListener in the polygonSet.
If argument is already registered, method just return. If current polygonSet is not null, then it is removed.
- See Also:
generateFrames(),generateTube(),update(Object)- Version:
- 06.10.02, 1.10 revised (kp) Check existing polygonSet.
-
removePolygonSet
public void removePolygonSet()
Remove the current polygonSet.Method de-registers this class as updateListener in the polygonSet.
- See Also:
setPolygon(PgPolygon)- Version:
- 16.11.03, 1.10 revised (kp) No longer initialize this tube when parent is removed.
-
update
public boolean update(java.lang.Object event)
A call ofupdatewith the polygon as set bysetPolygon(PgPolygon)re-computes frames and tube.- 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:
setPolygon(PgPolygon),generateFrames(),generateTube()- Version:
- 16.07.99, 2.01 revised (kp) update() now ensures that info panel is updated.
-
computeTube
public void computeTube()
Recompute the tube after configuration parameters of the tube have been changed. Method assumes that base geometries have not changed.
-
generateFrames
public PgFrame[] generateFrames()
Parallel translate a frame along the polygon and store one frame per polygon vertex. This methods must be called whenever the geometry or discretization of the polygon changes. Currently, this method is automatically invoked by PgTube#update.Method ignores edges of length 0, therefore, the number of returned frames may be different than the number of vertices.
The returned frames are later used by method PgTube#generateTube().
- Returns:
- array of frames, one frame for each geometric polygon vertex
- See Also:
generateTube(),PgFrame- Author:
- Konrad Polthier
- Version:
- 13.03.02, 1.10 revised (ur) Distribute distortion of closed polygons evenly.
21.09.01, 1.10 revised (kp) Frames are created within this method.
21.09.01, 1.09 revised (kp) Close polygons are handled.
08.09.00, 1.02 revised (kp) Return value changed to PgFrame[] from void.
16.07.99, 1.01 revised (kp) Degenerate frame for 2-vertex polygon removed.
00.00.98, 1.00 created (kp)
-
generatePolygonSetFrames
public PgFrame[] generatePolygonSetFrames()
Parallel translate a frame along the polygons of a polygonSet and store one frame per polygon vertex. This methods must be called whenever the geometry or discretization of the polygonSet changes. Currently, this method is automatically invoked by PgTube#update.Method ignores edges of length 0, therefore, the number of returned frames may be different than the number of vertices.
The returned frames are later used by method PgTube#generateTube().
- Returns:
- array of frames, one frame for each polygon vertex
- See Also:
generateTube(),PgFrame- Author:
- Konrad Polthier
- Version:
- 13.03.02, 1.10 revised (ur) Distribute distortion of closed polygons evenly.
26.11.01, 1.00 created (ur)
-
generateTube
public void generateTube()
Make tube around polygon using array of previously computed frames and instance variables m_discr and m_thickness.Method
generateFrames()must be called prior to this method.- See Also:
getDiscr(),getThickness(),generateFrames()- Author:
- Konrad Polthier
- Version:
- 13.02.99, 1.01 revised (kp)
00.00.98, 1.00 created (kp)
-
generateThickEdges
public void generateThickEdges()
Make tube around edges of elementSet using instance variables m_disr and m_thickness. Vertex and element normals are recomputed.- See Also:
getDiscr(),getThickness()- Author:
- Konrad Polthier
- Version:
- 23.06.03, 1.20 revised (ur) Induce colors to the tubes from vertex or element colors.
21.09.01, 1.10 revised (kp) Orientation of thick edges changed and normals computed.
12.07.99, 1.03 revised (kp) makeNeighbour() added at the end of method.
02.06.99, 1.02 revised (kp) Now check for enough vertex normals instead of equal.
14.02.99, 1.01 revised (kp) Adapted as method of PgTube.
23.11.97, 1.00 created (kp) Original version was method of PgElementSet.
-
-
"