Class Vector3D
- java.lang.Object
-
- org.eclipse.gef.geometry.projective.Vector3D
-
public final class Vector3D extends java.lang.Object
The Vector3D class implements a three dimensional vector (components x, y, z) with its standard operations: addition and multiplication (scalar, dot-product, cross-product). It is used to represent planar lines and planar points which are represented by three dimensional planes and three dimensional lines through the origin, respectively.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Vector3D
getAdded(Vector3D other)
Vector3D
getCopy()
Returns a copy of thisVector3D
.Vector3D
getCrossProduct(Vector3D other)
double
getDotProduct(Vector3D other)
Returns the dot-product of this and the given otherVector3D
.Vector3D
getRatio(Vector3D other, double t)
Vector3D
getScaled(double f)
Vector3D
getSubtracted(Vector3D other)
int
hashCode()
Point
toPoint()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Vector3D
public Vector3D(double px, double py, double pz)
Constructs a newVector3D
object with the given component values.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
getDotProduct
public double getDotProduct(Vector3D other)
Returns the dot-product of this and the given otherVector3D
.
-
getScaled
public Vector3D getScaled(double f)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-