#include <Karto.h>
Public Member Functions | |
| CoordinateConverter () | |
| BoundingBox2 | GetBoundingBox () const |
| const Vector2< kt_double > & | GetOffset () const |
| kt_double | GetResolution () const |
| kt_double | GetScale () const |
| const Size2< kt_int32s > & | GetSize () const |
| Vector2< kt_double > | GridToWorld (const Vector2< kt_int32s > &rGrid, kt_bool flipY=false) const |
| void | SetOffset (const Vector2< kt_double > &rOffset) |
| void | SetResolution (kt_double resolution) |
| void | SetScale (kt_double scale) |
| void | SetSize (const Size2< kt_int32s > &rSize) |
| kt_double | Transform (kt_double value) |
| Vector2< kt_int32s > | WorldToGrid (const Vector2< kt_double > &rWorld, kt_bool flipY=false) const |
Private Attributes | |
| Vector2< kt_double > | m_Offset |
| kt_double | m_Scale |
| Size2< kt_int32s > | m_Size |
The CoordinateConverter class is used to convert coordinates between world and grid coordinates In world coordinates 1.0 = 1 meter where 1 in grid coordinates = 1 pixel! Default scale for coordinate converter is 20 that converters to 1 pixel = 0.05 meter
| karto::CoordinateConverter::CoordinateConverter | ( | ) | [inline] |
| BoundingBox2 karto::CoordinateConverter::GetBoundingBox | ( | ) | const [inline] |
| const Vector2<kt_double>& karto::CoordinateConverter::GetOffset | ( | ) | const [inline] |
| kt_double karto::CoordinateConverter::GetResolution | ( | ) | const [inline] |
| kt_double karto::CoordinateConverter::GetScale | ( | ) | const [inline] |
| const Size2<kt_int32s>& karto::CoordinateConverter::GetSize | ( | ) | const [inline] |
| void karto::CoordinateConverter::SetOffset | ( | const Vector2< kt_double > & | rOffset | ) | [inline] |
| void karto::CoordinateConverter::SetResolution | ( | kt_double | resolution | ) | [inline] |
| void karto::CoordinateConverter::SetScale | ( | kt_double | scale | ) | [inline] |
| void karto::CoordinateConverter::SetSize | ( | const Size2< kt_int32s > & | rSize | ) | [inline] |
| kt_double karto::CoordinateConverter::Transform | ( | kt_double | value | ) | [inline] |
Vector2<kt_double> karto::CoordinateConverter::m_Offset [private] |
kt_double karto::CoordinateConverter::m_Scale [private] |
Size2<kt_int32s> karto::CoordinateConverter::m_Size [private] |