|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgeometry.Point
Represents a point in n-dimensional space, defined by a vector containing the coordinats of this point.
| Field Summary | |
protected Vector |
coords
A vector containig the coordinats of this point. |
| Constructor Summary | |
Point(double[] coords)
Constructs a point with the given coordinates. |
|
Point(int dim)
Constructs the origin of the given dimension. |
|
Point(int dim,
int coord)
Constructs a point from a unit coordinate-vector. |
|
Point(Vector v)
Constructs a point with the coordinates given by a vector. |
|
| Method Summary | |
AffineSpace |
affineClosure()
Computes the smallest affine space, which contains this geometry |
boolean |
canBeContainedIn(Geometry other)
Tests, if this geometry knows how to test if is contained in another geometry. |
boolean |
canContain(Geometry other)
Tests, if this geometry knows how to test if it contains another geometry. |
boolean |
canIntersect(Geometry other)
Tests, if this geometry knows how to intersect itself with another geometry. |
boolean |
contains(Geometry other)
Tests, if this geometry contains another geometry. |
Point |
copy()
Returns a deep copy of this point. |
int |
dim()
Returns the dimension of this geometry. |
double |
getCoord(int i)
Gets the i-th coordinate of this point. |
Vector |
getNormal(Point p)
Returns a normal vector onto a hypersurface in a given point (only possible if dim()+1 == outerDim()) |
Point |
getOrigin()
The origin of the local coordinate system. |
Geometry |
getRandomRay(Point origin)
Construct a random one-dimensional submanifold, containing a given point. |
Vector |
getVector()
Constructs a point with the coordinates given by a vector. |
Vector |
getVectorTo(Point other)
Computes the vector from this point to another point. |
Geometry |
intersection(Geometry other)
Intersects this geometry with another. |
boolean |
isContainedIn(Geometry other)
Tests, if this geometry is contained in another geometry. |
Point |
localization(Point p)
Converts a point (which is contained in the geometry) to coordinates local to the geometry. |
int |
outerDim()
Returns the dimension of the space containg this point. |
void |
setCoord(int i,
double value)
Sets the i-th coordinate of this point to a given value. |
java.awt.Shape |
toShape(java.awt.geom.AffineTransform transform)
Returns the cell as Shape (only possible for 2-dimensional Complexes). |
java.lang.String |
toString()
Returns a String representation of this vector. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Vector coords
| Constructor Detail |
public Point(int dim)
dim - the number of coordinates
public Point(int dim,
int coord)
dim - the number of coordinatescoord - the index of the only non-zero coordinate of this pointpublic Point(double[] coords)
coords[0] will be the first
entry of the vecor get(1)
coords - the coordinates of this pointpublic Point(Vector v)
v - a vector containing the coordinates of this point| Method Detail |
public Vector getVector()
public Vector getVectorTo(Point other)
other - another point
public java.awt.Shape toShape(java.awt.geom.AffineTransform transform)
Geometry
toShape in interface Geometrypublic AffineSpace affineClosure()
Geometry
affineClosure in interface Geometry
public void setCoord(int i,
double value)
i - the index of the changing coordinatevalue - the new value for the selected coordinatepublic double getCoord(int i)
i - the index of a coordinate
public int outerDim()
outerDim in interface Geometrypublic int dim()
Geometry
dim in interface Geometrypublic boolean canContain(Geometry other)
Geometry
canContain in interface Geometryother - another geometry
contains will workpublic boolean contains(Geometry other)
GeometrycanContain returns false.
contains in interface Geometryother - another geometry
other is contained in the geometry.public boolean canBeContainedIn(Geometry other)
Geometry
canBeContainedIn in interface Geometryother - another geometry
isContainedIn will workpublic boolean isContainedIn(Geometry other)
GeometrycanBeContainedIn returns false.
isContainedIn in interface Geometryother - another geometry
other.public boolean canIntersect(Geometry other)
Geometry
canIntersect in interface Geometryother - another geometry, which is to be intersected
public Geometry intersection(Geometry other)
GeometrycanIntersect returns false.
intersection in interface Geometryother - another geometry, which is to be intersected
public Point localization(Point p)
Geometrydim() coordinates.
The dimension of this geometry has to be nonzero.
localization in interface Geometryp - a point contained in this geometry
public Point getOrigin()
Geometry
getOrigin in interface Geometrypublic Vector getNormal(Point p)
Geometrydim()+1 == outerDim())
getNormal in interface Geometryp - the starting point of the normal vector
public Geometry getRandomRay(Point origin)
Geometry
getRandomRay in interface Geometryorigin - a point contained in this geometry
public java.lang.String toString()
public Point copy()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||