Class Vector3D
- java.lang.Object
-
- org.eclipse.gef.geometry.projective.Vector3D
-
public final class Vector3D extends java.lang.ObjectThe 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 booleanequals(java.lang.Object other)Vector3DgetAdded(Vector3D other)Vector3DgetCopy()Returns a copy of thisVector3D.Vector3DgetCrossProduct(Vector3D other)doublegetDotProduct(Vector3D other)Returns the dot-product of this and the given otherVector3D.Vector3DgetRatio(Vector3D other, double t)Vector3DgetScaled(double f)Vector3DgetSubtracted(Vector3D other)inthashCode()PointtoPoint()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Vector3D
public Vector3D(double px, double py, double pz)Constructs a newVector3Dobject with the given component values.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin 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:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-