STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | List of all members
Concurrency::graphics::float_2 Class Reference

Represent a short vector of 2 float's. More...

#include <amp_short_vectors.h>

Public Types

typedef float value_type
 

Public Member Functions

 __declspec (property(get=get_x, put=set_x)) float x
 Property for accessing element 0 of this float_2 as a float. More...
 
 __declspec (property(get=get_x, put=set_x)) float r
 Property for accessing element 0 of this float_2 as a float. More...
 
float get_x () const __GPU
 Returns element 0 of this float_2. More...
 
float & ref_x () __GPU
 Returns reference to element 0 of this float_2. More...
 
float & ref_r () __GPU
 Returns reference to element 0 of this float_2. More...
 
void set_x (float _Value) __GPU
 Set element 0 of this float_2 with a float. More...
 
 __declspec (property(get=get_y, put=set_y)) float y
 Property for accessing element 1 of this float_2 as a float. More...
 
 __declspec (property(get=get_y, put=set_y)) float g
 Property for accessing element 1 of this float_2 as a float. More...
 
float get_y () const __GPU
 Returns element 1 of this float_2. More...
 
float & ref_y () __GPU
 Returns reference to element 1 of this float_2. More...
 
float & ref_g () __GPU
 Returns reference to element 1 of this float_2. More...
 
