|
latest version v1.9 - last update 10 Apr 2010 |
|
Policy class to compute the size of a box's side and the inverse transformation. More...
#include <ltiBox.h>
Static Public Member Functions | |
| static T | size (const T x1, const T x2) |
| static void | invSize (const T sz, T &x1, T &x2) |
Policy class to compute the size of a box's side and the inverse transformation.
For integer types it assumes the box lies on a discrete grid with grid elements of size 1x1x1, which means that the size of a side defined by two scalar values x1 and x2 (x2>x1) is x2-x1+1.
For floating point values the size is just x2-x1, because of the assumtion that the box lies on a real valued 2D space.
| static void lti::boxSide< T >::invSize | ( | const T | sz, | |
| T & | x1, | |||
| T & | x2 | |||
| ) | [inline, static] |
For a given side size, compute two coordinates which generates it.
For example:
| static T lti::boxSide< T >::size | ( | const T | x1, | |
| const T | x2 | |||
| ) | [inline, static] |
return the size of a box's side which is aligned with one of the two coordinates, assuming that the delimiting coordinates are x1 and x2.
For example: