public final class FVector3 extends java.lang.Object implements java.lang.Comparable<FVector3>, Struct<FVector3>, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
float |
x
The x component.
|
float |
y
The y component.
|
float |
z
The y component.
|
| Constructor and Description |
|---|
FVector3() |
FVector3(float x,
float y,
float z)
Initializes a new instance of the
FVector3. |
FVector3(FVector2 xy,
float z)
Initializes a new instance of the
FVector3. |
FVector3(FVector4 vec)
Initializes a new instance of the
FVector4. |
FVector3(Vector3 vec)
Initializes a new instance of the
FVector3. |
FVector3(Vector4 vec)
Initializes a new instance of the
FVector4. |
| Modifier and Type | Method and Description |
|---|---|
static FVector3 |
add(FVector3 a,
FVector3 b)
+ Operator overloading
|
FVector3 |
clone()
Clone current instance
|
int |
compareTo(FVector3 other)
Compare current vector to another instance.
|
void |
copyFrom(FVector3 src)
Copy internal state from argument t
|
static Vector3 |
create(FVector3 v)
Explicit conversion operator to cast FVector3 to Vector3
|
FVector3 |
cross(FVector3 rhs)
Cross product of two vectors
|
static FVector3 |
div(FVector3 a,
float b)
/ Operator overloading
|
boolean |
equals(java.lang.Object obj) |
float |
get(int component) |
static FVector3 |
getOne()
The unit scale vector with all components are all 1
|
static FVector3 |
getUnitX()
Gets unit vector (1, 0, 0)
|
static FVector3 |
getUnitY()
Gets unit vector (0, 1, 0)
|
static FVector3 |
getUnitZ()
Gets unit vector (0, 0, 1)
|
static FVector3 |
getZero()
The Zero vector.
|
int |
hashCode() |
static FVector3 |
mul(float lhs,
FVector3 rhs)
Operator overloading for *
|
static FVector3 |
mul(FVector3 a,
float b)
* Operator overloading
|
static FVector3 |
negative(FVector3 a)
- Operator overloading
|
FVector3 |
normalize()
Normalizes this instance.
|
static FVector3 |
parse(java.lang.String input)
Parse vector from string representation
|
void |
set(int component,
float value) |
static FVector3 |
sub(FVector3 a,
FVector3 b)
- Operator overloading
|
java.lang.String |
toString()
Returns a string that represents the
FVector3 |
public float x
public float y
public float z
public FVector3(float x,
float y,
float z)
FVector3.x - X component of the vectory - Y component of the vectorz - Z component of the vectorpublic FVector3(FVector2 xy, float z)
FVector3.xy - XY component of the vectorz - Z component of the vectorpublic FVector3(Vector3 vec)
FVector3.vec - Vector3 in double typepublic FVector3(Vector4 vec)
FVector4.vec - Vector4 in double typepublic FVector3(FVector4 vec)
FVector4.vec - Vector4 in double typepublic FVector3()
public static FVector3 getZero()
public static FVector3 getOne()
public static FVector3 getUnitX()
public static FVector3 getUnitY()
public static FVector3 getUnitZ()
public int compareTo(FVector3 other)
compareTo in interface java.lang.Comparable<FVector3>public static Vector3 create(FVector3 v)
v - Vector3 in float typepublic static FVector3 parse(java.lang.String input)
input - Vector separated by white spacespublic java.lang.String toString()
FVector3toString in class java.lang.Objectpublic float get(int component)
public void set(int component,
float value)
public FVector3 normalize()
public FVector3 cross(FVector3 rhs)
rhs - Right hand side value.FVector3s.public static FVector3 add(FVector3 a, FVector3 b)
a - First vectorb - Second vectorpublic static FVector3 negative(FVector3 a)
a - Input vectorpublic static FVector3 sub(FVector3 a, FVector3 b)
a - First vectorb - Second vectorpublic static FVector3 mul(FVector3 a, float b)
a - First vectorb - Second vectorpublic static FVector3 mul(float lhs, FVector3 rhs)
lhs - The left scalarrhs - The right vectorpublic static FVector3 div(FVector3 a, float b)
a - First vectorb - Second vectorpublic void copyFrom(FVector3 src)
Structpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object