Java org.apache.commons.math3.geometry.euclidean.threed Vector3D fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.math3.geometry.euclidean.threed Vector3D fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.math3.geometry.euclidean.threed Vector3D.

The text is from its open source code.

Field

Vector3DZERO
Null vector (coordinates: 0, 0, 0).
Vector3DPLUS_I
First canonical vector (coordinates: 1, 0, 0).
Vector3DMINUS_I
Opposite of the first canonical vector (coordinates: -1, 0, 0).
Vector3DPLUS_J
Second canonical vector (coordinates: 0, 1, 0).
Vector3DMINUS_J
Opposite of the second canonical vector (coordinates: 0, -1, 0).
Vector3DPLUS_K
Third canonical vector (coordinates: 0, 0, 1).
Vector3DMINUS_K
Opposite of the third canonical vector (coordinates: 0, 0, -1).

Constructor

Vector3D(double x, double y, double z)
Simple constructor.
Vector3D(double alpha, double delta)
Simple constructor.
Vector3D(double a, Vector3D u)
Multiplicative constructor Build a vector from another one and a scale factor.
Vector3D(double[] v)
Simple constructor.
Vector3D(double a1, Vector3D u1, double a2, Vector3D u2)
Linear constructor Build a vector from two other ones and corresponding scale factors.
Vector3D(double a1, Vector3D u1, double a2, Vector3D u2, double a3, Vector3D u3)
Linear constructor Build a vector from three other ones and corresponding scale factors.
Vector3D(double a1, Vector3D u1, double a2, Vector3D u2, double a3, Vector3D u3, double a4, Vector3D u4)
Linear constructor Build a vector from four other ones and corresponding scale factors.

Method

Vector3Dadd(final Vector v)
Vector3Dadd(double factor, final Vector v)
doubleangle(Vector3D v1, Vector3D v2)
Compute the angular separation between two vectors.
Vector3DcrossProduct(final Vector v)
Compute the cross-product of the instance with another vector.
Vector3DcrossProduct(final Vector3D v1, final Vector3D v2)
Compute the cross-product of two vectors.
doubledistance(Vector v)
doubledistance(Vector3D v1, Vector3D v2)
Compute the distance between two vectors according to the L2 norm.
doubledistanceSq(Vector3D v1, Vector3D v2)
Compute the square of the distance between two vectors.
doubledotProduct(Vector3D v1, Vector3D v2)
Compute the dot-product of two vectors.
doubledotProduct(final Vector v)

The implementation uses specific multiplication and addition algorithms to preserve accuracy and reduce cancellation effects.

booleanequals(Object other)
Test for the equality of two 3D vectors.
doublegetAlpha()
Get the azimuth of the vector.
doublegetDelta()
Get the elevation of the vector.
doublegetNorm()
doublegetNormSq()
doublegetX()
Get the abscissa of the vector.
doublegetY()
Get the ordinate of the vector.
doublegetZ()
Get the height of the vector.
Vector3Dnegate()
Vector3Dnormalize()
Vector3Dorthogonal()
Get a vector orthogonal to the instance.
Vector3DscalarMultiply(double a)
Vector3Dsubtract(final Vector v)
double[]toArray()
Get the vector coordinates as a dimension 3 array.