Interface MVector2d
- All Superinterfaces:
- Vector2d
Interface for handling vectors in the XY-plane. Allows modification of the
 vector.
- Since:
- 9.10.2
- 
Field SummaryFields inherited from interface com.solibri.geometry.linearalgebra.Vector2dNEG_UNIT_X, NEG_UNIT_Y, UNIT_X, UNIT_Y, ZERO
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddInPlace(Vector2d vec) Adds the given vector to this vector in place.static MVector2dcreate()Returns a 2-dimensional vector with the X and Y values set to 0.static MVector2dcreate(double x, double y) Returns a 2-dimensional vector with the given component values.static MVector2dReturns a 2-dimensional vector with the X and Y values set to those of the given vector.voidinterpolateInPlace(Vector2d vector, double alpha) Sets this vector to be the interpolation between this vector and the given vector so that the weight of the given vector is alpha (this = (1 - alpha) * this + alpha * vector).voidNegates this vector in place.voidNormalizes this vector in place to be of length 1.voidscaleInPlace(double scalar) Multiplies this vector in place by the given scalar.voidset(double x, double y) Sets the X and Y components of this vector to the given values.voidSets the X and Y components of this vector to the values of the given vector.voidsetX(double x) Sets the X component of this vector.voidsetY(double y) Sets the Y component of this vector.voidsubtractInPlace(Vector2d other) Subtracts in place the given vector from this vector.to2dVectors(List<? extends Vector3d> vectors) Returns the vectors in the given list projected to the XY-plane.Methods inherited from interface com.solibri.geometry.linearalgebra.Vector2dadd, angle, distance, distanceSquared, dotProduct, equalsWithTolerance, getClockwiseAngle, getLength, getLengthSquared, getX, getY, interpolate, negate, normalize, scale, subtract, to3dVector
- 
Method Details- 
createReturns a 2-dimensional vector with the X and Y values set to 0.- Returns:
- a vector with all components set to 0.
- Since:
- 9.10.2
 
- 
createReturns a 2-dimensional vector with the given component values.- Parameters:
- x- the value of the X component
- y- the value of the Y component
- Returns:
- a 2-dimensional vector with the given component values
- Since:
- 9.10.2
 
- 
createReturns a 2-dimensional vector with the X and Y values set to those of the given vector.- Parameters:
- vec- the vector used for setting the values of the created vector
- Returns:
- a 2-dimensional vector with the values set to those of the given vector
- Since:
- 9.10.2
 
- 
to2dVectorsReturns the vectors in the given list projected to the XY-plane. The order of the vectors is preserved.- Parameters:
- vectors- vectors that are projected to the XY-plane
- Returns:
- the vectors in the given list projected to the XY-plane
- Since:
- 9.10.2
 
- 
addInPlaceAdds the given vector to this vector in place.- Parameters:
- vec- vector that is added to this vector
- Since:
- 9.10.2
 
- 
interpolateInPlaceSets this vector to be the interpolation between this vector and the given vector so that the weight of the given vector is alpha (this = (1 - alpha) * this + alpha * vector). Values smaller than 0 default to 0 and value greater than 1 default to 1.- Parameters:
- vector- the vector with which this is interpolated
- alpha- the interpolation factor
- Since:
- 9.10.2
 
- 
negateInPlacevoid negateInPlace()Negates this vector in place.- Since:
- 9.10.2
 
- 
normalizeInPlacevoid normalizeInPlace()Normalizes this vector in place to be of length 1. If this vector is a zero vector, then all components of this vector are set to NaN.- Since:
- 9.10.2
 
- 
scaleInPlacevoid scaleInPlace(double scalar) Multiplies this vector in place by the given scalar.- Parameters:
- scalar- the scalar used in the multiplication
- Since:
- 9.10.2
 
- 
setvoid set(double x, double y) Sets the X and Y components of this vector to the given values.- Parameters:
- x- the value of the X component
- y- the value of the Y component
- Since:
- 9.10.2
 
- 
setSets the X and Y components of this vector to the values of the given vector.- Parameters:
- vec- the vector used for setting the values of this vector
- Since:
- 9.10.2
 
- 
setXvoid setX(double x) Sets the X component of this vector.- Parameters:
- x- the value for the X component
- Since:
- 9.10.2
 
- 
setYvoid setY(double y) Sets the Y component of this vector.- Parameters:
- y- the value for the Y component
- Since:
- 9.10.2
 
- 
subtractInPlaceSubtracts in place the given vector from this vector.- Parameters:
- other- the vector that is subtracted from this vector
- Since:
- 9.10.2
 
 
-