void set_y (float _Value) __GPU
 Set element 1 of this float_2 with a float. More...
 
 float_2 () __GPU
 Default constructor, initializes all elements with 0. More...
 
 float_2 (float _V0, float _V1) __GPU
 Constructor. More...
 
 float_2 (float _V) __GPU
 Constructor. More...
 
 float_2 (const uint_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 float_2 (const int_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 float_2 (const unorm_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 float_2 (const norm_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 float_2 (const double_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
float_2 operator- () const __GPU
 
float_2operator++ () __GPU
 
float_2 operator++ (int) __GPU
 
float_2operator-- () __GPU
 
float_2 operator-- (int) __GPU
 
float_2operator+= (const float_2 &_Other) __GPU
 
float_2operator-= (const float_2 &_Other) __GPU
 
float_2operator*= (const float_2 &_Other) __GPU
 
float_2operator/= (const float_2 &_Other) __GPU
 
 __declspec (property(get=get_xy, put=set_xy)) float_2 xy
 Property for accessing element 0, and 1 of this float_2 as a float_2. More...
 
 __declspec (property(get=get_xy, put=set_xy)) float_2 rg
 Property for accessing element 0, and 1 of this float_2 as a float_2. More...
 
float_2 get_xy () const __GPU
 Returns a float_2 that is composed of element 0, and element 1 of this float_2. More...
 
void set_xy (const float_2 &_Value) __GPU
 Set element 0, and 1 of this float_2 with a float_2. More...
 
 __declspec (property(get=get_yx, put=set_yx)) float_2 yx
 Property for accessing element 1, and 0 of this float_2 as a float_2. More...
 
 __declspec (property(get=get_yx, put=set_yx)) float_2 gr
 Property for accessing element 1, and 0 of this float_2 as a float_2. More...
 
float_2 get_yx () const __GPU
 Returns a float_2 that is composed of element 1, and element 0 of this float_2. More...
 
void set_yx (const float_2 &_Value) __GPU
 Set element 1, and 0 of this float_2 with a float_2. More...
 

Static Public Attributes

static const int size = 2
 

Private Attributes

value_type _M_x
 
value_type _M_y
 

Static Private Attributes

static const _Short_vector_base_type_id _Base_type_id = _Float_type
 

Detailed Description

Represent a short vector of 2 float's.

Member Typedef Documentation

Constructor & Destructor Documentation

Concurrency::graphics::float_2::float_2 ( )
inline

Default constructor, initializes all elements with 0.

7991  {
7992  _M_x = 0;
7993  _M_y = 0;
7994  }
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
Concurrency::graphics::float_2::float_2 ( float  _V0,
float  _V1 
)
inline

Constructor.

Parameters
_V0The value to initialize element 0.
_V1The value to initialize element 1.
8006  {
8007  _M_x = _V0;
8008  _M_y = _V1;
8009  }
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
Concurrency::graphics::float_2::float_2 ( float  _V)
inline

Constructor.

Parameters
_VThe value for initialization.
8018  {
8019  _M_x = _V;
8020  _M_y = _V;
8021  }
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
Concurrency::graphics::float_2::float_2 ( const uint_2 _Other)
inlineexplicit

Constructor. Each element is initialized by casting from the corresponding element in _Other.

Parameters
_OtherThe object used to initialize.
22304  {
22305  uint_2 _Value = _Other;
22306  _M_x = static_cast<value_type>(_Value.x);
22307  _M_y = static_cast<value_type>(_Value.y);
22308  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
float value_type
Definition: amp_short_vectors.h:7877
Concurrency::graphics::float_2::float_2 ( const int_2 _Other)
inlineexplicit

Constructor. Each element is initialized by casting from the corresponding element in _Other.

Parameters
_OtherThe object used to initialize.
22311  {
22312  int_2 _Value = _Other;
22313  _M_x = static_cast<value_type>(_Value.x);
22314  _M_y = static_cast<value_type>(_Value.y);
22315  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
float value_type
Definition: amp_short_vectors.h:7877
Concurrency::graphics::float_2::float_2 ( const unorm_2 _Other)
inlineexplicit

Constructor. Each element is initialized by casting from the corresponding element in _Other.

Parameters
_OtherThe object used to initialize.
22318  {
22319  unorm_2 _Value = _Other;
22320  _M_x = static_cast<value_type>(_Value.x);
22321  _M_y = static_cast<value_type>(_Value.y);
22322  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
float value_type
Definition: amp_short_vectors.h:7877
Concurrency::graphics::float_2::float_2 ( const norm_2 _Other)
inlineexplicit

Constructor. Each element is initialized by casting from the corresponding element in _Other.

Parameters
_OtherThe object used to initialize.
22325  {
22326  norm_2 _Value = _Other;
22327  _M_x = static_cast<value_type>(_Value.x);
22328  _M_y = static_cast<value_type>(_Value.y);
22329  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
float value_type
Definition: amp_short_vectors.h:7877
Concurrency::graphics::float_2::float_2 ( const double_2 _Other)
inlineexplicit

Constructor. Each element is initialized by casting from the corresponding element in _Other.

Parameters
_OtherThe object used to initialize.
22332  {
22333  double_2 _Value = _Other;
22334  _M_x = static_cast<value_type>(_Value.x);
22335  _M_y = static_cast<value_type>(_Value.y);
22336  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
float value_type
Definition: amp_short_vectors.h:7877

Member Function Documentation

Concurrency::graphics::float_2::__declspec ( property(get=get_x, put=set_x )

Property for accessing element 0 of this float_2 as a float.

Concurrency::graphics::float_2::__declspec ( property(get=get_x, put=set_x )

Property for accessing element 0 of this float_2 as a float.

Concurrency::graphics::float_2::__declspec ( property(get=get_y, put=set_y )

Property for accessing element 1 of this float_2 as a float.

Concurrency::graphics::float_2::__declspec ( property(get=get_y, put=set_y )

Property for accessing element 1 of this float_2 as a float.

Concurrency::graphics::float_2::__declspec ( property(get=get_xy, put=set_xy )

Property for accessing element 0, and 1 of this float_2 as a float_2.

Concurrency::graphics::float_2::__declspec ( property(get=get_xy, put=set_xy )

Property for accessing element 0, and 1 of this float_2 as a float_2.

Concurrency::graphics::float_2::__declspec ( property(get=get_yx, put=set_yx )

Property for accessing element 1, and 0 of this float_2 as a float_2.

Concurrency::graphics::float_2::__declspec ( property(get=get_yx, put=set_yx )

Property for accessing element 1, and 0 of this float_2 as a float_2.

float Concurrency::graphics::float_2::get_x ( ) const
inline

Returns element 0 of this float_2.

Returns
Element 0 of this float_2.
7901  {
7902  return _M_x;
7903  }
value_type _M_x
Definition: amp_short_vectors.h:7882
float_2 Concurrency::graphics::float_2::get_xy ( ) const
inline

Returns a float_2 that is composed of element 0, and element 1 of this float_2.

Returns
a float_2.
8162  {
8163  return float_2(_M_x,_M_y);
8164  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
float Concurrency::graphics::float_2::get_y ( ) const
inline

Returns element 1 of this float_2.

Returns
Element 1 of this float_2.
7951  {
7952  return _M_y;
7953  }
value_type _M_y
Definition: amp_short_vectors.h:7883
float_2 Concurrency::graphics::float_2::get_yx ( ) const
inline

Returns a float_2 that is composed of element 1, and element 0 of this float_2.

Returns
a float_2.
8194  {
8195  return float_2(_M_y,_M_x);
8196  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
float_2& Concurrency::graphics::float_2::operator*= ( const float_2 _Other)
inline
8127  {
8128  float_2 _Value1 = *this;
8129  float_2 _Value2 = _Other;
8130  _Value1.x *= _Value2.x;
8131  _Value1.y *= _Value2.y;
8132  *this = _Value1;
8133  return *this;
8134  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
float_2& Concurrency::graphics::float_2::operator++ ( )
inline
8075  {
8076  float_2 _Value = *this;
8077  ++_Value._M_x;
8078  ++_Value._M_y;
8079  *this = _Value;
8080  return *this;
8081  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
float_2 Concurrency::graphics::float_2::operator++ ( int  )
inline
8084  {
8085  float_2 _Result = *this;
8086  ++(*this);
8087  return _Result;
8088  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
float_2& Concurrency::graphics::float_2::operator+= ( const float_2 _Other)
inline
8107  {
8108  float_2 _Value1 = *this;
8109  float_2 _Value2 = _Other;
8110  _Value1.x += _Value2.x;
8111  _Value1.y += _Value2.y;
8112  *this = _Value1;
8113  return *this;
8114  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
float_2 Concurrency::graphics::float_2::operator- ( void  ) const
inline
8069  {
8070  float_2 _Value = *this;
8071  return float_2(-_Value.x, -_Value.y);
8072  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
float_2& Concurrency::graphics::float_2::operator-- ( )
inline
8091  {
8092  float_2 _Value = *this;
8093  --_Value._M_x;
8094  --_Value._M_y;
8095  *this = _Value;
8096  return *this;
8097  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
float_2 Concurrency::graphics::float_2::operator-- ( int  )
inline
8100  {
8101  float_2 _Result = *this;
8102  --(*this);
8103  return _Result;
8104  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
float_2& Concurrency::graphics::float_2::operator-= ( const float_2 _Other)
inline
8117  {
8118  float_2 _Value1 = *this;
8119  float_2 _Value2 = _Other;
8120  _Value1.x -= _Value2.x;
8121  _Value1.y -= _Value2.y;
8122  *this = _Value1;
8123  return *this;
8124  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
float_2& Concurrency::graphics::float_2::operator/= ( const float_2 _Other)
inline
8137  {
8138  float_2 _Value1 = *this;
8139  float_2 _Value2 = _Other;
8140  _Value1.x /= _Value2.x;
8141  _Value1.y /= _Value2.y;
8142  *this = _Value1;
8143  return *this;
8144  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
float& Concurrency::graphics::float_2::ref_g ( )
inline

Returns reference to element 1 of this float_2.

Returns
Reference to element 1 of this float_2.
7971  {
7972  return _M_y;
7973  }
value_type _M_y
Definition: amp_short_vectors.h:7883
float& Concurrency::graphics::float_2::ref_r ( )
inline

Returns reference to element 0 of this float_2.

Returns
Reference to element 0 of this float_2.
7921  {
7922  return _M_x;
7923  }
value_type _M_x
Definition: amp_short_vectors.h:7882
float& Concurrency::graphics::float_2::ref_x ( )
inline

Returns reference to element 0 of this float_2.

Returns
Reference to element 0 of this float_2.
7911  {
7912  return _M_x;
7913  }
value_type _M_x
Definition: amp_short_vectors.h:7882
float& Concurrency::graphics::float_2::ref_y ( )
inline

Returns reference to element 1 of this float_2.

Returns
Reference to element 1 of this float_2.
7961  {
7962  return _M_y;
7963  }
value_type _M_y
Definition: amp_short_vectors.h:7883
void Concurrency::graphics::float_2::set_x ( float  _Value)
inline

Set element 0 of this float_2 with a float.

Parameters
_Valuea float value.
7932  {
7933  _M_x = _Value;
7934  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
void Concurrency::graphics::float_2::set_xy ( const float_2 _Value)
inline

Set element 0, and 1 of this float_2 with a float_2.

Parameters
_Valuea float_2 value.
8173  {
8174  float_2 _Val = _Value;
8175  _M_x = _Val.x;
8176  _M_y = _Val.y;
8177  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
_FwdIt const _Ty _Val
Definition: algorithm:1938
void Concurrency::graphics::float_2::set_y ( float  _Value)
inline

Set element 1 of this float_2 with a float.

Parameters
_Valuea float value.
7982  {
7983  _M_y = _Value;
7984  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_y
Definition: amp_short_vectors.h:7883
void Concurrency::graphics::float_2::set_yx ( const float_2 _Value)
inline

Set element 1, and 0 of this float_2 with a float_2.

Parameters
_Valuea float_2 value.
8205  {
8206  float_2 _Val = _Value;
8207  _M_y = _Val.x;
8208  _M_x = _Val.y;
8209  }
float_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:7990
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:7882
value_type _M_y
Definition: amp_short_vectors.h:7883
_FwdIt const _Ty _Val
Definition: algorithm:1938

Member Data Documentation

const _Short_vector_base_type_id Concurrency::graphics::float_2::_Base_type_id = _Float_type
staticprivate
value_type Concurrency::graphics::float_2::_M_x
private
value_type Concurrency::graphics::float_2::_M_y
private
const int Concurrency::graphics::float_2::size = 2
static

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