vsg  1.1.0
VulkanSceneGraph library
Public Types | Public Member Functions | Public Attributes | List of all members
vsg::t_vec2< T > Struct Template Reference

t_vec2 template class that represents a 2D vector More...

#include <vec2.h>

Public Types

using value_type = T
 

Public Member Functions

constexpr t_vec2 (const t_vec2 &v)
 
constexpr t_vec2operator= (const t_vec2 &)=default
 
constexpr t_vec2 (value_type in_x, value_type in_y)
 
template<typename R >
constexpr t_vec2 (const t_vec2< R > &v)
 
constexpr std::size_t size () const
 
value_type & operator[] (std::size_t i)
 
value_type operator[] (std::size_t i) const
 
template<typename R >
t_vec2operator= (const t_vec2< R > &rhs)
 
T * data ()
 
const T * data () const
 
void set (value_type in_x, value_type in_y)
 
t_vec2operator+= (const t_vec2 &rhs)
 
t_vec2operator-= (const t_vec2 &rhs)
 
t_vec2operator*= (value_type rhs)
 
t_vec2operator*= (const t_vec2 &rhs)
 
t_vec2operator/= (value_type rhs)
 
 operator bool () const noexcept
 

Public Attributes

union {
   value_type   value [2]
 
   struct {
      value_type   x
 
      value_type   y
 
   } 
 
   struct {
      value_type   r
 
      value_type   g
 
   } 
 
   struct {
      value_type   s
 
      value_type   t
 
   } 
 
}; 
 

Detailed Description

template<typename T>
struct vsg::t_vec2< T >

t_vec2 template class that represents a 2D vector


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