BBMOD_Vec3

A constructor defined in BBMOD_Vec3.gml

new BBMOD_Vec3([_x[, _y, _z]])

Description

A 3D vector.

Arguments

Name Type Description
_x Real The first component of the vector. Defaults to 0.
_y Real The second component of the vector. Defaults to _x.
_z Real The third component of the vector. Defaults to _x.

Properties

Name Description
X The first component of the vector.
Y The second component of the vector.
Z The third component of the vector.

Methods

Name Description
Abs Creates a new vector where each component is equal to the absolute value of the original component.
AbsSelf Sets each component to its absolute value.
Add Adds vectors and returns the result as a new vector.
AddSelf Adds vectors and stores the result into self.
Ceil Applies function ceil to each component of the vector and returns the result as a new vector.
CeilSelf Applies function ceil to each component of the vector and stores the result into self.
Clamp Clamps each component of the vector between corresponding components of _min and _max and returns the result as a new vector.
ClampLength Clamps the length of the vector between _min and _max and returns the result as a new vector.
ClampLengthSelf Clamps the length of the vector between _min and _max and stores the result into self.
ClampSelf Clamps each component of the vector between corresponding components of _min and _max and stores the result into self.
Clone Creates a clone of the vector.
Copy Copies components of the vector to the _dest vector.
Cross Computes a cross product of this vector and vector _v and returns the result as a new vector.
CrossSelf Computes a cross product of this vector and vector _v and stores the result into self.
Dot Computes the dot product of this vector and vector _v.
Equals Checks whether this vectors equals to vector _v.
Floor Applies function floor to each component of the vector and returns the result as a new vector.
FloorSelf Applies function floor to each component of the vector and stores the result into self.
Frac Applies function frac to each component of the vector and returns the result as a new vector.
FracSelf Applies function frac to each component of the vector and stores the result into self.
FromArray Loads vector components from an array.
FromBarycentric Computes the vector components using a formula _v1 + _f * (_v2 - _v1) + _g * (_v3 - _v1).
FromBuffer Loads vector components from a buffer.
Get Retrieves vector component at given index (0 is X, 1 is Y, etc.).
Length Computes the length of the vector.
LengthSqr Computes a squared length of the vector.
Lerp Linearly interpolates between vector _v by the given amount and returns the result as a new vector.
LerpSelf Linearly interpolates between vector _v by the given amount and stores the result into self.
MaxComponent Computes the greatest component of the vector.
Maximize Creates a new vector where each component is the maximum component from this vector and vector _v.
MaximizeSelf Takes the maximum of each component of this vector and vector _v and stores it into self.
MinComponent Computes the smallest component of the vector.
Minimize Creates a new vector where each component is the minimum component from this vector and vector _v.
MinimizeSelf Takes the minimum from each component of this vector and vector _v and stores it into self.
Mul Multiplies the vector with vector _v and returns the result as a new vector.
MulSelf Multiplies the vector with vector _v and stores the result into self.
Negate Negates the vector and returns the result as a new vector.
NegateSelf Negates the vector and stores the result into self.
Normalize Normalizes the vector and returns the result as a new vector.
NormalizeSelf Normalizes the vector and stores the result into self.
Orthonormalize Orthonormalizes the vectors in-place using the Gram–Schmidt process.
Reflect Reflects the vector from vector _v and returns the result as a new vector.
ReflectSelf Reflects the vector from vector _v and stores the result into self.
Round Applies function round to each component of the vector and returns the result as a new vector.
RoundSelf Applies function round to each component of the vector and stores the result into self.
Scale Scales each component of the vector by _s and returns the result as a new vector.
ScaleSelf Scales each component of the vector by _s and stores the result into self.
Set Sets vector components in-place.
SetIndex Sets vector component in-place.
Sub Subtracts vector _v from this vector and returns the result as a new vector.
SubSelf Subtracts vector _v from this vector and stores the result into self.
ToArray Writes the components of the vector into the target array.
ToBuffer Writes the components of the vector into the buffer.
Transform Transforms vector (X, Y, Z, 1.0) by a matrix and returns the result as a new vector.
TransformSelf Transforms vector (X, Y, Z, 1.0) by a matrix and stores the result into self.

See also

BBMOD_Vec2, BBMOD_Vec4

Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on April 18, 2024 using GMDoc.