|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjvx.geom.PwBary
Static methods that handle barycentric coordinates on triangulated element sets.
| Constructor Summary | |
PwBary()
|
|
| Method Summary | |
static void |
blendBase(PdBary bary,
double lambda,
PdBaryDir dir,
PdBary outbary)
Computes outbary = bary+lambda*dir. |
static void |
changeBarycentricOnEdge(PdBary inOut,
int locind1,
int locind2)
Switch to barycentric coordinates that represent same point on edge wrt the other element adjacent to edge. |
static double |
computeLambda(PdBary pos,
PdBaryDir dir)
Computes the smallest positive solution of 'pos + lambda*dir lies on boundary' for lambda. |
static PdBaryDir[] |
computeNormals(PgPolygonOnElementSet poly,
PdBaryDir[] normals,
PiVector elementind)
TODO: DOES NOT WORK WITH CLOSED POLYGONS YET! |
static int |
createVectorAtVertexThatShowsIntoElement(PgElementSet geom,
int iniElem,
PdBary iniBary,
PdBaryDir iniDir)
|
static int |
equalizeElementIndex(PgPolygonOnElementSet poly,
int index1,
int index2,
PdBary out1,
PdBary out2)
Outputs the coordinates of two vertices on a barycentric polygon such that their barycentric coordinates refer to the same element. |
static int |
getEdgeIndex(PdBary pos)
Checks for first occurrence of zero (i.e. |.|< eps) in the barycentric vector. |
static PdBaryDir[] |
getGeodRepresentation(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector localind)
Calculates the representations of a given vector in all elements of a vertex star by completion to a unnormalized angle of theta/2. |
static double |
getOrientedAngle(PgElementSet geom,
int elemInd,
PdBaryDir a,
PdBaryDir b,
boolean recalc)
Oriented angle between two barycentric vectors in a triangle. |
static double |
getOrientedAngleAtEdge(PgElementSet geom,
int elemind1,
PdBaryDir dir1,
int localedgeind1,
int elemind2,
PdBaryDir dir2,
int localedgeind2,
boolean recalc)
|
static double |
getOrientedAngleAtVertex(PgElementSet geom,
int elemind1,
PdBaryDir dir1,
int localvertind1,
int elemind2,
PdBaryDir dir2,
int localvertind2,
boolean recalc)
Computes the normalized angle between two barycentric vectors based at the same vertex. |
static PdBaryDir[] |
getProjRepresentation(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector locind)
Calculates the representations of a given vector in all elements of a vertex star by projection onto the plane the element lays in. |
static PdBaryDir[] |
getTransRepresentation(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector locind)
Calculates the representations of a given vector in all elements of a vertex star by parallel translation along a straightest geodesic (half angles). |
static double |
getTransRepresentationValues(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector locind,
PdVector betas)
Calculates the values (beta,theta) of a given vector in all elements of a vertex star by parallel translation along a straightest geodesic. |
static double |
getVertexAngles(PgVertexStar star,
PgElementSet geom,
PdVector angles)
Calculates inner angles of the elements of a vertexstar. |
static int |
liesOnVertex(PdBary pos)
Checks if given barycentric position lies on any vertex |
static double |
norm(PgElementSet geom,
int elemInd,
PdBaryDir x,
boolean bForceRecalc)
Euklidian norm of two intrinsic (barycentric) vectors. |
static void |
projectOntoElement(PgElementSet geom,
int elemInd,
PdVector dir,
PdBaryDir outdir)
Projects given vector onto elements plane. |
static int |
rotateAtEdge(PgElementSet geom,
int elem,
PdBaryDir dir,
int localedgeind,
PdBaryDir out,
PdBary pos,
double angle,
boolean recalc)
Rotates a barycentric direction with base point on edge. |
static int |
rotateAtVertex(PgElementSet geom,
int elemind,
int localvertexind,
PdBaryDir dir,
PdBaryDir outdir,
PdBary bary,
double angle)
Rotates direction at vertex in same orientation as the star. |
static void |
rotateInElement(PgElementSet geom,
int elemInd,
PdBaryDir dir,
double angle,
PdBaryDir outdir,
boolean bForceRecalc)
Rotates direction in same orientation as the element's. |
static double |
scalar(PgElementSet geom,
int elemInd,
PdBaryDir x,
PdBaryDir y,
boolean bForceRecalc)
Computes scalar product of barycentric directions in world coordinates, that means the scalar product of the vectors in euklidian space. |
static boolean |
showsIntoElement(PdBaryDir dir,
int vertexindex)
Checks if given barycentric vector shows into it's element. |
static boolean |
transformBary(PgElementSet geom,
int origElem,
PdBary origBary,
int destElem,
PdBary outBary)
Tries to change a barycentric coordinate to the representation of the same space point wrt a different triangle. |
static void |
translatePolygonOnElementSet(PgPolygonOnElementSet poly,
PdBaryDir[] vf,
PiVector vfInd,
PdVector distField)
Translates the vertices of the polygon a given distance into a given direction. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PwBary()
| Method Detail |
public static double scalar(PgElementSet geom,
int elemInd,
PdBaryDir x,
PdBaryDir y,
boolean bForceRecalc)
scalar and parameter forceRecalc == false
then some calculations are skipped.
geom - geometry the barycentric directions live onelemInd - element the barycentric directions live onx - one directiony - other directionbForceRecalc - if true all variables are forced two be recalculated; should only
be used if the geometry may not be the same (in world coordinates) as in previous calls
public static double norm(PgElementSet geom,
int elemInd,
PdBaryDir x,
boolean bForceRecalc)
PwBary.scalar(..)
and additional square root.
geom - the geometry the barycentric direction lives onelemInd - the element the barycentric direction lives onx - barycentric vectorbForceRecalc - used for scalar product
scalar(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, jv.vecmath.PdBaryDir, boolean)
public static double getVertexAngles(PgVertexStar star,
PgElementSet geom,
PdVector angles)
star - the stargeom - the geometryangles - output: vertex angles of elements in star,
in same order as PgVertexStar.getElement().
if necessary it is resized.
public static PdBaryDir[] getGeodRepresentation(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector localind)
geom - triangulationorigElem - element in which the vector is givenorigDir - vector that will be translated to the other elementslocalvertexindex - local index in origElem of the vertex
at which the vector is givenelements - output: global element indices of the vertex starlocalind - output: local vertex indices of common vertex in elements at vertex star
public static PdBaryDir[] getTransRepresentation(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector locind)
geom - triangulationorigElem - element in which the vector is givenorigDir - vector that will be translated to the other elementslocalvertexindex - the local index in origElem of the vertex in which the vector is givenelements - output: global element indices of the vertex starlocind - output: local vertex indices of the vertex star
public static double getTransRepresentationValues(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector locind,
PdVector betas)
geom - set of elementsorigElem - element in which the vector is givenorigDir - vector that will be translated to the other elementslocalvertexindex - the local index in origElem of the vertex in which the vector is givenelements - output: global element indices of the vertex star, beginning with origElemlocind - output: local indices of common vertex of star, beginning with localvertexindexbetas - output: beta values
public static PdBaryDir[] getProjRepresentation(PgElementSet geom,
int origElem,
PdBaryDir origDir,
int localvertexindex,
PiVector elements,
PiVector locind)
geom - set of elementsorigElem - element on which the vector is givenorigDir - vector that will be translated to the other elementslocalvertexindex - the local index in origElem of the vertex in which the vector is givenelements - output: global element indicee of the vertex starlocind - output: local vertex indices of the vertex star
public static void projectOntoElement(PgElementSet geom,
int elemInd,
PdVector dir,
PdBaryDir outdir)
geom - underlying geometryelemInd - global element indexdir - in world coordinatesoutdir - output: barycentric coordinates of the projected vector
public static double getOrientedAngle(PgElementSet geom,
int elemInd,
PdBaryDir a,
PdBaryDir b,
boolean recalc)
geom - underlying geometryelemInd - global element indexa - first vectorb - second vectorrecalc - used for scalar product
a must be rotated
against the orientation of the triangle; -3*PI if an error occurredscalar(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, jv.vecmath.PdBaryDir, boolean)
public static double getOrientedAngleAtVertex(PgElementSet geom,
int elemind1,
PdBaryDir dir1,
int localvertind1,
int elemind2,
PdBaryDir dir2,
int localvertind2,
boolean recalc)
getOrientedAngle if this is not the
case. Furthermore they must point into the element they lie on.
public static double getOrientedAngleAtEdge(PgElementSet geom,
int elemind1,
PdBaryDir dir1,
int localedgeind1,
int elemind2,
PdBaryDir dir2,
int localedgeind2,
boolean recalc)
public static void rotateInElement(PgElementSet geom,
int elemInd,
PdBaryDir dir,
double angle,
PdBaryDir outdir,
boolean bForceRecalc)
geom - underlying geometryelemInd - element on that vector liesdir - barycentric directionangle - radoutdir - output: result of rotation; may be same instance as dirbForceRecalc - used for scalar productscalar(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, jv.vecmath.PdBaryDir, boolean)
public static int rotateAtVertex(PgElementSet geom,
int elemind,
int localvertexind,
PdBaryDir dir,
PdBaryDir outdir,
PdBary bary,
double angle)
geom - underlying geometryelemind - global element indexlocalvertexind - local index of vertex that is base of the rotationdir - original vectoroutdir - output: result of rotationbary - output: barycentric coordinates of the base point of the resultangle - normalized angle [0;2*PI] ^= 360°
public static int rotateAtEdge(PgElementSet geom,
int elem,
PdBaryDir dir,
int localedgeind,
PdBaryDir out,
PdBary pos,
double angle,
boolean recalc)
geom - underlying triangulationelem - element index of barycentric directiondir - barycentric direction with base point on element edge (pointing into element)localedgeind - local index in element of the edge the direction lies onout - output: rotated barycentric directionpos - input/output: base point is converted to new element if necessaryangle - in [0;2*PI]
public static boolean showsIntoElement(PdBaryDir dir,
int vertexindex)
dir - barycentric vector that shall be checkedvertexindex - local vertex index that is the base of the direction
public static int liesOnVertex(PdBary pos)
pos - barycentric point, must not be null
PgPolygonOnElementSet#BARYEPS-sphere around any vertex;
public static double computeLambda(PdBary pos,
PdBaryDir dir)
pos - Must not be null. Must have same size as dir.dir - Must not be null. Must have same size as pos.
public static int getEdgeIndex(PdBary pos)
pos - must not be null
public static PdBaryDir[] computeNormals(PgPolygonOnElementSet poly,
PdBaryDir[] normals,
PiVector elementind)
public static void translatePolygonOnElementSet(PgPolygonOnElementSet poly,
PdBaryDir[] vf,
PiVector vfInd,
PdVector distField)
poly - polygon to translatevf - normalized barycentric directions for each vertex of polygonvfInd - element indices for the barycentric directionsdistField - the distance to move for each polygon vertex
public static boolean transformBary(PgElementSet geom,
int origElem,
PdBary origBary,
int destElem,
PdBary outBary)
public static int equalizeElementIndex(PgPolygonOnElementSet poly,
int index1,
int index2,
PdBary out1,
PdBary out2)
poly - the polygon on a triangulationindex1 - first point (index in poly)index2 - second point (index in poly)
public static void changeBarycentricOnEdge(PdBary inOut,
int locind1,
int locind2)
inOut - must have a zero at locind1, result is put herelocind1 - local index of edge in origin trianglelocind2 - local index of edge in destination triangle
public static void blendBase(PdBary bary,
double lambda,
PdBaryDir dir,
PdBary outbary)
outbary = bary+lambda*dir.
bary - barycentric base pointlambda - factordir - barycentric direction (in same element as barycentric base point)outbary - result
public static int createVectorAtVertexThatShowsIntoElement(PgElementSet geom,
int iniElem,
PdBary iniBary,
PdBaryDir iniDir)
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||