Module omix.api

Class Vec4f


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

    Constructors 
    Constructor Description
    Vec4f()  
    Vec4f​(float x, float y, float z, float w)  
    Vec4f​(Vec4f vector)  
  • Method Summary

    Modifier and Type Method Description
    int closest​(Vec4f[] vecs)
    Returns the index of the vector closest to this.
    Vec4f copy()
    Clones the coordinate
    Vec4f cross​(Vec4f c)
    Cross product
    Vec4f dot​(float multiplicator)
    Scaling
    float dot​(Vec4f multiplicator)
    Scalar product
    boolean equals​(Object obj)
    Determines if the vector is equals another object
    float getAngle​(Vec4f coordinate)
    Computes the angle between two vectors.
    float getLength()
    Length of the vector
    float getW()  
    float getX()  
    float getY()  
    float getZ()  
    boolean isComplementOf​(Vec4f 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.
    Vec4f minus​(Vec4f cc)
    Subtraction
    Vec4f negate()
    Negation
    Vec4f normalize()
    Normalization
    Vec4f plus​(Vec4f cc)
    Addition
    void set​(float x, float y, float z, float w)
    Change the single coordinates of this vector.
    void set​(Vec4f c)
    Change the coordinates of this vector.
    this := c
    void setW​(float w)  
    void setX​(float x)  
    void setY​(float y)  
    void setZ​(float 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