|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjv.object.PsObject
jvx.geom.PgPolygonOnElementSet
A polygon that lives on an element set.
Every point of a PolygonOnElementSet is given by the element index
of the element the point lies on,
and the barycentric coordinates with respect to this triangle.
Only for triangulations.
PgPolygon,
PgElementSet,
Serialized Form| Field Summary | |
static double |
BARYEPS
Accuracy used at checks for zero in barycentric coordinates as default (used e.g. in exp(...)). |
double |
m_eps
This accuracy is actually used for zero-checks in barycentric coordinates (used e.g. in exp(...)). |
| Fields inherited from class jv.object.PsObject |
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 |
| Constructor Summary | |
PgPolygonOnElementSet(PgElementSet geom)
Constructs a new polygon on an element set. |
|
| Method Summary | |
void |
addPolygon(PgPolygonOnElementSet poly)
Concatenates two polygons on element sets, ignoring the underlying geometries. |
void |
copyIntrinsicData(PgPolygonOnElementSet source)
Copies only element indices and barycentric coordinates. |
double |
eval(PdVector bary1,
PdVector bary2,
PdVector bary3,
PiVector outelem,
double step)
Evaluates the polygon in given steps and returns the calculated points in order. |
PdBaryDir |
exp(int iniElem,
PdBary iniBary,
PdBaryDir iniDir,
double length)
Makes discrete exponential map, i.e. the straightest geodesic from given initial values. |
PdBaryDir |
exp(int iniElem,
PdBary iniBary,
PdBaryDir iniDir,
double length,
PgPolygon outpoly)
Makes discrete exponential map, i.e. the straightest geodesic from given initial values. |
void |
flipOrientation()
Change orientation of the PgPolygonOnElementSet by inverting the order of the vertices, i.e. the end point becomes the first point. |
PdBary[] |
getBary()
Returns a reference to the barycentric coordinates. |
PdBary |
getBary(int index)
Returns barycentric coordinates of the vertex at given index |
PiVector |
getElemInd()
Returns a reference to the global element indices. |
int |
getElemInd(int index)
Returns global element index of the element the vertex at given index lies on |
PgElementSet |
getGeometry()
|
double |
getLength()
Shortcut to getPolygon().getLength(). |
int |
getNumVertices()
Returns the number of points of the polygon. |
PgPolygon |
getPolygon()
Returns polygon in world coordinates. |
boolean |
getPolygon(PgPolygon out)
Returns polygon in world coordinates. |
void |
setAccuracy(double newacc)
Sets the accuracy that is used at checks for zero in barycentric coordinates. |
void |
setGeometry(PgElementSet geom)
Changes the underlying geometry. |
void |
setNumVertices(int num)
Existing vertices keep their values (if their position is less than num).
|
void |
setVertex(int index,
int elem,
PdBary bary)
Sets vertex at given index to be on given element with given barycentric coordinates. |
java.lang.String |
toString()
a long long description |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, update, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static double BARYEPS
public double m_eps
| Constructor Detail |
public PgPolygonOnElementSet(PgElementSet geom)
setGeometry has to be called
before it is useful to use the instance of this class.
geom - Underlying element set. Must be
a triangulation. It is possible to triangulate
an element set by the method PgElementSet.triangulate(...).PgElementSet.triangulate(jv.geom.PgElementSet)| Method Detail |
public void copyIntrinsicData(PgPolygonOnElementSet source)
public void setGeometry(PgElementSet geom)
geom - new underlying triangulationpublic PgElementSet getGeometry()
public void setNumVertices(int num)
num).
Necessary memory is allocated.
public void setVertex(int index,
int elem,
PdBary bary)
PdBary instance.)
index - vertex index in vertex arrayselem - global element index where the vertex shall lie onbary - barycentric coordinates of vertex in elementpublic PdBary[] getBary()
public PiVector getElemInd()
public int getNumVertices()
public PdBary getBary(int index)
public int getElemInd(int index)
public double eval(PdVector bary1,
PdVector bary2,
PdVector bary3,
PiVector outelem,
double step)
bary1 - output: contains the first barycentric coordinate
of all evaluated pointsbary2 - output: contains the second barycentric coordinate
of all evaluated pointsbary3 - output: contains the third barycentric coordinate
of all evaluated pointsoutelem - output: element indices of all evaluated pointsstep - stepsize in world metrics
step)public PgPolygon getPolygon()
public boolean getPolygon(PgPolygon out)
out - output: here the polygon is put
public double getLength()
getPolygon().getLength().
public void addPolygon(PgPolygonOnElementSet poly)
poly - vertices of poly are added to the polygonpublic java.lang.String toString()
toString in class PsObject
public PdBaryDir exp(int iniElem,
PdBary iniBary,
PdBaryDir iniDir,
double length)
iniElem - index of starting point's elementiniBary - the barycentric coordinates of the initial pointiniDir - the initial direction in barycentric notationlength - the euclidian length of the geodesic is length*norm(iniDir)
null at an error; else the last barycentric direction that was used
public PdBaryDir exp(int iniElem,
PdBary iniBary,
PdBaryDir iniDir,
double length,
PgPolygon outpoly)
THIS METHOD IS NOT THREAD SAFE! Calling this method on the same instance of PgPolygonOnElementSet in different threads might cause things to react weird. Calling this method on different instances in different threads is no problem.
iniElem - index of starting point's elementiniBary - barycentric coordinates of the initial pointiniDir - initial direction in barycentric notationlength - euclidian length of the geodesic is length*norm(iniDir)outpoly - if outpoly is not null the method puts the whole geodesic here
null at an error; else the last barycentric direction that was usedpublic void setAccuracy(double newacc)
public void flipOrientation()
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||