|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.vecmath.P_Vector
|
+--jv.vecmath.PdBary
Vector with barycentric coordinates of arbitrary dimension, sum of entries must be 1. Internal array length is equal to barycentric dimension.
| Field Summary | |
double[] |
m_data
Array with barycentric coordinates, sum of entries must be 1. |
| Constructor Summary | |
PdBary()
Construct empty class. |
|
PdBary(double x,
double y)
Construct class with dimension=2 and given initial values. |
|
PdBary(double x,
double y,
double z)
Construct class with dimension=3 and given initial values. |
|
PdBary(double x,
double y,
double z,
double w)
Construct class with dimension=4 and given initial values. |
|
PdBary(int aSize)
Construct class with given dimension. |
|
| Method Summary | |
java.lang.Object |
clone()
Duplicate vector and data array. |
void |
copy(PdBary vec)
Copies argument vector into 'this', and possibly adjusts size of 'this'. |
static PdBary |
copyNew(PdBary v)
Create a new vector as clone of argument vector. |
static void |
getBary(PdBary bary,
PdVector p,
PdVector v0,
PdVector v1)
Get barycentric coordinates of a point in an interval of a line in R^n. |
static void |
getBary(PdBary bary,
PdVector p,
PdVector v0,
PdVector v1,
PdVector v2)
Get barycentric coordinates of a point in the plane of a triangle in R^n. |
double[] |
getEntries()
Return a copy of content of vector as array of doubles. |
double |
getEntry(int ind)
Get the component of a barycentric vector. |
int |
getFirstVertexOfEdge()
Get local index of first vertex of edge. |
int |
getSecondVertexOfEdge()
Get local index of second vertex of edge. |
int |
getSize()
Get dimension of barycentric vector. |
static void |
getVertex(PdVector p,
PdBary bary,
PdVector v0,
PdVector v1,
PdVector v2)
Get vertex from barycentric coordinates of a triangle. |
boolean |
isInside()
Check whether point is inside, i.e. all barycentric coordinates are non-negative. |
int |
isOnEdge()
Get local edge index if bary is a vertex on an edge. |
int |
isOnFace()
Get local edge resp. face index if bary is a vertex on an edge resp. face. |
int |
isOnVertex()
Get local vertex index in {0, 1, 2, ...} if bary represents a vertex, or -1. |
void |
setEntry(int ind,
double value)
Assign value to component of vector, and possibly enlarge vector if too small. |
int |
setSize(int aSize)
Set dimension of barycentric vector, i.e. length of its data array. |
java.lang.String |
toShortString()
Create a single-line string representation of the vector components and attributes. |
java.lang.String |
toString()
Create a multi-line string representation of the vector with detailed information about all instance variables. |
void |
validate()
Check sum of barycentric coordinates, and adjust if sum is not one. |
| Methods inherited from class jv.vecmath.P_Vector |
clearTag, clone, clone, copy, getBits, getName, hasTag, setName, setTag |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double[] m_data
| Constructor Detail |
public PdBary()
public PdBary(int aSize)
public PdBary(double x,
double y)
public PdBary(double x,
double y,
double z)
public PdBary(double x,
double y,
double z,
double w)
| Method Detail |
public java.lang.String toString()
toString in class P_VectortoShortString()public java.lang.String toShortString()
toString()public double[] getEntries()
public double getEntry(int ind)
public void setEntry(int ind,
double value)
public java.lang.Object clone()
copyNew(PdBary).copyNew(PdBary)public static PdBary copyNew(PdBary v)
v - source vector to clonepublic void copy(PdBary vec)
vec - the vector to be copiedpublic int getSize()
public int setSize(int aSize)
new - number of components of vectorpublic void validate()
PuMath#EPS then vector is normalized.public boolean isInside()
public int isOnVertex()
public int isOnEdge()
true = 1 or false = -1.isOnFace()public int isOnFace()
isOnEdge()
which should be used instead for better readability.
For dimension==2, method is performs identical to isOnVertex()
and returns the local index of the vertex, and not any 'opposite'.isOnVertex()
public static void getVertex(PdVector p,
PdBary bary,
PdVector v0,
PdVector v1,
PdVector v2)
public static void getBary(PdBary bary,
PdVector p,
PdVector v0,
PdVector v1,
PdVector v2)
public static void getBary(PdBary bary,
PdVector p,
PdVector v0,
PdVector v1)
public int getFirstVertexOfEdge()
public int getSecondVertexOfEdge()
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||