Package org.joml
Class Vector4f
java.lang.Object
org.joml.Vector4f
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,Vector4fc
public class Vector4f extends java.lang.Object implements java.io.Externalizable, Vector4fc
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Vector4f()Vector4f(float d)Vector4f(float x, float y, float z, float w)Vector4f(int index, java.nio.ByteBuffer buffer)Vector4f(int index, java.nio.FloatBuffer buffer)Vector4f(java.nio.ByteBuffer buffer)Vector4f(java.nio.FloatBuffer buffer)Vector4f(Vector2fc v, float z, float w)Vector4f(Vector3fc v, float w)Vector4f(Vector4fc v) -
Method Summary
Modifier and Type Method Description Vector4fadd(float x, float y, float z, float w)Vector4fadd(float x, float y, float z, float w, Vector4f dest)Vector4fadd(Vector4fc v)Vector4fadd(Vector4fc v, Vector4f dest)floatangle(Vector4fc v)floatangleCos(Vector4fc v)floatdistance(float x, float y, float z, float w)floatdistance(Vector4fc v)Vector4fdiv(float scalar)Vector4fdiv(float x, float y, float z, float w)Vector4fdiv(float x, float y, float z, float w, Vector4f dest)Vector4fdiv(float scalar, Vector4f dest)Vector4fdiv(Vector4fc v)Vector4fdiv(Vector4fc v, Vector4f dest)floatdot(float x, float y, float z, float w)floatdot(Vector4fc v)booleanequals(java.lang.Object obj)Vector4ffma(float a, Vector4fc b)Vector4ffma(float a, Vector4fc b, Vector4f dest)Vector4ffma(Vector4fc a, Vector4fc b)Vector4ffma(Vector4fc a, Vector4fc b, Vector4f dest)java.nio.ByteBufferget(int index, java.nio.ByteBuffer buffer)java.nio.FloatBufferget(int index, java.nio.FloatBuffer buffer)java.nio.ByteBufferget(java.nio.ByteBuffer buffer)java.nio.FloatBufferget(java.nio.FloatBuffer buffer)inthashCode()Vector4fhermite(Vector4fc t0, Vector4fc v1, Vector4fc t1, float t, Vector4f dest)floatlength()floatlengthSquared()Vector4flerp(Vector4fc other, float t)Vector4flerp(Vector4fc other, float t, Vector4f dest)Vector4fmax(Vector4fc v)Vector4fmin(Vector4fc v)Vector4fmul(float scalar)Vector4fmul(float x, float y, float z, float w)Vector4fmul(float x, float y, float z, float w, Vector4f dest)Vector4fmul(float scalar, Vector4f dest)Vector4fmul(Matrix4fc mat)Vector4fmul(Matrix4fc mat, Vector4f dest)Vector4fmul(Matrix4x3fc mat)Vector4fmul(Matrix4x3fc mat, Vector4f dest)Vector4fmul(Vector4fc v)Vector4fmul(Vector4fc v, Vector4f dest)Vector4fmulProject(Matrix4fc mat)Vector4fmulProject(Matrix4fc mat, Vector4f dest)Vector4fnegate()Vector4fnegate(Vector4f dest)Vector4fnormalize()Vector4fnormalize(Vector4f dest)Vector4fnormalize3()voidreadExternal(java.io.ObjectInput in)Vector4frotate(Quaternionfc quat)Vector4frotate(Quaternionfc quat, Vector4f dest)Vector4fset(float d)Vector4fset(float x, float y, float z, float w)Vector4fset(int index, java.nio.ByteBuffer buffer)Vector4fset(int index, java.nio.FloatBuffer buffer)Vector4fset(java.nio.ByteBuffer buffer)Vector4fset(java.nio.FloatBuffer buffer)Vector4fset(Vector2fc v, float z, float w)Vector4fset(Vector3fc v, float w)Vector4fset(Vector4dc v)Vector4fset(Vector4fc v)Vector4fsetComponent(int component, float value)Vector4fsmoothStep(Vector4fc v, float t, Vector4f dest)Vector4fsub(float x, float y, float z, float w)Vector4fsub(float x, float y, float z, float w, Vector4f dest)Vector4fsub(Vector4fc v)Vector4fsub(Vector4fc v, Vector4f dest)Vector4fctoImmutable()java.lang.StringtoString()java.lang.StringtoString(java.text.NumberFormat formatter)floatw()voidwriteExternal(java.io.ObjectOutput out)floatx()floaty()floatz()Vector4fzero()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
x
public float x -
y
public float y -
z
public float z -
w
public float w
-
-
Constructor Details
-
Vector4f
public Vector4f() -
Vector4f
-
Vector4f
-
Vector4f
-
Vector4f
public Vector4f(float d) -
Vector4f
public Vector4f(float x, float y, float z, float w) -
Vector4f
public Vector4f(java.nio.ByteBuffer buffer) -
Vector4f
public Vector4f(int index, java.nio.ByteBuffer buffer) -
Vector4f
public Vector4f(java.nio.FloatBuffer buffer) -
Vector4f
public Vector4f(int index, java.nio.FloatBuffer buffer)
-
-
Method Details
-
x
public float x() -
y
public float y() -
z
public float z() -
w
public float w() -
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
setComponent
- Throws:
java.lang.IllegalArgumentException
-
get
public java.nio.FloatBuffer get(java.nio.FloatBuffer buffer) -
get
public java.nio.FloatBuffer get(int index, java.nio.FloatBuffer buffer) -
get
public java.nio.ByteBuffer get(java.nio.ByteBuffer buffer) -
get
public java.nio.ByteBuffer get(int index, java.nio.ByteBuffer buffer) -
sub
-
sub
-
sub
-
sub
-
add
-
add
-
add
-
add
-
fma
-
fma
-
fma
-
fma
-
mul
-
mul
-
div
-
div
-
mul
-
mul
-
mul
-
mul
-
mulProject
- Specified by:
mulProjectin interfaceVector4fc
-
mulProject
-
mul
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
div
-
rotate
-
rotate
-
lengthSquared
public float lengthSquared()- Specified by:
lengthSquaredin interfaceVector4fc
-
length
public float length() -
normalize
-
normalize
-
normalize3
-
distance
-
distance
public float distance(float x, float y, float z, float w) -
dot
-
dot
public float dot(float x, float y, float z, float 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
-
min
-
max
-
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 interfaceVector4fc
-
hermite
-
lerp
-
lerp
-
toImmutable
-