public class Point3d
extends java.lang.Object
Constructor and Description |
---|
Point3d()
Initialize empty.
|
Point3d(double x,
double y,
double z)
Initialize with 3 doubles.
|
Point3d(Point2d start,
double z) |
Point3d(Point3d that)
Make a copy from the given Point3d
|
Modifier and Type | Method and Description |
---|---|
Point3d |
addTo(Point3d that)
Add this Point to the one given and return the result.
|
Point3d |
cross(Point3d that)
Return the cross product of this vector and the one given.
|
double |
dot(Point3d pt)
Dot product
|
boolean |
equals(java.lang.Object obj) |
void |
finalize() |
double |
getX()
Return the X value.
|
double |
getY()
Return the Y value.
|
double |
getZ()
Return the Z value.
|
double |
length()
Calculate the length of this as a vector.
|
Point3d |
multiplyBy(double t)
Scale this point as a vector by the given value.
|
double |
norm() |
void |
normalize()
Normalize this as a vector.
|
Point3d |
normalized()
Return the normalized vector.
|
void |
setValue(double x,
double y,
double z)
Set the value of the point.
|
Point3d |
subtract(Point3d pt1)
Return this point minus the one given.
|
Point2d |
toPoint2d()
Truncate a Point3d and return just the 2D values
|
java.lang.String |
toString() |
public Point3d()
public Point3d(Point3d that)
public Point3d(Point2d start, double z)
public Point3d(double x, double y, double z)
public void finalize()
finalize
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Point3d multiplyBy(double t)
public double length()
public Point3d normalized()
public void normalize()
public double dot(Point3d pt)
public Point2d toPoint2d()
public double getX()
public double getY()
public double getZ()
public void setValue(double x, double y, double z)
public double norm()