Rebel Fork Framework
Urho3D::BaseIntegerVector3< T > Class Template Reference

Three-dimensional vector with integer values. More...

#include <Urho3D/Math/Vector3.h>

Inheritance diagram for Urho3D::BaseIntegerVector3< T >:
Urho3D::Detail::VectorTraits< T, 3 >

Public Member Functions

constexpr BaseIntegerVector3 () noexcept=default
 Construct a zero vector.
 
constexpr BaseIntegerVector3 (T x, T y, T z) noexcept
 Construct from coordinates.
 
constexpr BaseIntegerVector3 (const T data[]) noexcept
 Construct from an array.
 
constexpr auto Tie () const
 Convert to tuple.
 
constexpr bool operator== (const BaseIntegerVector3 &rhs) const
 Test for equality with another vector.
 
constexpr bool operator!= (const BaseIntegerVector3 &rhs) const
 Test for inequality with another vector.
 
constexpr bool operator< (const BaseIntegerVector3 &rhs) const
 Lexicographic comparison for sorting.
 
constexpr BaseIntegerVector3 operator+ (const BaseIntegerVector3 &rhs) const
 Add a vector.
 
constexpr BaseIntegerVector3 operator- () const
 Return negation.
 
constexpr BaseIntegerVector3 operator- (const BaseIntegerVector3 &rhs) const
 Subtract a vector.
 
constexpr BaseIntegerVector3 operator* (T rhs) const
 Multiply with a scalar.
 
constexpr BaseIntegerVector3 operator* (const BaseIntegerVector3 &rhs) const
 Multiply with a vector.
 
constexpr BaseIntegerVector3 operator/ (T rhs) const
 Divide by a scalar.
 
constexpr BaseIntegerVector3 operator/ (const BaseIntegerVector3 &rhs) const
 Divide by a vector.
 
constexpr BaseIntegerVector3operator+= (const BaseIntegerVector3 &rhs)
 Add-assign a vector.
 
constexpr BaseIntegerVector3operator-= (const BaseIntegerVector3 &rhs)
 Subtract-assign a vector.
 
constexpr BaseIntegerVector3operator*= (T rhs)
 Multiply-assign a scalar.
 
constexpr BaseIntegerVector3operator*= (const BaseIntegerVector3 &rhs)
 Multiply-assign a vector.
 
constexpr BaseIntegerVector3operator/= (T rhs)
 Divide-assign a scalar.
 
constexpr BaseIntegerVector3operator/= (const BaseIntegerVector3 &rhs)
 Divide-assign a vector.
 
constexpr const T * Data () const
 Return integer data.
 
constexpr T * MutableData ()
 Return integer 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).
 
Vector3 ToVector3 () const
 Return Vector3 vector.
 
Vector4 ToVector4 (float w=0.0f) const
 Return Vector4 vector.
 
Length () const
 Return length.
 

Public Attributes

x_ {}
 X coordinate.
 
y_ {}
 Y coordinate.
 
z_ {}
 Z coordinate.
 

Static Public Attributes

static const BaseIntegerVector3< T > ZERO {T{0}, T{0}, T{0}}
 Zero vector.
 
static const BaseIntegerVector3< T > LEFT {T{-1}, T{0}, T{0}}
 (-1,0,0) vector.
 
static const BaseIntegerVector3< T > RIGHT {T{1}, T{0}, T{0}}
 (1,0,0) vector.
 
static const BaseIntegerVector3< T > UP {T{0}, T{1}, T{0}}
 (0,1,0) vector.
 
static const BaseIntegerVector3< T > DOWN {T{0}, T{-1}, T{0}}
 (0,-1,0) vector.
 
static const BaseIntegerVector3< T > FORWARD {T{0}, T{0}, T{1}}
 (0,0,1) vector.
 
static const BaseIntegerVector3< T > BACK {T{0}, T{0}, T{-1}}
 (0,0,-1) vector.
 
static const BaseIntegerVector3< T > ONE {T{1}, T{1}, T{1}}
 (1,1,1) vector.
 
- Static Public Attributes inherited from Urho3D::Detail::VectorTraits< T, 3 >
static constexpr int NumComponents
 Number of compo.
 

Additional Inherited Members

- Public Types inherited from Urho3D::Detail::VectorTraits< T, 3 >
using ScalarType = T
 Underlying scalar type.
 

Detailed Description

template<class T>
class Urho3D::BaseIntegerVector3< T >

Three-dimensional vector with integer values.


The documentation for this class was generated from the following files: