Module omix.api

Class Vec4d


public class Vec4d
extends AbstractDoubleVec<Vec4d>
Describes a vector in 3 dimensional space (homogeneous coordinates).
Author:
Dr. Peter Droste, Omix Visualization
  • Constructor Summary

    Constructors 
    Constructor Description
    Vec4d()  
    Vec4d​(double x, double y, double z, double w)  
    Vec4d​(Vec4d vector)  
  • Method Summary

    Modifier and Type Method Description
    int closest​(Vec4d[] vecs)
    Returns the index of the vector closest to this.
    Vec4d copy()
    Clones the coordinate
    Vec4d cross​(Vec4d c)
    Cross product
    Vec4d dot​(double multiplicator)
    Scaling
    double dot​(Vec4d multiplicator)
    Scalar product
    boolean equals​(Object obj)
    Determines if the vector is equals another object
    double getAngle​(Vec4d coordinate)
    Computes the angle between two vectors.
    double getLength()
    Length of the vector
    double getW()  
    double getX()  
    double getY()  
    double getZ()  
    boolean isComplementOf​(Vec4d cc)
    Determines if this is complement of given vector.
    boolean isDirection()
    Determines if vector describes direction or location.
    boolean isInfinite()
    Determines if one coordinate component is infinity.
    boolean isLocation()
    Determines if vector describes direction or location.
    boolean isNaN()
    Determines if one coordinate component is NaN.
    Vec4d minus​(Vec4d cc)
    Subtraction
    Vec4d negate()
    Negation
    Vec4d normalize()
    Normalization
    Vec4d plus​(Vec4d cc)
    Addition
    void set​(double x, double y, double z, double w)
    Change the single coordinates of this vector.
    void set​(Vec4d c)
    Change the coordinates of this vector.
    this := c
    void setW​(double w)  
    void setX​(double x)  
    void setY​(double y)  
    void setZ​(double z)  
    double[] toDouble()
    Returns the vector as double array.
    float[] toFloat()
    Returns the vector as float array.
    String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait