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 Vector4f
add(float x, float y, float z, float w)
Vector4f
add(float x, float y, float z, float w, Vector4f dest)
Vector4f
add(Vector4fc v)
Vector4f
add(Vector4fc v, Vector4f dest)
float
angle(Vector4fc v)
float
angleCos(Vector4fc v)
float
distance(float x, float y, float z, float w)
float
distance(Vector4fc v)
Vector4f
div(float scalar)
Vector4f
div(float x, float y, float z, float w)
Vector4f
div(float x, float y, float z, float w, Vector4f dest)
Vector4f
div(float scalar, Vector4f dest)
Vector4f
div(Vector4fc v)
Vector4f
div(Vector4fc v, Vector4f dest)
float
dot(float x, float y, float z, float w)
float
dot(Vector4fc v)
boolean
equals(java.lang.Object obj)
Vector4f
fma(float a, Vector4fc b)
Vector4f
fma(float a, Vector4fc b, Vector4f dest)
Vector4f
fma(Vector4fc a, Vector4fc b)
Vector4f
fma(Vector4fc a, Vector4fc b, Vector4f dest)
java.nio.ByteBuffer
get(int index, java.nio.ByteBuffer buffer)
java.nio.FloatBuffer
get(int index, java.nio.FloatBuffer buffer)
java.nio.ByteBuffer
get(java.nio.ByteBuffer buffer)
java.nio.FloatBuffer
get(java.nio.FloatBuffer buffer)
int
hashCode()
Vector4f
hermite(Vector4fc t0, Vector4fc v1, Vector4fc t1, float t, Vector4f dest)
float
length()
float
lengthSquared()
Vector4f
lerp(Vector4fc other, float t)
Vector4f
lerp(Vector4fc other, float t, Vector4f dest)
Vector4f
max(Vector4fc v)
Vector4f
min(Vector4fc v)
Vector4f
mul(float scalar)
Vector4f
mul(float x, float y, float z, float w)
Vector4f
mul(float x, float y, float z, float w, Vector4f dest)
Vector4f
mul(float scalar, Vector4f dest)
Vector4f
mul(Matrix4fc mat)
Vector4f
mul(Matrix4fc mat, Vector4f dest)
Vector4f
mul(Matrix4x3fc mat)
Vector4f
mul(Matrix4x3fc mat, Vector4f dest)
Vector4f
mul(Vector4fc v)
Vector4f
mul(Vector4fc v, Vector4f dest)
Vector4f
mulProject(Matrix4fc mat)
Vector4f
mulProject(Matrix4fc mat, Vector4f dest)
Vector4f
negate()
Vector4f
negate(Vector4f dest)
Vector4f
normalize()
Vector4f
normalize(Vector4f dest)
Vector4f
normalize3()
void
readExternal(java.io.ObjectInput in)
Vector4f
rotate(Quaternionfc quat)
Vector4f
rotate(Quaternionfc quat, Vector4f dest)
Vector4f
set(float d)
Vector4f
set(float x, float y, float z, float w)
Vector4f
set(int index, java.nio.ByteBuffer buffer)
Vector4f
set(int index, java.nio.FloatBuffer buffer)
Vector4f
set(java.nio.ByteBuffer buffer)
Vector4f
set(java.nio.FloatBuffer buffer)
Vector4f
set(Vector2fc v, float z, float w)
Vector4f
set(Vector3fc v, float w)
Vector4f
set(Vector4dc v)
Vector4f
set(Vector4fc v)
Vector4f
setComponent(int component, float value)
Vector4f
smoothStep(Vector4fc v, float t, Vector4f dest)
Vector4f
sub(float x, float y, float z, float w)
Vector4f
sub(float x, float y, float z, float w, Vector4f dest)
Vector4f
sub(Vector4fc v)
Vector4f
sub(Vector4fc v, Vector4f dest)
Vector4fc
toImmutable()
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat formatter)
float
w()
void
writeExternal(java.io.ObjectOutput out)
float
x()
float
y()
float
z()
Vector4f
zero()
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:
mulProject
in interfaceVector4fc
-
mulProject
-
mul
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
div
-
rotate
-
rotate
-
lengthSquared
public float lengthSquared()- Specified by:
lengthSquared
in 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:
toString
in 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:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
min
-
max
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
smoothStep
- Specified by:
smoothStep
in interfaceVector4fc
-
hermite
-
lerp
-
lerp
-
toImmutable
-