public final class Vector4 extends java.lang.Object implements java.lang.Comparable<Vector4>, com.aspose.threed.Struct<Vector4>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
double |
w
The w component.
|
double |
x
The x component.
|
double |
y
The y component.
|
double |
z
The z component.
|
Constructor and Description |
---|
Vector4() |
Vector4(java.awt.Color color)
Initializes a new instance of the
Vector4 struct. |
Vector4(double x,
double y,
double z)
Initializes a new instance of the
Vector4 struct. |
Vector4(double x,
double y,
double z,
double w)
Initializes a new instance of the
Vector4 struct. |
Vector4(Vector3 vec)
Initializes a new instance of the
Vector4 struct. |
Vector4(Vector3 vec,
double w)
Initializes a new instance of the
Vector4 struct. |
Modifier and Type | Method and Description |
---|---|
static Vector4 |
add(Vector4 lhs,
Vector4 rhs)
Operator overloading for +
|
Vector4 |
clone() |
int |
compareTo(Vector4 other)
Compare current vector to another instance.
|
void |
copyFrom(Vector4 src) |
boolean |
equals(java.lang.Object obj)
Check if two vectors are equal
|
int |
hashCode()
Gets the hash code of this vector
|
static Vector4 |
mul(Vector4 lhs,
double rhs)
Operator overloading for *
|
static Vector4 |
mul(Vector4 lhs,
Vector4 rhs)
Operator overloading for *
|
void |
set(double newX,
double newY,
double newZ)
Sets vector's xyz components at a time, w will be set to 1
|
void |
set(double newX,
double newY,
double newZ,
double newW)
Sets vector's all components at a time
|
static Vector4 |
sub(Vector4 lhs,
Vector4 rhs)
Operator overloading for - (minus)
|
java.lang.String |
toString()
Returns a
String that represents the current Vector4 . |
public double x
public double y
public double z
public double w
public Vector4(java.awt.Color color)
Vector4
struct.color
- Color.public Vector4(Vector3 vec, double w)
Vector4
struct.vec
- Vec.w
- The width.public Vector4(Vector3 vec)
Vector4
struct.vec
- Vec.public Vector4(double x, double y, double z)
Vector4
struct.x
- The x coordinate.y
- The y coordinate.z
- The z coordinate.public Vector4(double x, double y, double z, double w)
Vector4
struct.x
- The x coordinate.y
- The y coordinate.z
- The z coordinate.w
- The width.public Vector4()
public static Vector4 add(Vector4 lhs, Vector4 rhs)
lhs
- The left vectorrhs
- The right vectorpublic static Vector4 sub(Vector4 lhs, Vector4 rhs)
lhs
- The left vectorrhs
- The right vectorpublic static Vector4 mul(Vector4 lhs, Vector4 rhs)
lhs
- The left vectorrhs
- The right vectorpublic static Vector4 mul(Vector4 lhs, double rhs)
lhs
- The left vectorrhs
- The right double valuepublic void set(double newX, double newY, double newZ)
newX
- New X component.newY
- New Y component.newZ
- New Z component.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- public void set(double newX, double newY, double newZ, double newW)
newX
- New X component.newY
- New Y component.newZ
- New Z component.newW
- New W component.public java.lang.String toString()
String
that represents the current Vector4
.toString
in class java.lang.Object
String
that represents the current Vector4
.public int compareTo(Vector4 other)
compareTo
in interface java.lang.Comparable<Vector4>
other
- public Vector4 clone()
clone
in interface com.aspose.threed.Struct<Vector4>
clone
in class java.lang.Object
public void copyFrom(Vector4 src)
copyFrom
in interface com.aspose.threed.Struct<Vector4>
public int hashCode()
hashCode
in class java.lang.Object