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::int_2 Class Reference

Represent a short vector of 2 ints. More...

#include <amp_short_vectors.h>

Public Types

typedef int value_type
 

Public Member Functions

 __declspec (property(get=get_x, put=set_x)) int x
 Property for accessing element 0 of this int_2 as an int. More...
 
 __declspec (property(get=get_x, put=set_x)) int r
 Property for accessing element 0 of this int_2 as an int. More...
 
int get_x () const __GPU
 Returns element 0 of this int_2. More...
 
intref_x () __GPU
 Returns reference to element 0 of this int_2. More...
 
intref_r () __GPU
 Returns reference to element 0 of this int_2. More...
 
void set_x (int _Value) __GPU
 Set element 0 of this int_2 with an int. More...
 
 __declspec (property(get=get_y, put=set_y)) int y
 Property for accessing element 1 of this int_2 as an int. More...
 
 __declspec (property(get=get_y, put=set_y)) int g
 Property for accessing element 1 of this int_2 as an int. More...
 
int get_y () const __GPU
 Returns element 1 of this int_2. More...
 
intref_y () __GPU
 Returns reference to element 1 of this int_2. More...
 
intref_g () __GPU
 Returns reference to element 1 of this int_2. More...
 
void set_y (int _Value) __GPU
 Set element 1 of this int_2 with an int. More...
 
 int_2 () __GPU
 Default constructor, initializes all elements with 0. More...
 
 int_2 (int _V0, int _V1) __GPU
 Constructor. More...
 
 int_2 (int _V) __GPU
 Constructor. More...
 
 int_2 (const uint_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 int_2 (const float_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 int_2 (const unorm_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 int_2 (const norm_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 int_2 (const double_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
int_2 operator~ () const __GPU
 
int_2 operator- () const __GPU
 
int_2operator++ () __GPU
 
int_2 operator++ (int) __GPU
 
int_2operator-- () __GPU
 
int_2 operator-- (int) __GPU
 
int_2operator+= (const int_2 &_Other) __GPU
 
int_2operator-= (const int_2 &_Other) __GPU
 
int_2operator*= (const int_2 &_Other) __GPU
 
int_2operator/= (const int_2 &_Other) __GPU
 
int_2operator%= (const int_2 &_Other) __GPU
 
int_2operator^= (const int_2 &_Other) __GPU
 
int_2operator|= (const int_2 &_Other) __GPU
 
int_2operator&= (const int_2 &_Other) __GPU
 
int_2operator>>= (const int_2 &_Other) __GPU
 
int_2operator<<= (const int_2 &_Other) __GPU
 
 __declspec (property(get=get_xy, put=set_xy)) int_2 xy
 Property for accessing element 0, and 1 of this int_2 as an int_2. More...
 
 __declspec (property(get=get_xy, put=set_xy)) int_2 rg
 Property for accessing element 0, and 1 of this int_2 as an int_2. More...
 
int_2 get_xy () const __GPU
 Returns an int_2 that is composed of element 0, and element 1 of this int_2. More...
 
void set_xy (const int_2 &_Value) __GPU
 Set element 0, and 1 of this int_2 with an int_2. More...
 
 __declspec (property(get=get_yx, put=set_yx)) int_2 yx
 Property for accessing element 1, and 0 of this int_2 as an int_2. More...
 
 __declspec (property(get=get_yx, put=set_yx)) int_2 gr
 Property for accessing element 1, and 0 of this int_2 as an int_2. More...
 
int_2 get_yx () const __GPU
 Returns an int_2 that is composed of element 1, and element 0 of this int_2. More...
 
void set_yx (const int_2 &_Value) __GPU
 Set element 1, and 0 of this int_2 with an int_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 = _Int_type
 

Detailed Description

Represent a short vector of 2 ints.

Member Typedef Documentation

Constructor & Destructor Documentation

Concurrency::graphics::int_2::int_2 ( )
inline

Default constructor, initializes all elements with 0.

4306  {
4307  _M_x = 0;
4308  _M_y = 0;
4309  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
Concurrency::graphics::int_2::int_2 ( int  _V0,
int  _V1 
)
inline

Constructor.

Parameters
_V0The value to initialize element 0.
_V1The value to initialize element 1.
4321  {
4322  _M_x = _V0;
4323  _M_y = _V1;
4324  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
Concurrency::graphics::int_2::int_2 ( int  _V)
inline

Constructor.

Parameters
_VThe value for initialization.
4333  {
4334  _M_x = _V;
4335  _M_y = _V;
4336  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
Concurrency::graphics::int_2::int_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.
22181  {
22182  uint_2 _Value = _Other;
22183  _M_x = static_cast<value_type>(_Value.x);
22184  _M_y = static_cast<value_type>(_Value.y);
22185  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
int value_type
Definition: amp_short_vectors.h:4192
Concurrency::graphics::int_2::int_2 ( const float_2 _Other)
inlineexplicit

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

Parameters
_OtherThe object used to initialize.
22188  {
22189  float_2 _Value = _Other;
22190  _M_x = static_cast<value_type>(_Value.x);
22191  _M_y = static_cast<value_type>(_Value.y);
22192  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
int value_type
Definition: amp_short_vectors.h:4192
Concurrency::graphics::int_2::int_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.
22195  {
22196  unorm_2 _Value = _Other;
22197  _M_x = static_cast<value_type>(_Value.x);
22198  _M_y = static_cast<value_type>(_Value.y);
22199  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
int value_type
Definition: amp_short_vectors.h:4192
Concurrency::graphics::int_2::int_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.
22202  {
22203  norm_2 _Value = _Other;
22204  _M_x = static_cast<value_type>(_Value.x);
22205  _M_y = static_cast<value_type>(_Value.y);
22206  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
int value_type
Definition: amp_short_vectors.h:4192
Concurrency::graphics::int_2::int_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.
22209  {
22210  double_2 _Value = _Other;
22211  _M_x = static_cast<value_type>(_Value.x);
22212  _M_y = static_cast<value_type>(_Value.y);
22213  }
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
int value_type
Definition: amp_short_vectors.h:4192

Member Function Documentation

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

Property for accessing element 0 of this int_2 as an int.

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

Property for accessing element 0 of this int_2 as an int.

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

Property for accessing element 1 of this int_2 as an int.

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

Property for accessing element 1 of this int_2 as an int.

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

Property for accessing element 0, and 1 of this int_2 as an int_2.

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

Property for accessing element 0, and 1 of this int_2 as an int_2.

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

Property for accessing element 1, and 0 of this int_2 as an int_2.

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

Property for accessing element 1, and 0 of this int_2 as an int_2.

int Concurrency::graphics::int_2::get_x ( ) const
inline

Returns element 0 of this int_2.

Returns
Element 0 of this int_2.
4216  {
4217  return _M_x;
4218  }
value_type _M_x
Definition: amp_short_vectors.h:4197
int_2 Concurrency::graphics::int_2::get_xy ( ) const
inline

Returns an int_2 that is composed of element 0, and element 1 of this int_2.

Returns
an int_2.
4543  {
4544  return int_2(_M_x, _M_y);
4545  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
int Concurrency::graphics::int_2::get_y ( ) const
inline

Returns element 1 of this int_2.

Returns
Element 1 of this int_2.
4266  {
4267  return _M_y;
4268  }
value_type _M_y
Definition: amp_short_vectors.h:4198
int_2 Concurrency::graphics::int_2::get_yx ( ) const
inline

Returns an int_2 that is composed of element 1, and element 0 of this int_2.

Returns
an int_2.
4575  {
4576  return int_2(_M_y, _M_x);
4577  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
int_2& Concurrency::graphics::int_2::operator%= ( const int_2 _Other)
inline
4468  {
4469  int_2 _Value1 = *this;
4470  int_2 _Value2 = _Other;
4471  _Value1.x %= _Value2.x;
4472  _Value1.y %= _Value2.y;
4473  *this = _Value1;
4474  return *this;
4475  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator&= ( const int_2 _Other)
inline
4498  {
4499  int_2 _Value1 = *this;
4500  int_2 _Value2 = _Other;
4501  _Value1.x &= _Value2.x;
4502  _Value1.y &= _Value2.y;
4503  *this = _Value1;
4504  return *this;
4505  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator*= ( const int_2 _Other)
inline
4448  {
4449  int_2 _Value1 = *this;
4450  int_2 _Value2 = _Other;
4451  _Value1.x *= _Value2.x;
4452  _Value1.y *= _Value2.y;
4453  *this = _Value1;
4454  return *this;
4455  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator++ ( )
inline
4396  {
4397  int_2 _Value = *this;
4398  ++_Value._M_x;
4399  ++_Value._M_y;
4400  *this = _Value;
4401  return *this;
4402  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
_In_ _Value
Definition: corecrt_wstdlib.h:65
int_2 Concurrency::graphics::int_2::operator++ ( int  )
inline
4405  {
4406  int_2 _Result = *this;
4407  ++(*this);
4408  return _Result;
4409  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
_Result
Definition: corecrt_wconio.h:362
int_2& Concurrency::graphics::int_2::operator+= ( const int_2 _Other)
inline
4428  {
4429  int_2 _Value1 = *this;
4430  int_2 _Value2 = _Other;
4431  _Value1.x += _Value2.x;
4432  _Value1.y += _Value2.y;
4433  *this = _Value1;
4434  return *this;
4435  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2 Concurrency::graphics::int_2::operator- ( void  ) const
inline
4390  {
4391  int_2 _Value = *this;
4392  return int_2(-_Value.x, -_Value.y);
4393  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
_In_ _Value
Definition: corecrt_wstdlib.h:65
int_2& Concurrency::graphics::int_2::operator-- ( )
inline
4412  {
4413  int_2 _Value = *this;
4414  --_Value._M_x;
4415  --_Value._M_y;
4416  *this = _Value;
4417  return *this;
4418  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
_In_ _Value
Definition: corecrt_wstdlib.h:65
int_2 Concurrency::graphics::int_2::operator-- ( int  )
inline
4421  {
4422  int_2 _Result = *this;
4423  --(*this);
4424  return _Result;
4425  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
_Result
Definition: corecrt_wconio.h:362
int_2& Concurrency::graphics::int_2::operator-= ( const int_2 _Other)
inline
4438  {
4439  int_2 _Value1 = *this;
4440  int_2 _Value2 = _Other;
4441  _Value1.x -= _Value2.x;
4442  _Value1.y -= _Value2.y;
4443  *this = _Value1;
4444  return *this;
4445  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator/= ( const int_2 _Other)
inline
4458  {
4459  int_2 _Value1 = *this;
4460  int_2 _Value2 = _Other;
4461  _Value1.x /= _Value2.x;
4462  _Value1.y /= _Value2.y;
4463  *this = _Value1;
4464  return *this;
4465  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator<<= ( const int_2 _Other)
inline
4518  {
4519  int_2 _Value1 = *this;
4520  int_2 _Value2 = _Other;
4521  _Value1.x <<= _Value2.x;
4522  _Value1.y <<= _Value2.y;
4523  *this = _Value1;
4524  return *this;
4525  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator>>= ( const int_2 _Other)
inline
4508  {
4509  int_2 _Value1 = *this;
4510  int_2 _Value2 = _Other;
4511  _Value1.x >>= _Value2.x;
4512  _Value1.y >>= _Value2.y;
4513  *this = _Value1;
4514  return *this;
4515  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator^= ( const int_2 _Other)
inline
4478  {
4479  int_2 _Value1 = *this;
4480  int_2 _Value2 = _Other;
4481  _Value1.x ^= _Value2.x;
4482  _Value1.y ^= _Value2.y;
4483  *this = _Value1;
4484  return *this;
4485  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2& Concurrency::graphics::int_2::operator|= ( const int_2 _Other)
inline
4488  {
4489  int_2 _Value1 = *this;
4490  int_2 _Value2 = _Other;
4491  _Value1.x |= _Value2.x;
4492  _Value1.y |= _Value2.y;
4493  *this = _Value1;
4494  return *this;
4495  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
int_2 Concurrency::graphics::int_2::operator~ ( ) const
inline
4384  {
4385  int_2 _Value = *this;
4386  return int_2(~_Value.x, ~_Value.y);
4387  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
_In_ _Value
Definition: corecrt_wstdlib.h:65
int& Concurrency::graphics::int_2::ref_g ( )
inline

Returns reference to element 1 of this int_2.

Returns
Reference to element 1 of this int_2.
4286  {
4287  return _M_y;
4288  }
value_type _M_y
Definition: amp_short_vectors.h:4198
int& Concurrency::graphics::int_2::ref_r ( )
inline

Returns reference to element 0 of this int_2.

Returns
Reference to element 0 of this int_2.
4236  {
4237  return _M_x;
4238  }
value_type _M_x
Definition: amp_short_vectors.h:4197
int& Concurrency::graphics::int_2::ref_x ( )
inline

Returns reference to element 0 of this int_2.

Returns
Reference to element 0 of this int_2.
4226  {
4227  return _M_x;
4228  }
value_type _M_x
Definition: amp_short_vectors.h:4197
int& Concurrency::graphics::int_2::ref_y ( )
inline

Returns reference to element 1 of this int_2.

Returns
Reference to element 1 of this int_2.
4276  {
4277  return _M_y;
4278  }
value_type _M_y
Definition: amp_short_vectors.h:4198
void Concurrency::graphics::int_2::set_x ( int  _Value)
inline

Set element 0 of this int_2 with an int.

Parameters
_Valuean int value.
4247  {
4248  _M_x = _Value;
4249  }
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
void Concurrency::graphics::int_2::set_xy ( const int_2 _Value)
inline

Set element 0, and 1 of this int_2 with an int_2.

Parameters
_Valuean int_2 value.
4554  {
4555  int_2 _Val = _Value;
4556  _M_x = _Val.x;
4557  _M_y = _Val.y;
4558  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
_FwdIt const _Ty _Val
Definition: algorithm:1938
void Concurrency::graphics::int_2::set_y ( int  _Value)
inline

Set element 1 of this int_2 with an int.

Parameters
_Valuean int value.
4297  {
4298  _M_y = _Value;
4299  }
value_type _M_y
Definition: amp_short_vectors.h:4198
_In_ _Value
Definition: corecrt_wstdlib.h:65
void Concurrency::graphics::int_2::set_yx ( const int_2 _Value)
inline

Set element 1, and 0 of this int_2 with an int_2.

Parameters
_Valuean int_2 value.
4586  {
4587  int_2 _Val = _Value;
4588  _M_y = _Val.x;
4589  _M_x = _Val.y;
4590  }
int_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:4305
value_type _M_y
Definition: amp_short_vectors.h:4198
value_type _M_x
Definition: amp_short_vectors.h:4197
_In_ _Value
Definition: corecrt_wstdlib.h:65
_FwdIt const _Ty _Val
Definition: algorithm:1938

Member Data Documentation

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

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