FVector2
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.threed.Struct, java.io.Serializable
public final class FVector2 implements Struct<FVector2>, Serializable
A float vector with two components.
Constructors
| Constructor | Description |
|---|---|
| FVector2(float x, float y) | Initializes a new instance of the FVector2. |
| FVector2(Vector2 vec) | Initializes a new instance of the FVector2. |
| FVector2() |
Fields
| Field | Description |
|---|---|
| x | The x component. |
| y | The y component. |
Methods
| Method | Description |
|---|---|
| add(FVector2 a, FVector2 b) | + Operator overloading |
| clone() | |
| copyFrom(FVector2 src) | |
| create(FVector2 v) | Explicit conversion operator to cast FVector2 to Vector2 |
| equals(FVector2 rhs) | Check if two vectors are equal |
| equals(Object obj) | Check if two vectors are equal |
| getClass() | |
| hashCode() | Gets the hash code of this instance |
| mul(FVector2 a, float b) | * operator overloading |
| notify() | |
| notifyAll() | |
| op_eq(FVector2 a, FVector2 b) | == Operator overloading |
| op_ne(FVector2 a, FVector2 b) | ! |
| sub(FVector2 a, FVector2 b) | - Operator overloading |
| toString() | Returns a string that represents the FVector2 |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
FVector2(float x, float y)
public FVector2(float x, float y)
Initializes a new instance of the FVector2.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | float | X component of the vector |
| y | float | Y component of the vector |
FVector2(Vector2 vec)
public FVector2(Vector2 vec)
Initializes a new instance of the FVector2.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| vec | Vector2 | Vector2 in double type |
FVector2()
public FVector2()
x
public float x
The x component.
y
public float y
The y component.
add(FVector2 a, FVector2 b)
public static FVector2 add(FVector2 a, FVector2 b)
+ Operator overloading
Parameters:
| Parameter | Type | Description |
|---|---|---|
| a | FVector2 | First vector |
| b | FVector2 | Second vector |
Returns: FVector2 - The sum of two vectors.
clone()
public FVector2 clone()
Clone current instance
Returns: FVector2
copyFrom(FVector2 src)
public void copyFrom(FVector2 src)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| src | FVector2 |
create(FVector2 v)
public static Vector2 create(FVector2 v)
Explicit conversion operator to cast FVector2 to Vector2
Parameters:
| Parameter | Type | Description |
|---|---|---|
| v | FVector2 | Vector 2 in float type. |
Returns: Vector2
equals(FVector2 rhs)
public boolean equals(FVector2 rhs)
Check if two vectors are equal
Parameters:
| Parameter | Type | Description |
|---|---|---|
| rhs | FVector2 |
Returns: boolean - True if all components are equal.
equals(Object obj)
public boolean equals(Object obj)
Check if two vectors are equal
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object |
Returns: boolean - True if input is a vector and all components are equal.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
hashCode()
public int hashCode()
Gets the hash code of this instance
Returns: int - The hash code of the vector.
mul(FVector2 a, float b)
public static FVector2 mul(FVector2 a, float b)
* operator overloading
Parameters:
| Parameter | Type | Description |
|---|---|---|
| a | FVector2 | First vector |
| b | float | Second vector |
Returns: FVector2 - The product of two vectors.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
op_eq(FVector2 a, FVector2 b)
public static boolean op_eq(FVector2 a, FVector2 b)
== Operator overloading
Parameters:
| Parameter | Type | Description |
|---|---|---|
| a | FVector2 | First vector |
| b | FVector2 | Second vector |
Returns: boolean - True if all components are equal.
op_ne(FVector2 a, FVector2 b)
public static boolean op_ne(FVector2 a, FVector2 b)
!= Operator overloading
Parameters:
| Parameter | Type | Description |
|---|---|---|
| a | FVector2 | First vector |
| b | FVector2 | Second vector |
Returns: boolean - True if any component is different.
sub(FVector2 a, FVector2 b)
public static FVector2 sub(FVector2 a, FVector2 b)
- Operator overloading
Parameters:
| Parameter | Type | Description |
|---|---|---|
| a | FVector2 | First vector |
| b | FVector2 | Second vector |
Returns: FVector2 - The difference of two vectors.
toString()
public String toString()
Returns a string that represents the FVector2
Returns: java.lang.String - String representation of current vector.
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |