public class PgBndPolygon extends PgPolygon
PgPointSet
,
Serialized FormBINORMAL, CURVATURE_NORMAL, NORMAL, OFFSET_NORMAL
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
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 |
---|
PgBndPolygon(int aVertexDim) |
Modifier and Type | Method and Description |
---|---|
boolean |
applyModelingMatrix()
Multiply the modeling matrix to all vertices and vectors.
|
boolean |
assignVertices()
Update the vertices of the polygon.
|
boolean |
blend(double s,
PgGeometry ag,
double t,
PgGeometry bg)
Blend between two polygon using
this = s*a + t*b . |
int |
bnd_cmp_logic(PgBndPolygon b,
double maxDist)
Compare number of vertices, vertex distances and angle condition of this and given boundary polygon.
|
int |
bnd_cmp_paste(PgBndPolygon b,
double maxDist)
Compare two boundary polygons, e.g. before pasting resp. merging both curve.
|
double |
bnd_dist(PgBndPolygon b)
Compute distance of two boundary polygons, i.e. the maximal distance of two
related boundary points.
|
boolean |
bnd_id(PgBndPolygon b,
int orient)
Identify two inner boundary polygons (this and the given boundary polygon)
by creating neighbourhood adjacency between both triangle strips.
|
boolean |
bnd_paste(PgBndPolygon b,
int type)
Paste resp. merge given boundary polygon at the end of this boundary polygon.
|
boolean |
bnd_shrink()
Shrinks a boundary curve to a single point.
|
int |
bndcmp(PgBndPolygon b,
double maxDist)
Compares two boundary polygons.
|
static void |
bndcp(int from,
int to,
int nedges,
PgBndPolygon a,
PgBndPolygon b)
Copy part of bnd_curve with number of edges = number of vertices-1.
|
static void |
bndcpy(int from,
int to,
int nedges,
PgBndPolygon a,
PgBndPolygon b)
Copy part of bnd_curve with number of edges = number of vertices.
|
static boolean |
bndinv(int from,
int to,
int nedges,
PgBndPolygon a,
PgBndPolygon b)
Copy part of bnd_curve in reverse order.
|
boolean |
bndsh(int n)
Shifts vertices and neighbours from beginning of boundary polygon.
|
int |
bndtst(double maxDist)
Tests if all boundary vertices lie in close distance to first vertex.
|
java.lang.Object |
clone()
Duplicate geometry by recursively cloning all instance variables
except inspector panels and lists of registered listeners.
|
boolean |
constrain()
Project boundary vertices of element set onto curves determined by boundary constraints.
|
void |
copy(PsObject object)
Copies data from given boundary curve.
|
PgBndConstraint |
getBndConstraint()
Get constraints of this boundary polygon.
|
PiVector |
getElementInd() |
PgElementSet |
getElementSet()
Deprecated.
since JavaView v3.98.003, use getGeometry() instead
|
PgElementSet |
getGeometry()
Get base geometry of this boundary polygon.
|
PiVector |
getNeighbourLocInd() |
int |
getNumElements()
Get number of elements adjacent to the boundary.
|
PiVector |
getVertexInd() |
void |
init()
Initialize and reset instance variables after call to super.init().
|
boolean |
invert()
Invert bnd_curve to reverse order.
|
boolean |
isConforming()
Returns flag of boundary belongs to conforming element set.
|
boolean |
isShowingIndividualMaterial()
Get flag if this boundary polygon uses its own material properties
instead of inheriting material properties of the base geometry.
|
void |
makeConforming()
Modify vertex indices of a boundary after elementSet has been made conforming again.
|
boolean |
makeElementInd()
After the vertexInd have been assigned, this method fills
the elementInd vector by asking the triangulation for edges.
|
void |
makeNonConforming()
Modify vertex indices of a boundary after elementSet has been made non-conforming.
|
boolean |
merge(PgBndPolygon b)
Merge boundary polygon with current object into 'this' and identify last vertex of 'this'
with first vertex of argument curve.
|
void |
setBndConstraint(PgBndConstraint bndConstraint)
Assign constraints of this boundary polygon.
|
void |
setElementInd(PiVector elemInd) |
void |
setElementSet(PgElementSet geom)
Deprecated.
since JavaView v3.98.003, use setGeometry() instead
|
void |
setGeometry(PgElementSet geom)
Assign base geometry of this boundary polygon.
|
void |
setMaxNumVertices(int aNumVertices)
Allocate given number of vertices, and allocate normals, colors etc.
|
void |
setNeighbourLocInd(PiVector neighInd) |
void |
setVertexInd(PiVector vertexInd) |
void |
showIndividualMaterial(boolean flag)
Set flag if this boundary polygon uses its own material properties
instead of inheriting material properties of the base geometry.
|
java.lang.String |
toString()
Create a multi-line string representation
with detailed information about all instance variables.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
assureEdgeColors, assureEdgeNormals, assureEdgeSizes, checkTriangleCut, computeCircle, computeEight, flipOrientation, getEdgeColors, getEdgeNormals, getEdges, getEdgeSizes, getFVector, getGlobalEdgeColor, getGlobalEdgeNormalColor, getGlobalEdgeNormalLength, getGlobalEdgeNormalSize, getGlobalEdgeSize, getGlobalEdgeTagColor, getGlobalPolygonColor, getGlobalPolygonSize, getGlobalPolygonTagColor, getJvx, getLength, getLengthOfEdge, getNumEdges, hasEdgeColors, hasEdgeNormals, intersectionWithLine, isClosed, isShowingEdgeColorFromVertices, isShowingEdgeColors, isShowingEdgeFromVertexColors, isShowingEdgeLabels, isShowingEdgeNormalArrow, isShowingEdgeNormals, isShowingEdges, isShowingEdgeSizes, isShowingPolygonColors, isShowingPolygonEndArrow, isShowingPolygonStartArrow, isShowingSmoothEdgeColors, isShowingSmoothLighting, makeBiNormals, makeCurvatureNormals, makeEdgeColorsFromLength, makeEdgeColorsFromXYZ, makeEdgeColorsFromZ, makeEdgeColorsFromZHue, makeEdgeFromVertexColors, makeNormals, makeNormals, makeOffsetNormals, makeVertexColorsFromLength, makeVertexFromEdgeColors, makeVertexNormals, merge, paint, removeEdgeColors, removeEdgeNormals, removeEdgeSizes, removeMarkedVertices, setClosed, setDimOfVertices, setEdgeColor, setEdgeColors, setEdgeNormal, setEdgeNormals, setEdgeSizes, setGlobalEdgeColor, setGlobalEdgeNormalColor, setGlobalEdgeNormalLength, setGlobalEdgeNormalSize, setGlobalEdgeSize, setGlobalEdgeTagColor, setGlobalPolygonColor, setGlobalPolygonSize, setGlobalPolygonTagColor, setJvx, setNumVertices, showEdgeColorFromVertices, showEdgeColors, showEdgeFromVertexColors, showEdgeLabels, showEdgeNormalArrow, showEdgeNormals, showEdges, showEdgeSizes, showPolygonColors, showPolygonEndArrow, showPolygonStartArrow, showSmoothEdgeColors, showSmoothLighting, triangulate, useGlobalPolygonColor
addGeometryItem, addVectorField, addVertex, applyAmbientMatrix, assureVertexColors, assureVertexNormals, assureVertexSizes, assureVertexTextures, clearTagVertex, computeCone, computeCylinder, computeDisk, computePlane, computeRotation, computeSnail, computeSphere, computeTorus, copySelect, 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, getVertexTextures, 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, projectFromAmbientSpace, projectToSphere, reflect, removeAllVectorFields, removeHiddenVectorFields, removeTexture, removeVectorField, removeVertex, removeVertexColors, removeVertexNormals, removeVertexSizes, scale, scale, selectVectorField, setCenterOfBndBox, setDefaultLabelEnabled, setDimOfColors, setDimOfTextures, setDimOfVectors, setEnabledIndexLabels, setGlobalVectorColor, setGlobalVectorLength, setGlobalVectorSize, setGlobalVertexColor, setGlobalVertexNormalColor, setGlobalVertexNormalLength, setGlobalVertexNormalSize, setGlobalVertexSize, setGlobalVertexSize, setGlobalVertexTagColor, 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, showVertexTexture, showVertices, translate
addDisplay, addElement, addPolygon, clearTagElement, clearTagPolygon, convertWorldToModel, fillMethodMenu, fillMethodMenu, getAmbientInvMatrix, getAmbientMatrix, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplayList, getDisplays, getElement, getGeometryInfo, getLabelAttribute, getLabelColor, getLabelFont, getLabelSize, getLabelStyle, getMaterialPanel, getModelMatrix, getPolygon, getState, getTitle, getType, getVersion, getVersionType, hasAmbientMatrix, hasDisplay, hasModelMatrix, hasTagElement, hasTagPolygon, isConfigurable, isEnabledInstanceSharing, isShowingBndBox, isShowingCenter, isShowingName, isShowingTitle, isVisible, removeDisplay, removeElement, removeMethodMenus, removePolygon, setAmbientMatrix, setAmbientProjection, setAmbientSpace, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setElement, setEnabledInstanceSharing, setGeometryInfo, setLabelAttribute, setLabelAttribute, setLabelColor, setLabelFont, setLabelSize, setLabelStyle, setModelMatrix, setPolygon, setTagElement, 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 void init()
PgPolygon
public java.lang.Object clone()
null
.
Link to associated element set is set to null
.
clone
in interface PgGeometryIf
clone
in class PgPolygon
copy(PsObject)
public void copy(PsObject object)
The argument was changed from PgGeometry to PsObject since there were problems in J/Link which preferred to use PsObject#copy(PsObject) instead of PgGeometry#copy(PsObject).
copy
in class PgPolygon
PgPolygon.clone()
public java.lang.String toString()
toString
in interface PgGeometryIf
toString
in class PgPolygon
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PgPolygon
event
- carries a lot of informationPsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public boolean applyModelingMatrix()
Here modeling matrix is applied to boundary constraints.
applyModelingMatrix
in class PgPointSet
true
if operation was applied successfully.public int getNumElements()
public PiVector getVertexInd()
public void setVertexInd(PiVector vertexInd)
public PiVector getElementInd()
public void setElementInd(PiVector elemInd)
public PiVector getNeighbourLocInd()
public void setNeighbourLocInd(PiVector neighInd)
public PgBndConstraint getBndConstraint()
public void setBndConstraint(PgBndConstraint bndConstraint)
public PgElementSet getGeometry()
public void setGeometry(PgElementSet geom)
public PgElementSet getElementSet()
public void setElementSet(PgElementSet geom)
public void setMaxNumVertices(int aNumVertices)
setMaxNumVertices
in class PgPointSet
public boolean isConforming()
public void makeNonConforming()
Method assumes that boundary has been setup for a conforming element set before, and, additionally, that the element set is already non-conforming. Number of boundary vertices is reduced by one.
PnConjugate.makeConforming(jv.geom.PgElementSet)
,
PnConjugate.makeNonConforming(jv.geom.PgElementSet)
public void makeConforming()
Method assumes that boundary has been setup for a non-conforming element set before, and, additionally, that the element set is already conforming again. Number of boundary vertices is incremented by one.
PnConjugate.makeConforming(jv.geom.PgElementSet)
,
PnConjugate.makeNonConforming(jv.geom.PgElementSet)
public boolean assignVertices()
Method assumes that boundary has been setup for an element set before.
public boolean makeElementInd()
Method does not work for non-conforming element sets.
The currently used algorithm performs a linear run over all elements to find the element index of the first edge. For all other boundary vertices, only their neighbourhood is checked. In case of non-manifold vertices, however, another linear run over all elements is performed.
public boolean bndsh(int n)
n
- length of shiftpublic static boolean bndinv(int from, int to, int nedges, PgBndPolygon a, PgBndPolygon b)
from
- vertex position of beginning of source bnd_curveto
- vertex position of end of destination bnd_curvenedges
- number of edges to copya
- pointer on structure of source bnd_curveb
- pointer on structure of destination bnd_curvepublic boolean invert()
public static void bndcp(int from, int to, int nedges, PgBndPolygon a, PgBndPolygon b)
from
- vertex position of beginning of source bnd_curveto
- vertex position of beginning of destination bnd_curvenedges
- number of edges to copya
- pointer on structure of source bnd_curveb
- pointer on structure of destination bnd_curvebndcpy(int, int, int, PgBndPolygon, PgBndPolygon)
public static void bndcpy(int from, int to, int nedges, PgBndPolygon a, PgBndPolygon b)
from
- vertex position of beginning of source bnd_curveto
- vertex position of beginning of destination bnd_curvenedges
- number of edges to copya
- pointer on structure of source bnd_curveb
- pointer on structure of destination bnd_curvebndcp(int, int, int, PgBndPolygon, PgBndPolygon)
public int bndcmp(PgBndPolygon b, double maxDist)
b
- boundary polygon to compare to thismaxDist
- tolerance distance of related boundary verticespublic int bndtst(double maxDist)
maxDist
- tolerance distance to first boundary vertexpublic boolean bnd_shrink()
PsObject#IS_DELETED
.
Boundary curve itself is marked deleted too. The boundary edges are
removed from adjacent elements respectively elements with three edges are removed.public boolean bnd_id(PgBndPolygon b, int orient)
b
- Boundary polygon to compare to thisorient
- orientation marker:
orient >=0 : bnd's are equal,
orient < 0 : bnd's are inverse equalpublic double bnd_dist(PgBndPolygon b)
b
- Boundary polygon to compare to thispublic int bnd_cmp_paste(PgBndPolygon b, double maxDist)
Possible return values:
0: boundaries cannot be pasted, e.g. angle > MAX_PASTE_ANGLE
(in degrees)
11: beginning of a and b may be pasted
12: beginning of a and end of b may be pasted
21: end of a and beginning of b may be pasted
22: end of a and b may be pasted
b
- boundary polygon to compare to thismaxDist
- tolerance distance of related boundary verticesbnd_paste(PgBndPolygon, int)
public boolean bnd_paste(PgBndPolygon b, int type)
b
- boundary polygon to paste resp. merge to thistype
- relative orientation, see return values of bnd_cmp_paste(PgBndPolygon, double)
public int bnd_cmp_logic(PgBndPolygon b, double maxDist)
Possible return values: 0: boundaries are not equal 1: bnd's are equal with m_vertexInd.m_data[0] = b.m_vertexInd.m_data[0] -1: bnd's are inverse equal with m_vertexInd.m_data[0] = b.m_vertexInd.m_data[nop-1]
b
- boundary polygon to compare withmaxDist
- tolerance distance of related boundary verticespublic boolean isShowingIndividualMaterial()
public void showIndividualMaterial(boolean flag)
flag
- true if individual material of this boundary polygon is usedpublic boolean merge(PgBndPolygon b)
b
- PgBndPolygon to be merged into 'this'public boolean blend(double s, PgGeometry ag, double t, PgGeometry bg)
this = s*a + t*b
.blend
in interface PgGeometryIf
blend
in class PgPolygon
s
- weight of vertices of first boundary polygonag
- first boundary polygon used for blendingt
- weight of vertices of second boundary polygonbg
- second boundary polygon used for blendingpublic boolean constrain()
"