|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.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 in 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(...)). |
protected PiVector |
m_elem
Global element indices as in underlying element set. |
double |
m_eps
This accuracy is actually used for zero-checks in barycentric coordinates (used e.g. in exp(...)). |
protected PgElementSet |
m_geom
Underlying element set. |
protected int |
m_maxNum
Maximum number of vertices, internal use only. |
protected PdBary[] |
m_pos
Barycentric coordinates of the points. |
protected int |
m_size
Number of vertices, do not set directly, use setNumVertices(). |
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, 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. |
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 discret exponential map, i.e. the straightest geodesic from given initial values. |
PdBaryDir |
exp(int iniElem,
PdBary iniBary,
PdBaryDir iniDir,
double length,
PgPolygon outpoly)
Makes discret exponential map, i.e. the straightest geodesic from given initial values. |
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)
|
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. |
protected void |
setMaxNumVertices(int max)
Method should not be called directly, only subclass.setMaxNumVertices may call it. |
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, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, update, updatePanels |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static double BARYEPS
public double m_eps
protected PgElementSet m_geom
protected int m_maxNum
protected int m_size
protected PiVector m_elem
protected PdBary[] m_pos
| 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 setGeometry(PgElementSet geom)
geom - new underlying triangulationpublic PgElementSet getGeometry()
protected void setMaxNumVertices(int max)
#setNumVertices()public void setNumVertices(int num)
num).
Necessary memory is allocated.
public void setVertex(int index,
int elem,
PdBary bary)
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 pointsbary1 - output: contains the second barycentric coordinate
of all evaluated pointsbary1 - output: contains the third barycentric coordinate
of all evaluated pointsoutelem - output: element indices of all evaluated pointsstep - stepsize in world metricsstep)public PgPolygon getPolygon()
public boolean getPolygon(PgPolygon out)
out - output: here the polygon is putpublic 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)
geom - ElementSet on which the geodesic lives.
must be a triangulation.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)
geom - ElementSet on which the geodesic lives.
Must be a triangulation.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 herenull at an error; else the last barycentric direction that was usedpublic void setAccuracy(double newacc)
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||