Package org.faceless.graph
Class Point
- java.lang.Object
-
- org.faceless.graph.Point
-
public final class Point extends Object
A Point represents a point in 3D space, and is the building block upon which the 3D representation of the Graphs is based.
This class is used internally by the library, and is of no interest to end users.
-
-
Constructor Summary
Constructors Constructor Description Point(double x, double y)Create a point in 2D space (i.e. with a zero Z axis)Point(double x, double y, double z)Create a point at the given position in 3D space.Point(Double x, Double y, Double z)Create a point at the given position in 3D space.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()booleanequals(Object o)inthashCode()voidmoveBy(org.faceless.graph.Vector v)Move a point by the specified VectorPointmoveByClone(org.faceless.graph.Vector v)StringtoString()voidtransform(org.faceless.graph.Transformer tr)Transform the point using the given transformerdoublex()Get the X position for this pointdoubley()Get the Y position for this pointdoublez()Get the Z position for this point
-
-
-
Constructor Detail
-
Point
public Point(Double x, Double y, Double z)
Create a point at the given position in 3D space. X, Y and Z must be valid doubles, i.e. their values must not be null, infinate or NaN.
-
Point
public Point(double x, double y)Create a point in 2D space (i.e. with a zero Z axis)
-
Point
public Point(double x, double y, double z)Create a point at the given position in 3D space.
-
-
Method Detail
-
x
public double x()
Get the X position for this point
-
y
public double y()
Get the Y position for this point
-
z
public double z()
Get the Z position for this point
-
transform
public void transform(org.faceless.graph.Transformer tr)
Transform the point using the given transformer
-
moveBy
public void moveBy(org.faceless.graph.Vector v)
Move a point by the specified Vector
-
moveByClone
public Point moveByClone(org.faceless.graph.Vector v)
-
-