Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

PosOrientState.cc

Go to the documentation of this file.
00001 #include "Kodu/PosOrientState.h"
00002 #include "Shared/Measures.h"
00003 
00004 namespace Kodu {
00005     
00006     PosOrientState::PosOrientState()
00007       : position(),
00008         orientation(0.0f)
00009     { }
00010 
00011     PosOrientState::PosOrientState(const DualCoding::Point& kPosition, const float& kOrientation)
00012       : position(kPosition),
00013         orientation(AngSignPi(kOrientation))
00014     { }
00015 
00016     PosOrientState::PosOrientState(const PosOrientState& kState)
00017       : position(kState.position),
00018         orientation(kState.orientation)
00019     { }
00020 
00021     PosOrientState::~PosOrientState() {
00022         // no explicit implementation
00023     }
00024 
00025     PosOrientState& PosOrientState::operator=(const PosOrientState& kState) {
00026         if (this != &kState) {
00027             position = kState.position;
00028             orientation = kState.orientation;
00029         }
00030         return *this;
00031     }
00032 
00033     PosOrientState PosOrientState::operator-(const PosOrientState& kState) const {
00034         return PosOrientState(position - kState.position, orientation - kState.orientation);
00035     }
00036 
00037     bool PosOrientState::operator==(const PosOrientState& kState) const {
00038         return (position == kState.position && orientation == kState.orientation);
00039     }
00040 
00041     bool PosOrientState::operator!=(const PosOrientState& kState) const {
00042         return (!(*this == kState));
00043     }
00044 }

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:49 2016 by Doxygen 1.6.3