NEG_UNIT_X, NEG_UNIT_Y, NEG_UNIT_Z, UNIT_X, UNIT_Y, UNIT_Z, ZERO
Modifier and Type | Method and Description |
---|---|
void |
addInPlace(Vector3d vector)
Adds the given vector to this vector in place.
|
static MVector3d |
create()
Returns a new instance with all components set to zero.
|
static MVector3d |
create(double xyz)
Returns a new instance with all components set to the given value.
|
static MVector3d |
create(double x,
double y,
double z)
Returns a new instance with the given component values.
|
static MVector3d |
create(Vector3d vector)
Returns a new instance with the same component values as in the given
vector.
|
void |
crossProductInPlace(Vector3d vector)
Sets this vector to the cross product of this vector and the other
vector.
|
void |
interpolateInPlace(Vector3d vector,
double alpha)
Interpolates linearly between this vector and the given vector and places
the result in this vector (this = (1 - alpha) * this + alpha * vector).
|
void |
negateInPlace()
Negates this vector in place.
|
void |
normalizeInPlace()
Normalizes this vector in place.
|
void |
scaleInPlace(double scalar)
Scales this vector in place by the given scalar.
|
void |
set(double x,
double y,
double z)
Sets the value of this vector to the given values.
|
void |
set(Vector3d vector)
Sets the value of this vector to the value of the given vector.
|
void |
setX(double x)
Sets the X component of this vector.
|
void |
setY(double y)
Sets the Y component of this vector.
|
void |
setZ(double z)
Sets the Z component of this vector.
|
void |
subtractInPlace(Vector3d vector)
Subtracts the given vector from this vector.
|
static List<MVector3d> |
to3dVectors(List<? extends Vector2d> vectors)
Returns a list of 3-dimensional vectors with the X and Y components from
the given vectors and the Z component set to 0.
|
add, angle, centroidOf, crossProduct, distance, distanceSquared, dotProduct, equalsWithTolerance, getLength, getLengthSquared, getX, getY, getZ, interpolate, negate, normalize, project, scale, subtract, to2dVector
static MVector3d create()
static MVector3d create(double xyz)
xyz
- the value set to all components of the returned vectorstatic MVector3d create(Vector3d vector)
static MVector3d create(double x, double y, double z)
static List<MVector3d> to3dVectors(List<? extends Vector2d> vectors)
vectors
- vectors in the XY-plane that are used for setting the X
and Y components of the returned vectorsvoid addInPlace(Vector3d vector)
vector
- vector that is added to thisvoid crossProductInPlace(Vector3d vector)
vector
- the vector with which the cross product is computedvoid negateInPlace()
void normalizeInPlace()
void interpolateInPlace(Vector3d vector, double alpha)
vector
- vector used for interpolationalpha
- interpolation coefficientvoid scaleInPlace(double scalar)
scalar
- the scalar by which this is scaledvoid set(double x, double y, double z)
x
- the value for X componenty
- the value for Y componentz
- the value for Z componentvoid set(Vector3d vector)
vector
- the vector that specifies the value that is set to this
vectorvoid setX(double x)
x
- the value for the X componentvoid setY(double y)
y
- the value for the Y component.void setZ(double z)
z
- the value for the Z componentvoid subtractInPlace(Vector3d vector)
vector
- vector that is subtracted from thisCopyright © 2019 Solibri, Inc.. All rights reserved.