LVector3f
-
class LVector3f
Bases:
LVecBase3f
This is a three-component vector distance (as opposed to a three-component point, which represents a particular point in space). Some of the methods are slightly different between
LPoint3
andLVector3
; in particular, subtraction of two points yields a vector, while addition of a vector and a point yields a point.Inheritance diagram
-
LVector3f(void) = default
-
LVector3f(LVecBase3f const ©)
-
LVector3f(float fill_value)
-
LVector3f(float x, float y, float z)
-
LVector3f(LVecBase2f const ©, float z)
-
float angle_deg(LVector3f const &other) const
Returns the angle between this vector and the other one, expressed in degrees. Both vectors should be initially normalized.
-
float angle_rad(LVector3f const &other) const
Returns the unsigned angle between this vector and the other one, expressed in radians. Both vectors should be initially normalized.
-
LVector3f back(CoordinateSystem cs = ::CS_default)
Returns the back vector for the given coordinate system.
-
LVector3f cross(LVecBase3f const &other) const
-
LVector3f down(CoordinateSystem cs = ::CS_default)
Returns the down vector for the given coordinate system.
-
LVector3f forward(CoordinateSystem cs = ::CS_default)
Returns the forward vector for the given coordinate system.
-
static TypeHandle get_class_type(void)
-
LVector2f get_xy(void) const
Returns a 2-component vector that shares just the first two components of this vector.
-
LVector2f get_xz(void) const
Returns a 2-component vector that shares just the first and last components of this vector.
-
LVector2f get_yz(void) const
Returns a 2-component vector that shares just the last two components of this vector.
-
LVector3f left(CoordinateSystem cs = ::CS_default)
Returns the left vector for the given coordinate system.
-
LVector3f normalized(void) const
Normalizes the vector and returns the normalized vector as a copy. If the vector was a zero-length vector, a zero length vector will be returned.
-
LVector3f project(LVecBase3f const &onto) const
Returns a new vector representing the projection of this vector onto another one. The resulting vector will be a scalar multiple of onto.
-
LVector3f rfu(float right, float fwd, float up, CoordinateSystem cs = ::CS_default)
INLINE_LINMATH static FLOATNAME(LVector3) & rfu(FLOATTYPE right,
Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector.
-
LVector3f right(CoordinateSystem cs = ::CS_default)
Returns the right vector for the given coordinate system.
-
float signed_angle_deg(LVector3f const &other, LVector3f const &ref) const
Returns the signed angle between two vectors. The angle is positive if the rotation from this vector to other is clockwise when looking in the direction of the ref vector.
Vectors (except the ref vector) should be initially normalized.
-
float signed_angle_rad(LVector3f const &other, LVector3f const &ref) const
returns the signed angle between two vectors. The angle is positive if the rotation from this vector to other is clockwise when looking in the direction of the ref vector.
Vectors (except the ref vector) should be initially normalized.
-
LVector3f(void) = default