public final class Vector4 extends Object implements com.aspose.threed.Struct<Vector4>, 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(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() |
void |
copyFrom(Vector4 src) |
boolean |
equals(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)
|
String |
toString()
|
public double x
public double y
public double z
public double w
public Vector4(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(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 String toString()
public Vector4 clone()
public void copyFrom(Vector4 src)
copyFrom
in interface com.aspose.threed.Struct<Vector4>
Copyright © 2018. All rights reserved.