A coordinate packed for fast conversion to and from MortonXY. More...
#include <ash/morton.h>
Public Types | |
| enum | { BITS_PER_VAL = static_cast<uint8>(bitsizeof(value_type)/2), D = DIM_2D } |
| typedef U | value_type |
| The basic unsigned type underneath. | |
| typedef value_type | x_type |
| typedef value_type | y_type |
| typedef impl::pcoord_masks < value_type, DIM_2D > | mask |
| The mask set associated with this type. | |
| typedef MortonXY< value_type > | morton_type |
| The morton type this converts to. | |
Public Member Functions | |
Constructors/Destructors | |
We use the default destructor. | |
| PCoordXY () | |
| Default constructor. | |
| PCoordXY (PCoordXY const &p) | |
| Copy constructor. | |
| template<typename V > | |
| PCoordXY (PCoordXY< V > const &p) | |
| Copy constructor for other sizes. | |
| PCoordXY (value_type val) | |
| Constructor from the underlying value_type. | |
| PCoordXY (morton_type const &m) | |
| MortonXY conversion constructor. | |
| PCoordXY (value_type cx, value_type cy) | |
| Constructor from x,y. | |
Cast Operators | |
| operator value_type & () | |
| operator const value_type & () const | |
Public Attributes | |
| struct { | |
| x_type x: BITS_PER_VAL | |
| The x-coordinate. | |
| y_type y: BITS_PER_VAL | |
| The y-coordinate. | |
| }; | |
A coordinate packed for fast conversion to and from MortonXY.
| U | [uint8|uint16|uint32|uint64] An unsigned type. Also defined as PCoordXY::value_type. |
The size of U is equal to the total size of the object. Half of the bits are dedicated to the X component, half to the Y component. This should be the primary coordinate type you use in conjunction with a 2D hashgrid.
| typedef impl::pcoord_masks<value_type, DIM_2D> ash::PCoordXY< U >::mask |
The mask set associated with this type.
| typedef MortonXY<value_type> ash::PCoordXY< U >::morton_type |
The morton type this converts to.
| typedef U ash::PCoordXY< U >::value_type |
The basic unsigned type underneath.
| anonymous enum |
| ash::PCoordXY< U >::PCoordXY | ( | ) | [inline] |
Default constructor.
| ash::PCoordXY< U >::PCoordXY | ( | PCoordXY< U > const & | p | ) | [inline] |
Copy constructor.
| p | The PCoordXY to copy. |
| ash::PCoordXY< U >::PCoordXY | ( | PCoordXY< V > const & | p | ) | [inline, explicit] |
Copy constructor for other sizes.
| p | The PCoordXY<> to copy. |
| ash::PCoordXY< U >::PCoordXY | ( | value_type | val | ) | [inline, explicit] |
Constructor from the underlying value_type.
| ash::PCoordXY< U >::PCoordXY | ( | morton_type const & | m | ) | [inline] |
MortonXY conversion constructor.
| ash::PCoordXY< U >::PCoordXY | ( | value_type | cx, |
| value_type | cy | ||
| ) | [inline] |
Constructor from x,y.
| cx | The x coordinate. |
| cy | The y coordinate. |
| x_type ash::PCoordXY< U >::x |
The x-coordinate.
| y_type ash::PCoordXY< U >::y |
The y-coordinate.
© 2012
|
Licensed under
|
Hosted by
|
Generated by
1.7.4
|