|
|
constexpr | BaseVector3 () noexcept=default |
| | Construct a zero vector.
|
| |
|
constexpr | BaseVector3 (T x, T y, T z=T{}) noexcept |
| | Construct from coordinates.
|
| |
|
constexpr | BaseVector3 (const T data[]) noexcept |
| | Construct from a scalar array.
|
| |
|
constexpr auto | Tie () const |
| | Convert to tuple.
|
| |
|
constexpr bool | operator== (const BaseVector3 &rhs) const |
| | Test for equality with another vector without epsilon.
|
| |
|
constexpr bool | operator!= (const BaseVector3 &rhs) const |
| | Test for inequality with another vector without epsilon.
|
| |
|
constexpr BaseVector3 | operator+ (const BaseVector3 &rhs) const |
| | Add a vector.
|
| |
|
constexpr BaseVector3 | operator- () const |
| | Return negation.
|
| |
|
constexpr BaseVector3 | operator- (const BaseVector3 &rhs) const |
| | Subtract a vector.
|
| |
|
constexpr BaseVector3 | operator* (T rhs) const |
| | Multiply with a scalar.
|
| |
|
constexpr BaseVector3 | operator* (const BaseVector3 &rhs) const |
| | Multiply with a vector.
|
| |
|
constexpr BaseVector3 | operator/ (T rhs) const |
| | Divide by a scalar.
|
| |
|
constexpr BaseVector3 | operator/ (const BaseVector3 &rhs) const |
| | Divide by a vector.
|
| |
|
constexpr BaseVector3 & | operator+= (const BaseVector3 &rhs) |
| | Add-assign a vector.
|
| |
|
constexpr BaseVector3 & | operator-= (const BaseVector3 &rhs) |
| | Subtract-assign a vector.
|
| |
|
constexpr BaseVector3 & | operator*= (T rhs) |
| | Multiply-assign a scalar.
|
| |
|
constexpr BaseVector3 & | operator*= (const BaseVector3 &rhs) |
| | Multiply-assign a vector.
|
| |
|
constexpr BaseVector3 & | operator/= (T rhs) |
| | Divide-assign a scalar.
|
| |
|
constexpr BaseVector3 & | operator/= (const BaseVector3 &rhs) |
| | Divide-assign a vector.
|
| |
|
void | Normalize () |
| | Normalize to unit length.
|
| |
| T | Length () const |
| |
| constexpr T | LengthSquared () const |
| |
|
constexpr T | DotProduct (const BaseVector3 &rhs) const |
| | Calculate dot product.
|
| |
|
T | AbsDotProduct (const BaseVector3 &rhs) const |
| | Calculate absolute dot product.
|
| |
|
T | ProjectOntoAxis (const BaseVector3 &axis) const |
| | Project direction vector onto axis.
|
| |
|
BaseVector3 | ProjectOntoPlane (const BaseVector3 &origin, const BaseVector3 &normal) const |
| | Project position vector onto plane with given origin and normal.
|
| |
|
T | ProjectOntoLineScalar (const BaseVector3 &from, const BaseVector3 &to, bool clamped=false) const |
| | Project position vector onto line segment. Returns interpolation factor between line points.
|
| |
|
BaseVector3 | ProjectOntoLine (const BaseVector3 &from, const BaseVector3 &to, bool clamped=false) const |
| | Project position vector onto line segment. Returns new position.
|
| |
|
T | DistanceToPoint (const BaseVector3 &point) const |
| | Calculate distance to another position vector.
|
| |
|
T | DistanceToPlane (const BaseVector3 &origin, const BaseVector3 &normal) const |
| | Calculate distance to the plane with given origin and normal.
|
| |
|
BaseVector3 | Orthogonalize (const BaseVector3 &axis) const |
| | Make vector orthogonal to the axis.
|
| |
|
constexpr BaseVector3 | CrossProduct (const BaseVector3 &rhs) const |
| | Calculate cross product.
|
| |
|
BaseVector3 | Abs () const |
| | Return absolute vector.
|
| |
|
BaseVector3 | Lerp (const BaseVector3 &rhs, T t) const |
| | Linear interpolation with another vector.
|
| |
|
bool | Equals (const BaseVector3 &rhs, T eps=static_cast< T >(M_EPSILON)) const |
| | Test for equality with another vector with epsilon.
|
| |
|
T | Angle (const BaseVector3 &rhs) const |
| | Returns the angle between this vector and another vector in degrees, from 0 to 180.
|
| |
| T | SignedAngle (const BaseVector3 &rhs, const BaseVector3 &axis) const |
| |
|
bool | IsNaN () const |
| | Return whether any component is NaN.
|
| |
|
bool | IsInf () const |
| | Return whether any component is Inf.
|
| |
|
BaseVector3 | Normalized () const |
| | Return normalized to unit length.
|
| |
|
BaseVector3 | NormalizedOrDefault (const BaseVector3 &defaultValue=BaseVector3::ZERO, T eps=static_cast< T >(M_LARGE_EPSILON)) const |
| | Return normalized to unit length or zero if length is too small.
|
| |
|
BaseVector3 | ReNormalized (T minLength, T maxLength, const BaseVector3 &defaultValue=BaseVector3::ZERO, T eps=static_cast< T >(M_LARGE_EPSILON)) const |
| | Return normalized vector with length in given range.
|
| |
|
constexpr const T * | Data () const |
| | Return data.
|
| |
|
constexpr T * | MutableData () |
| | Return mutable data.
|
| |
|
ea::string | ToString () const |
| | Return as string.
|
| |
|
unsigned | ToHash () const |
| | Return hash value for HashSet & HashMap.
|
| |
|
template<class OtherVectorType > |
| constexpr OtherVectorType | Cast (typename OtherVectorType::ScalarType w={}) const |
| | Cast vector to different type.
|
| |
|
template<class OtherVectorType > |
| constexpr OtherVectorType | CastXZ (typename OtherVectorType::ScalarType w={}) const |
| | Cast vector to different type. Y and Z components are shuffled.
|
| |
|
IntVector2 | ToIntVector2 () const |
| | Return IntVector2 vector (z component is ignored).
|
| |
|
Vector2 | ToVector2 () const |
| | Return Vector2 vector (z component is ignored).
|
| |
|
IntVector3 | ToIntVector3 () const |
| | Return IntVector3 vector.
|
| |
|
Vector4 | ToVector4 (float w=0.0f) const |
| | Return Vector4 vector.
|
| |
|
BaseVector2< T > | ToXZ () const |
| | Return x and z components as 2D vector (y component is ignored).
|
| |
template<class T>
class Urho3D::BaseVector3< T >
Three-dimensional vector with real-number values.