public class PgTube extends PgElementSet
PgPolygon
and
produces a tube which is a subclass of PgElementSet
.
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.
PgPolygon
,
PgPolygonSet
,
PgElementSet
,
Serialized FormHAS_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
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 and Description |
---|
PgTube(int aDim)
Constructs a tube with given dimension of vertices.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Duplicate geometry by recursively cloning all instance variables
except inspector panels and lists of registered listeners.
|
void |
computeTube()
Recompute the tube after configuration parameters of the tube
have been changed.
|
void |
copy(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.
|
void |
generateThickEdges()
Make tube around edges of elementSet using instance variables m_disr and m_thickness.
|
void |
generateTube()
Make tube around polygon using array of previously computed frames
and instance variables m_discr and m_thickness.
|
PuDouble |
getArrowLength()
Get length of arrows in percent of arrow diameter.
|
PuDouble |
getArrowThickness()
Get radius of arrow in percent of tube radius.
|
PuInteger |
getDiscr()
Get number of vertices around the tube.
|
PuDouble |
getThickness()
Get radius respectively thickness of the tube.
|
boolean |
guessThicknessFromDiameter(double diam)
Based on given diameter of a geometry the method guesses
value and bounds of the thickness slider.
|
void |
init()
Initialize tube parameters to default values.
|
boolean |
isEnabled()
Check if tube is enabled or disabled, including its components.
|
boolean |
isEnabledArrowPanel()
Check if showing of arrow panel in control panel of tube is enabled.
|
boolean |
isEnabledEndArrow()
Check flag if arrow is shown at the tail of each tube.
|
boolean |
isEnabledInduceColors()
Check flag whether color of tube are induced from the base geometry.
|
boolean |
isEnabledStartArrow()
Check flag if arrow is shown at the head of each tube.
|
void |
removeElementSet()
Remove the current element set.
|
void |
removePolygon()
Remove the current polygon.
|
void |
removePolygonSet()
Remove the current polygonSet.
|
void |
setArrowLength(double percent)
Set length of arrows in percent of arrow diameter.
|
void |
setArrowThickness(double percent)
Set thickness of arrow in percent of tube radius.
|
void |
setDefArrowLength(double defArrLen)
Set default length of arrows in percent of arrow diameter.
|
void |
setDefArrowLengthBounds(double min,
double max,
double lineIncr,
double pageIncr)
Set default bounds of arrows in percent of arrow diameter.
|
void |
setDefArrowThickness(double defArrThick)
Set default thickness of arrow in percent of tube radius.
|
void |
setDefArrowThicknessBounds(double min,
double max,
double lineIncr,
double pageIncr)
Set default bounds for thickness of arrows in percent of tube radius.
|
void |
setDefDiscr(int defDiscr)
Set default number of vertices around the tube.
|
void |
setDefDiscrBounds(int min,
int max,
int lineIncr,
int pageIncr)
Set default bounds for discretization slider.
|
void |
setDefThickness(double defThickness)
Set default radius respectively thickness of the tube.
|
void |
setDefThicknessBounds(double min,
double max,
double lineIncr,
double pageIncr)
Set default bounds for radius slider.
|
void |
setDiscr(int discr)
Set number of vertices around the tube.
|
void |
setElementSet(PgElementSet elementSet)
Set elementSet to compute thick edges from.
|
void |
setEnabled(boolean flag)
Enable or disable the tube for interactive use.
|
void |
setEnabledArrowPanel(boolean flag)
Enable showing of arrow panel in control panel of tube.
|
void |
setEnabledEndArrow(boolean flag)
Set flag if arrow is shown at the tail of each tube.
|
void |
setEnabledInduceColors(boolean flag)
Set flag whether color of tube are induced from the base geometry.
|
void |
setEnabledStartArrow(boolean flag)
Set flag if arrow is shown at the head of each tube.
|
void |
setPolygon(PgPolygon polygon)
Set polygon, but does not compute the tube.
|
void |
setPolygonSet(PgPolygonSet polygonSet)
Set polygonSet, but does not compute the tube.
|
void |
setThickness(double thickness)
Set radius respectively thickness of the tube.
|
boolean |
update(java.lang.Object event)
A call of
update with the polygon as set by setPolygon(PgPolygon)
re-computes frames and tube. |
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, copyElementSet, 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, isShowingElementColors, isShowingElementFromVertexColors, isShowingElementLabels, isShowingElementNormalArrow, isShowingElementNormals, isShowingElements, isShowingElementTexture, isShowingElementTextures, isShowingSilhouette, isShowingSmoothEdgeColors, isShowingSmoothElementColors, isShowingSmoothLighting, isShowingTaggedBoundaries, isShowingTaggedEdges, isShowingTaggedElements, makeAlternatingQuadrConn, makeCylinderConn, makeEdgeStars, makeEdgeStarsFromNeighbour, 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, showElementColors, showElementFromVertexColors, showElementLabels, showElementNormalArrow, showElementNormals, showElements, showElementTexture, showSilhouette, showSmoothEdgeColors, showSmoothElementColors, showSmoothLighting, showTaggedBoundaries, showTaggedEdges, showTaggedElements, showVertexTexture, toString, triangulate
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, 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, 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
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
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
assureInspector, getInfoPanel, getName, hasTag, setName
getFather, setParent
public PgTube(int aDim)
public void init()
init
in class PgElementSet
public boolean isEnabledArrowPanel()
public void setEnabledArrowPanel(boolean flag)
public boolean isEnabled()
public void setEnabled(boolean flag)
public PuInteger getDiscr()
public void setDiscr(int discr)
public void setDefDiscr(int defDiscr)
public void setDefDiscrBounds(int min, int max, int lineIncr, int pageIncr)
public boolean guessThicknessFromDiameter(double diam)
diam
- diameter of parent geometrypublic PuDouble getThickness()
public void setThickness(double thickness)
public void setDefThickness(double defThickness)
public void setDefThicknessBounds(double min, double max, double lineIncr, double pageIncr)
public PuDouble getArrowThickness()
public void setArrowThickness(double percent)
public void setDefArrowThickness(double defArrThick)
public void setDefArrowThicknessBounds(double min, double max, double lineIncr, double pageIncr)
public PuDouble getArrowLength()
public void setArrowLength(double percent)
public void setDefArrowLength(double defArrLen)
public void setDefArrowLengthBounds(double min, double max, double lineIncr, double pageIncr)
public boolean isEnabledStartArrow()
public void setEnabledStartArrow(boolean flag)
public boolean isEnabledEndArrow()
public void setEnabledEndArrow(boolean flag)
public boolean isEnabledInduceColors()
public void setEnabledInduceColors(boolean flag)
false then vertex and element colors are
removed from tube.
Changing this flag will automatically adjust the visibility of local element colors.
public java.lang.Object clone()
null
.clone
in interface PgGeometryIf
clone
in class PgElementSet
PgElementSet.copy(PsObject)
public void copy(PsObject object)
copy
in class PgElementSet
clone()
public void setElementSet(PgElementSet elementSet)
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.
generateThickEdges()
,
update(Object)
public void removeElementSet()
Method removes this class as updateListener of the element set.
setElementSet(PgElementSet)
public void setPolygon(PgPolygon polygon)
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.
generateFrames()
,
generateTube()
,
update(Object)
public void removePolygon()
Method removes this class as updateListener of the polygon.
setPolygon(PgPolygon)
public void setPolygonSet(PgPolygonSet polygonSet)
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.
generateFrames()
,
generateTube()
,
update(Object)
public void removePolygonSet()
Method de-registers this class as updateListener in the polygonSet.
setPolygon(PgPolygon)
public boolean update(java.lang.Object event)
update
with the polygon as set by setPolygon(PgPolygon)
re-computes frames and tube.update
in interface PsUpdateIf
update
in class PgElementSet
event
- carries a lot of informationsetPolygon(PgPolygon)
,
generateFrames()
,
generateTube()
public void computeTube()
public PgFrame[] generateFrames()
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().
generateTube()
,
PgFrame
public PgFrame[] generatePolygonSetFrames()
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().
generateTube()
,
PgFrame
public void generateTube()
Method generateFrames()
must be called prior to this method.
getDiscr()
,
getThickness()
,
generateFrames()
public void generateThickEdges()
getDiscr()
,
getThickness()
"