Package snap.gfx3d
Class Point3D
java.lang.Object
snap.gfx3d.Point3D
- All Implemented Interfaces:
Cloneable
This class represents a 3D point.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Standard clone implementation.boolean
Standard equals implementation.double
getDistance
(double aX, double aY, double aZ) Returns the distance to another point.static final double
getDistance
(double x1, double y1, double z1, double x2, double y2, double z2) Returns the distance from this Point to a specified point.double
getDistance
(Point3D aPoint) Returns the distance to another point.static final double
getDistanceSquared
(double x1, double y1, double z1, double x2, double y2, double z2) Returns the distance from this Point to a specified point.void
setPoint
(double x, double y, double z) Sets the point from components.void
Sets the point from components.toString()
Standard toString implementation.
-
Field Details
-
x
public double x -
y
public double y -
z
public double z
-
-
Constructor Details
-
Point3D
public Point3D()Constructor. -
Point3D
public Point3D(double x, double y, double z) Constructor for the x, y, z components.
-
-
Method Details
-
setPoint
public void setPoint(double x, double y, double z) Sets the point from components. -
setPoint
Sets the point from components. -
getDistance
Returns the distance to another point. -
getDistance
public double getDistance(double aX, double aY, double aZ) Returns the distance to another point. -
equals
Standard equals implementation. -
clone
Standard clone implementation. -
toString
Standard toString implementation. -
getDistance
public static final double getDistance(double x1, double y1, double z1, double x2, double y2, double z2) Returns the distance from this Point to a specified point. -
getDistanceSquared
public static final double getDistanceSquared(double x1, double y1, double z1, double x2, double y2, double z2) Returns the distance from this Point to a specified point.
-