Package org.vrspace.server.obj
Class Point
- java.lang.Object
-
- org.vrspace.server.obj.Entity
-
- org.vrspace.server.obj.Embedded
-
- org.vrspace.server.obj.Point
-
@Node public class Point extends Embedded
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point
copy(Point p)
double
getDistance(double x, double y, double z)
boolean
isEqual(Point p)
Utility method, confirms that coordinates of this point match the coordinates of the other point.boolean
isInRange(double x, double y, double z, double range)
boolean
isInRange(Point p, double range)
Point
minus(double val)
Point
plus(double val)
-
-
-
Constructor Detail
-
Point
public Point(Point position)
-
-
Method Detail
-
getDistance
public double getDistance(double x, double y, double z)
-
isInRange
public boolean isInRange(Point p, double range)
-
isInRange
public boolean isInRange(double x, double y, double z, double range)
-
plus
public Point plus(double val)
-
minus
public Point minus(double val)
-
isEqual
public boolean isEqual(Point p)
Utility method, confirms that coordinates of this point match the coordinates of the other point. Method equals() can't be used for that purpose as it includes object id - requirement for persistence.- Parameters:
p
- Point to compare- Returns:
- true if all coordinates are equal
-
-