Package org.joml
Class Vector4d
java.lang.Object
org.joml.Vector4d
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,Vector4dc
public class Vector4d extends java.lang.Object implements java.io.Externalizable, Vector4dc
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Vector4d()Vector4d(double d)Vector4d(double x, double y, double z, double w)Vector4d(int index, java.nio.ByteBuffer buffer)Vector4d(int index, java.nio.DoubleBuffer buffer)Vector4d(java.nio.ByteBuffer buffer)Vector4d(java.nio.DoubleBuffer buffer)Vector4d(Vector2dc v, double z, double w)Vector4d(Vector2fc v, double z, double w)Vector4d(Vector3dc v, double w)Vector4d(Vector3fc v, double w)Vector4d(Vector4dc v)Vector4d(Vector4fc v) -
Method Summary
Modifier and Type Method Description Vector4dadd(double x, double y, double z, double w)Vector4dadd(double x, double y, double z, double w, Vector4d dest)Vector4dadd(Vector4dc v)Vector4dadd(Vector4fc v)doubleangle(Vector4dc v)doubleangleCos(Vector4dc v)doubledistance(double x, double y, double z, double w)doubledistance(Vector4dc v)Vector4ddiv(double scalar)Vector4ddiv(double scalar, Vector4d dest)Vector4ddiv(Vector4dc v)Vector4ddiv(Vector4dc v, Vector4d dest)doubledot(double x, double y, double z, double w)doubledot(Vector4dc v)booleanequals(java.lang.Object obj)Vector4dfma(double a, Vector4dc b)Vector4dfma(double a, Vector4dc b, Vector4d dest)Vector4dfma(Vector4dc a, Vector4dc b)Vector4dfma(Vector4dc a, Vector4dc b, Vector4d dest)java.nio.ByteBufferget(int index, java.nio.ByteBuffer buffer)java.nio.DoubleBufferget(int index, java.nio.DoubleBuffer buffer)java.nio.ByteBufferget(java.nio.ByteBuffer buffer)java.nio.DoubleBufferget(java.nio.DoubleBuffer buffer)inthashCode()Vector4dhermite(Vector4dc t0, Vector4dc v1, Vector4dc t1, double t, Vector4d dest)doublelength()doublelengthSquared()Vector4dlerp(Vector4dc other, double t)Vector4dlerp(Vector4dc other, double t, Vector4d dest)Vector4dmul(double scalar)Vector4dmul(double scalar, Vector4d dest)Vector4dmul(Matrix4dc mat)Vector4dmul(Matrix4dc mat, Vector4d dest)Vector4dmul(Matrix4fc mat)Vector4dmul(Matrix4fc mat, Vector4d dest)Vector4dmul(Matrix4x3dc mat)Vector4dmul(Matrix4x3dc mat, Vector4d dest)Vector4dmul(Matrix4x3fc mat)Vector4dmul(Matrix4x3fc mat, Vector4d dest)Vector4dmul(Vector4dc v)Vector4dmul(Vector4dc v, Vector4d dest)Vector4dmul(Vector4fc v)Vector4dmulProject(Matrix4dc mat)Vector4dmulProject(Matrix4dc mat, Vector4d dest)Vector4dnegate()Vector4dnegate(Vector4d dest)Vector4dnormalize()Vector4dnormalize(Vector4d dest)Vector4dnormalize3()Vector4dnormalize3(Vector4d dest)voidreadExternal(java.io.ObjectInput in)Vector4drotate(Quaterniondc quat)Vector4drotate(Quaterniondc quat, Vector4d dest)Vector4dset(double d)Vector4dset(double x, double y, double z, double w)Vector4dset(int index, java.nio.ByteBuffer buffer)Vector4dset(int index, java.nio.DoubleBuffer buffer)Vector4dset(java.nio.ByteBuffer buffer)Vector4dset(java.nio.DoubleBuffer buffer)Vector4dset(Vector2dc v, double z, double w)Vector4dset(Vector2fc v, double z, double w)Vector4dset(Vector3dc v, double w)Vector4dset(Vector3fc v, double w)Vector4dset(Vector4dc v)Vector4dset(Vector4fc v)Vector4dsetComponent(int component, double value)Vector4dsmoothStep(Vector4dc v, double t, Vector4d dest)Vector4dsub(double x, double y, double z, double w)Vector4dsub(double x, double y, double z, double w, Vector4d dest)Vector4dsub(Vector4dc v)Vector4dsub(Vector4fc v)Vector4dctoImmutable()java.lang.StringtoString()java.lang.StringtoString(java.text.NumberFormat formatter)doublew()voidwriteExternal(java.io.ObjectOutput out)doublex()doubley()doublez()Vector4dzero()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
x
public double x -
y
public double y -
z
public double z -
w
public double w
-
-
Constructor Details
-
Vector4d
public Vector4d() -
Vector4d
-
Vector4d
-
Vector4d
-
Vector4d
public Vector4d(double d) -
Vector4d
-
Vector4d
-
Vector4d
-
Vector4d
public Vector4d(double x, double y, double z, double w) -
Vector4d
public Vector4d(java.nio.ByteBuffer buffer) -
Vector4d
public Vector4d(int index, java.nio.ByteBuffer buffer) -
Vector4d
public Vector4d(java.nio.DoubleBuffer buffer) -
Vector4d
public Vector4d(int index, java.nio.DoubleBuffer buffer)
-
-
Method Details
-
x
public double x() -
y
public double y() -
z
public double z() -
w
public double w() -
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
setComponent
public Vector4d setComponent(int component, double value) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
get
public java.nio.ByteBuffer get(java.nio.ByteBuffer buffer) -
get
public java.nio.ByteBuffer get(int index, java.nio.ByteBuffer buffer) -
get
public java.nio.DoubleBuffer get(java.nio.DoubleBuffer buffer) -
get
public java.nio.DoubleBuffer get(int index, java.nio.DoubleBuffer buffer) -
sub
-
sub
-
sub
-
sub
-
add
-
add
-
add
-
add
-
fma
-
fma
-
fma
-
fma
-
mul
-
mul
-
div
-
div
-
mul
-
mul
-
mul
-
mul
-
mul
-
mul
-
mul
-
mul
-
mul
-
mulProject
- Specified by:
mulProjectin interfaceVector4dc
-
mulProject
-
mul
-
mul
-
div
-
div
-
rotate
-
rotate
-
lengthSquared
public double lengthSquared()- Specified by:
lengthSquaredin interfaceVector4dc
-
length
public double length() -
normalize
-
normalize
-
normalize3
-
normalize3
- Specified by:
normalize3in interfaceVector4dc
-
distance
-
distance
public double distance(double x, double y, double z, double w) -
dot
-
dot
public double dot(double x, double y, double z, double w) -
angleCos
-
angle
-
zero
-
negate
-
negate
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.text.NumberFormat formatter) -
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
smoothStep
- Specified by:
smoothStepin interfaceVector4dc
-
hermite
-
lerp
-
lerp
-
toImmutable
-