Public Member Functions | Private Attributes
karto::CoordinateConverter Class Reference

#include <Karto.h>

List of all members.

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_doubleGridToWorld (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_int32sWorldToGrid (const Vector2< kt_double > &rWorld, kt_bool flipY=false) const

Private Attributes

Vector2< kt_doublem_Offset
kt_double m_Scale
Size2< kt_int32sm_Size

Detailed Description

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

Definition at line 4179 of file Karto.h.


Constructor & Destructor Documentation

Default constructor

Definition at line 4185 of file Karto.h.


Member Function Documentation

Gets the bounding box

Returns:
bounding box

Definition at line 4323 of file Karto.h.

Gets the offset

Returns:
offset

Definition at line 4269 of file Karto.h.

Gets the resolution

Returns:
resolution

Definition at line 4305 of file Karto.h.

Gets the scale

Returns:
scale

Definition at line 4251 of file Karto.h.

Gets the size

Returns:
size

Definition at line 4296 of file Karto.h.

Vector2<kt_double> karto::CoordinateConverter::GridToWorld ( const Vector2< kt_int32s > &  rGrid,
kt_bool  flipY = false 
) const [inline]

Converts the point from grid coordinates to world coordinates

Parameters:
rGridworld coordinate
flipY
Returns:
world coordinate

Definition at line 4230 of file Karto.h.

void karto::CoordinateConverter::SetOffset ( const Vector2< kt_double > &  rOffset) [inline]

Sets the offset

Parameters:
rOffset

Definition at line 4278 of file Karto.h.

Sets the resolution

Parameters:
resolution

Definition at line 4314 of file Karto.h.

Sets the scale

Parameters:
scale

Definition at line 4260 of file Karto.h.

void karto::CoordinateConverter::SetSize ( const Size2< kt_int32s > &  rSize) [inline]

Sets the size

Parameters:
rSize

Definition at line 4287 of file Karto.h.

Scales the value

Parameters:
value
Returns:
scaled value

Definition at line 4196 of file Karto.h.

Vector2<kt_int32s> karto::CoordinateConverter::WorldToGrid ( const Vector2< kt_double > &  rWorld,
kt_bool  flipY = false 
) const [inline]

Converts the point from world coordinates to grid coordinates

Parameters:
rWorldworld coordinate
flipY
Returns:
grid coordinate

Definition at line 4207 of file Karto.h.


Member Data Documentation

Definition at line 4341 of file Karto.h.

Definition at line 4339 of file Karto.h.

Definition at line 4338 of file Karto.h.


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


open_karto
Author(s):
autogenerated on Thu Aug 27 2015 14:14:06