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

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

#include <amp_short_vectors.h>

Public Types

typedef unorm value_type
 

Public Member Functions

 __declspec (property(get=get_x, put=set_x)) unorm x
 Property for accessing element 0 of this unorm_2 as a unorm. More...
 
 __declspec (property(get=get_x, put=set_x)) unorm r
 Property for accessing element 0 of this unorm_2 as a unorm. More...
 
unorm get_x () const __GPU
 Returns element 0 of this unorm_2. More...
 
unormref_x () __GPU
 Returns reference to element 0 of this unorm_2. More...
 
unormref_r () __GPU
 Returns reference to element 0 of this unorm_2. More...
 
void set_x (unorm _Value) __GPU
 Set element 0 of this unorm_2 with a unorm. More...
 
 __declspec (property(get=get_y, put=set_y)) unorm y
 Property for accessing element 1 of this unorm_2 as a unorm. More...
 
 __declspec (property(get=get_y, put=set_y)) unorm g
 Property for accessing element 1 of this unorm_2 as a unorm. More...
 
unorm get_y () const __GPU
 Returns element 1 of this unorm_2. More...
 
unormref_y () __GPU
 Returns reference to element 1 of this unorm_2. More...
 
unormref_g () __GPU
 Returns reference to element 1 of this unorm_2. More...
 
void set_y (unorm _Value) __GPU
 Set element 1 of this unorm_2 with a unorm. More...
 
 unorm_2 () __GPU
 Default constructor, initializes all elements with 0. More...
 
 unorm_2 (unorm _V0, unorm _V1) __GPU
 Constructor. More...
 
 unorm_2 (float _V0, float _V1) __GPU
 Constructor. More...
 
 unorm_2 (unorm _V) __GPU
 Constructor. More...
 
 unorm_2 (float _V) __GPU
 
 unorm_2 (const unorm_2 &_Other) __GPU
 Copy constructor. More...
 
