LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::TVector2< SizeType > Struct Template Reference

Templated two-component vector. More...

#include <Vector2.h>

Public Member Functions

 TVector2 (const SizeType InX, const SizeType InY)
 
template<typename OtherType , typename = std::enable_if_t<std::is_convertible_v<OtherType, SizeType>>>
 TVector2 (const OtherType InX, const OtherType InY)
 
template<typename OtherType , typename = std::enable_if_t<std::is_convertible_v<OtherType, SizeType>>>
 TVector2 (const TVector2< OtherType > &Other)
 
 TVector2 (const glm::vec2 &InVec)
 
 TVector2 (const ImVec2 &InVec)
 
TVector2operator= (const TVector2 &Other)
 
TVector2operator+= (const TVector2 &Other)
 
TVector2operator-= (const TVector2 &Other)
 
TVector2 operator- (const TVector2 &Other) const
 
template<typename OtherType >
TVector2 operator- (const TVector2< OtherType > &Other) const
 
TVector2 operator+ (const TVector2 &Other) const
 
template<typename OtherType >
TVector2 operator+ (const TVector2< OtherType > &Other) const
 
template<typename OtherType >
TVector2operator= (const TVector2< OtherType > Other)
 
bool operator== (const TVector2 &Other) const
 
bool operator!= (const TVector2 &Other) const
 
template<typename OtherType >
bool operator== (const TVector2< OtherType > &Other) const
 
FORCEINLINE bool IsNull () const
 
template<typename StringType = std::string>
FORCEINLINE StringType ToString () const
 
template<typename VectorType >
VectorType As () const
 
 operator glm::vec2 ()
 
 operator ImVec2 ()
 

Static Public Member Functions

static float Distance (const TVector2 &A, const TVector2 &B)
 
template<typename VectorTypeA , typename VectorTypeB >
static SizeType Min (const VectorTypeA &A, const VectorTypeB &B)
 
template<typename VectorTypeA , typename VectorTypeB >
static SizeType Max (const VectorTypeA &A, const VectorTypeB &B)
 
template<typename VectorType >
static VectorType Inverse (const VectorType &Vector)
 
template<typename VectorType >
static VectorType InverseSafe (const VectorType &Vector)
 

Public Attributes

union { 
 
   SizeType   X 
 
   SizeType   R 
 
   SizeType   S 
 
};  
 
union { 
 
   SizeType   Y 
 
   SizeType   G 
 
   SizeType   T 
 
};  
 

Friends

std::ostream & operator<< (std::ostream &os, const TVector2 &Vector)
 

Detailed Description

template<typename SizeType>
struct LkEngine::TVector2< SizeType >

Templated two-component vector.


The documentation for this struct was generated from the following file: