Public Member Functions | Private Attributes | Friends
karto::Pose2 Class Reference

#include <Geometry.h>

List of all members.

Public Member Functions

kt_double AngleTo (const Vector2d &rVector) const
kt_double GetHeading () const
const Vector2dGetPosition () const
kt_double GetX () const
kt_double GetY () const
kt_bool operator!= (const Pose2 &rOther) const
Pose2 operator+ (const Pose2 &rOther) const
void operator+= (const Pose2 &rOther)
Pose2 operator- (const Pose2 &rOther) const
Pose2operator= (const Pose2 &rOther)
kt_bool operator== (const Pose2 &rOther) const
 Pose2 ()
 Pose2 (const Vector2d &rPosition, kt_double heading=0)
 Pose2 (kt_double x, kt_double y, kt_double heading)
 Pose2 (const Pose3 &rPose)
 Pose2 (const Pose2 &rOther)
void SetHeading (kt_double heading)
void SetPosition (const Vector2d &rPosition)
void SetX (kt_double x)
void SetY (kt_double y)
kt_double SquaredDistance (const Pose2 &rOther) const
const String ToString (kt_int32u precision=4) const

Private Attributes

kt_double m_Heading
Vector2d m_Position

Friends

KARTO_FORCEINLINE std::ostream & operator<< (std::ostream &rStream, const Pose2 &rPose)

Detailed Description

Defines a pose (position and heading) in 2-dimensional space.

Definition at line 2182 of file Geometry.h.


Constructor & Destructor Documentation

Pose at the origin with a heading of 0

Definition at line 28 of file Geometry.cpp.

karto::Pose2::Pose2 ( const Vector2d rPosition,
kt_double  heading = 0 
)

Pose with given position and heading

Parameters:
rPositionposition
headingheading

Definition at line 33 of file Geometry.cpp.

karto::Pose2::Pose2 ( kt_double  x,
kt_double  y,
kt_double  heading 
)

Pose with given position and heading

Parameters:
xx-coordinate
yy-coordinate
headingheading

Definition at line 39 of file Geometry.cpp.

karto::Pose2::Pose2 ( const Pose3 rPose)

Pose2 object from a Pose3 (ignores z-coordinate)

Definition at line 45 of file Geometry.cpp.

karto::Pose2::Pose2 ( const Pose2 rOther)

Copy constructor

Definition at line 54 of file Geometry.cpp.


Member Function Documentation

kt_double karto::Pose2::AngleTo ( const Vector2d rVector) const [inline]

Return the angle from this pose to the given vector

Parameters:
rVectorvector
Returns:
angle to given vector

Definition at line 2303 of file Geometry.h.

kt_double karto::Pose2::GetHeading ( ) const [inline]

Returns the heading of the pose (in radians)

Returns:
the heading of this pose

Definition at line 2274 of file Geometry.h.

const Vector2d& karto::Pose2::GetPosition ( ) const [inline]

Returns the position

Returns:
the position of this pose

Definition at line 2256 of file Geometry.h.

kt_double karto::Pose2::GetX ( ) const [inline]

Returns the x-coordinate

Returns:
the x-coordinate of this pose

Definition at line 2220 of file Geometry.h.

kt_double karto::Pose2::GetY ( ) const [inline]

Returns the y-coordinate

Returns:
the y-coordinate of this pose

Definition at line 2238 of file Geometry.h.

kt_bool karto::Pose2::operator!= ( const Pose2 rOther) const [inline]

Inequality operator

Definition at line 2348 of file Geometry.h.

Pose2 karto::Pose2::operator+ ( const Pose2 rOther) const [inline]

Pose2 addition

Definition at line 2365 of file Geometry.h.

void karto::Pose2::operator+= ( const Pose2 rOther) [inline]

In-place Pose2 addition

Definition at line 2356 of file Geometry.h.

Pose2 karto::Pose2::operator- ( const Pose2 rOther) const [inline]

Pose2 subtraction

Definition at line 2373 of file Geometry.h.

Pose2& karto::Pose2::operator= ( const Pose2 rOther) [inline]

Assignment operator

Definition at line 2329 of file Geometry.h.

kt_bool karto::Pose2::operator== ( const Pose2 rOther) const [inline]

Equality operator

Definition at line 2340 of file Geometry.h.

void karto::Pose2::SetHeading ( kt_double  heading) [inline]

Sets the heading

Parameters:
headingnew heading

Definition at line 2283 of file Geometry.h.

void karto::Pose2::SetPosition ( const Vector2d rPosition) [inline]

Sets the position

Parameters:
rPositionnew position

Definition at line 2265 of file Geometry.h.

void karto::Pose2::SetX ( kt_double  x) [inline]

Sets the x-coordinate

Parameters:
xnew x-coordinate

Definition at line 2229 of file Geometry.h.

void karto::Pose2::SetY ( kt_double  y) [inline]

Sets the y-coordinate

Parameters:
ynew y-coordinate

Definition at line 2247 of file Geometry.h.

kt_double karto::Pose2::SquaredDistance ( const Pose2 rOther) const [inline]

Return the squared distance between this pose and the given pose

Parameters:
rOtherpose
Returns:
squared distance between this pose and the given pose

Definition at line 2293 of file Geometry.h.

const String karto::Pose2::ToString ( kt_int32u  precision = 4) const [inline]

Returns a string representation of this pose

Parameters:
precisionprecision, default 4
Returns:
string representation of this pose

Definition at line 2314 of file Geometry.h.


Friends And Related Function Documentation

KARTO_FORCEINLINE std::ostream& operator<< ( std::ostream &  rStream,
const Pose2 rPose 
) [friend]

Write this pose onto output stream

Definition at line 2381 of file Geometry.h.


Member Data Documentation

Definition at line 2390 of file Geometry.h.

Definition at line 2388 of file Geometry.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Sun Apr 2 2017 03:53:09