unorm_2operator= (const unorm_2 &_Other) __GPU
 
 unorm_2 (const uint_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 unorm_2 (const int_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 unorm_2 (const float_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 unorm_2 (const norm_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
 unorm_2 (const double_2 &_Other) __GPU
 Constructor. Each element is initialized by casting from the corresponding element in _Other. More...
 
unorm_2operator++ () __GPU
 
unorm_2 operator++ (int) __GPU
 
unorm_2operator-- () __GPU
 
unorm_2 operator-- (int) __GPU
 
unorm_2operator+= (const unorm_2 &_Other) __GPU
 
unorm_2operator-= (const unorm_2 &_Other) __GPU
 
unorm_2operator*= (const unorm_2 &_Other) __GPU
 
unorm_2operator/= (const unorm_2 &_Other) __GPU
 
 __declspec (property(get=get_xy, put=set_xy)) unorm_2 xy
 Property for accessing element 0, and 1 of this unorm_2 as a unorm_2. More...
 
 __declspec (property(get=get_xy, put=set_xy)) unorm_2 rg
 Property for accessing element 0, and 1 of this unorm_2 as a unorm_2. More...
 
unorm_2 get_xy () const __GPU
 Returns a unorm_2 that is composed of element 0, and element 1 of this unorm_2. More...
 
void set_xy (const unorm_2 &_Value) __GPU
 Set element 0, and 1 of this unorm_2 with a unorm_2. More...
 
 __declspec (property(get=get_yx, put=set_yx)) unorm_2 yx
 Property for accessing element 1, and 0 of this unorm_2 as a unorm_2. More...
 
 __declspec (property(get=get_yx, put=set_yx)) unorm_2 gr
 Property for accessing element 1, and 0 of this unorm_2 as a unorm_2. More...
 
unorm_2 get_yx () const __GPU
 Returns a unorm_2 that is composed of element 1, and element 0 of this unorm_2. More...
 
void set_yx (const unorm_2 &_Value) __GPU
 Set element 1, and 0 of this unorm_2 with a unorm_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 = _Unorm_type
 

Detailed Description

Represent a short vector of 2 unorm's.

Member Typedef Documentation

Constructor & Destructor Documentation

Concurrency::graphics::unorm_2::unorm_2 ( )
inline

Default constructor, initializes all elements with 0.

11460  {
11461  _M_x = unorm(0.0f);
11462  _M_y = unorm(0.0f);
11463  }
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_2 ( unorm  _V0,
unorm  _V1 
)
inline

Constructor.

Parameters
_V0The value to initialize element 0.
_V1The value to initialize element 1.
11475  {
11476  _M_x = _V0;
11477  _M_y = _V1;
11478  }
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_2 ( float  _V0,
float  _V1 
)
inline

Constructor.

Parameters
_V0The value to initialize element 0.
_V1The value to initialize element 1.
11490  {
11491  _M_x = unorm(_V0);
11492  _M_y = unorm(_V1);
11493  }
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_2 ( unorm  _V)
inline

Constructor.

Parameters
_VThe value for initialization.
11502  {
11503  _M_x = _V;
11504  _M_y = _V;
11505  }
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_2 ( float  _V)
inlineexplicit
11508  {
11509  _M_x = unorm(_V);
11510  _M_y = unorm(_V);
11511  }
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_2 ( const unorm_2 _Other)
inline

Copy constructor.

Parameters
_OtherThe object to copy from.
11520  {
11521  *this = _Other;
11522  }
Concurrency::graphics::unorm_2::unorm_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.
22427  {
22428  uint_2 _Value = _Other;
22429  _M_x = static_cast<value_type>(_Value.x);
22430  _M_y = static_cast<value_type>(_Value.y);
22431  }
unorm value_type
Definition: amp_short_vectors.h:11346
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_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.
22434  {
22435  int_2 _Value = _Other;
22436  _M_x = static_cast<value_type>(_Value.x);
22437  _M_y = static_cast<value_type>(_Value.y);
22438  }
unorm value_type
Definition: amp_short_vectors.h:11346
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_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.
22441  {
22442  float_2 _Value = _Other;
22443  _M_x = static_cast<value_type>(_Value.x);
22444  _M_y = static_cast<value_type>(_Value.y);
22445  }
unorm value_type
Definition: amp_short_vectors.h:11346
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_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.
22448  {
22449  norm_2 _Value = _Other;
22450  _M_x = static_cast<value_type>(_Value.x);
22451  _M_y = static_cast<value_type>(_Value.y);
22452  }
unorm value_type
Definition: amp_short_vectors.h:11346
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
Concurrency::graphics::unorm_2::unorm_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.
22455  {
22456  double_2 _Value = _Other;
22457  _M_x = static_cast<value_type>(_Value.x);
22458  _M_y = static_cast<value_type>(_Value.y);
22459  }
unorm value_type
Definition: amp_short_vectors.h:11346
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352

Member Function Documentation

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

Property for accessing element 0 of this unorm_2 as a unorm.

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

Property for accessing element 0 of this unorm_2 as a unorm.

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

Property for accessing element 1 of this unorm_2 as a unorm.

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

Property for accessing element 1 of this unorm_2 as a unorm.

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

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

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

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

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

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

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

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

unorm Concurrency::graphics::unorm_2::get_x ( ) const
inline

Returns element 0 of this unorm_2.

Returns
Element 0 of this unorm_2.
11370  {
11371  return _M_x;
11372  }
value_type _M_x
Definition: amp_short_vectors.h:11351
unorm_2 Concurrency::graphics::unorm_2::get_xy ( ) const
inline

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

Returns
a unorm_2.
11664  {
11665  return unorm_2(_M_x,_M_y);
11666  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
unorm Concurrency::graphics::unorm_2::get_y ( ) const
inline

Returns element 1 of this unorm_2.

Returns
Element 1 of this unorm_2.
11420  {
11421  return _M_y;
11422  }
value_type _M_y
Definition: amp_short_vectors.h:11352
unorm_2 Concurrency::graphics::unorm_2::get_yx ( ) const
inline

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

Returns
a unorm_2.
11696  {
11697  return unorm_2(_M_y,_M_x);
11698  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
unorm_2& Concurrency::graphics::unorm_2::operator*= ( const unorm_2 _Other)
inline
11629  {
11630  unorm_2 _Value1 = *this;
11631  unorm_2 _Value2 = _Other;
11632  _Value1.x *= _Value2.x;
11633  _Value1.y *= _Value2.y;
11634  *this = _Value1;
11635  return *this;
11636  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
unorm_2& Concurrency::graphics::unorm_2::operator++ ( )
inline
11577  {
11578  unorm_2 _Value = *this;
11579  ++_Value._M_x;
11580  ++_Value._M_y;
11581  *this = _Value;
11582  return *this;
11583  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
unorm_2 Concurrency::graphics::unorm_2::operator++ ( int  )
inline
11586  {
11587  unorm_2 _Result = *this;
11588  ++(*this);
11589  return _Result;
11590  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
unorm_2& Concurrency::graphics::unorm_2::operator+= ( const unorm_2 _Other)
inline
11609  {
11610  unorm_2 _Value1 = *this;
11611  unorm_2 _Value2 = _Other;
11612  _Value1.x += _Value2.x;
11613  _Value1.y += _Value2.y;
11614  *this = _Value1;
11615  return *this;
11616  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
unorm_2& Concurrency::graphics::unorm_2::operator-- ( )
inline
11593  {
11594  unorm_2 _Value = *this;
11595  --_Value._M_x;
11596  --_Value._M_y;
11597  *this = _Value;
11598  return *this;
11599  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
unorm_2 Concurrency::graphics::unorm_2::operator-- ( int  )
inline
11602  {
11603  unorm_2 _Result = *this;
11604  --(*this);
11605  return _Result;
11606  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
unorm_2& Concurrency::graphics::unorm_2::operator-= ( const unorm_2 _Other)
inline
11619  {
11620  unorm_2 _Value1 = *this;
11621  unorm_2 _Value2 = _Other;
11622  _Value1.x -= _Value2.x;
11623  _Value1.y -= _Value2.y;
11624  *this = _Value1;
11625  return *this;
11626  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
unorm_2& Concurrency::graphics::unorm_2::operator/= ( const unorm_2 _Other)
inline
11639  {
11640  unorm_2 _Value1 = *this;
11641  unorm_2 _Value2 = _Other;
11642  _Value1.x /= _Value2.x;
11643  _Value1.y /= _Value2.y;
11644  *this = _Value1;
11645  return *this;
11646  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
unorm_2& Concurrency::graphics::unorm_2::operator= ( const unorm_2 _Other)
inline
11525  {
11526  _M_x = _Other._M_x;
11527  _M_y = _Other._M_y;
11528  return *this;
11529  }
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
unorm& Concurrency::graphics::unorm_2::ref_g ( )
inline

Returns reference to element 1 of this unorm_2.

Returns
Reference to element 1 of this unorm_2.
11440  {
11441  return _M_y;
11442  }
value_type _M_y
Definition: amp_short_vectors.h:11352
unorm& Concurrency::graphics::unorm_2::ref_r ( )
inline

Returns reference to element 0 of this unorm_2.

Returns
Reference to element 0 of this unorm_2.
11390  {
11391  return _M_x;
11392  }
value_type _M_x
Definition: amp_short_vectors.h:11351
unorm& Concurrency::graphics::unorm_2::ref_x ( )
inline

Returns reference to element 0 of this unorm_2.

Returns
Reference to element 0 of this unorm_2.
11380  {
11381  return _M_x;
11382  }
value_type _M_x
Definition: amp_short_vectors.h:11351
unorm& Concurrency::graphics::unorm_2::ref_y ( )
inline

Returns reference to element 1 of this unorm_2.

Returns
Reference to element 1 of this unorm_2.
11430  {
11431  return _M_y;
11432  }
value_type _M_y
Definition: amp_short_vectors.h:11352
void Concurrency::graphics::unorm_2::set_x ( unorm  _Value)
inline

Set element 0 of this unorm_2 with a unorm.

Parameters
_Valuea unorm value.
11401  {
11402  _M_x = _Value;
11403  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
void Concurrency::graphics::unorm_2::set_xy ( const unorm_2 _Value)
inline

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

Parameters
_Valuea unorm_2 value.
11675  {
11676  unorm_2 _Val = _Value;
11677  _M_x = _Val.x;
11678  _M_y = _Val.y;
11679  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
_FwdIt const _Ty _Val
Definition: algorithm:1938
void Concurrency::graphics::unorm_2::set_y ( unorm  _Value)
inline

Set element 1 of this unorm_2 with a unorm.

Parameters
_Valuea unorm value.
11451  {
11452  _M_y = _Value;
11453  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_y
Definition: amp_short_vectors.h:11352
void Concurrency::graphics::unorm_2::set_yx ( const unorm_2 _Value)
inline

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

Parameters
_Valuea unorm_2 value.
11707  {
11708  unorm_2 _Val = _Value;
11709  _M_y = _Val.x;
11710  _M_x = _Val.y;
11711  }
unorm_2() __GPU
Default constructor, initializes all elements with 0.
Definition: amp_short_vectors.h:11459
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
value_type _M_x
Definition: amp_short_vectors.h:11351
value_type _M_y
Definition: amp_short_vectors.h:11352
_FwdIt const _Ty _Val
Definition: algorithm:1938

Member Data Documentation

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

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