rpos::core::Location Class
Represents a point position in XYZ right-hand axis.
Header File
rpos/core/pose.h
Applies to
- Slamware
- Mapper
Constructors
/**
* Create a new object with x,y,z all set to 0.
*/
Location();
/**
* Create a new object with the specified x,y,z value.
*/
Location(double x, double y, double z);
/**
* Copy constructor.
*/
Location(const Location&);
Operators
/**
* Assignement operator.
*/
Location& operator=(const Location&);
/**
* Compare whether the current location is equal with the target location.
*/
bool operator==(const Location&) const;
Methods
/**
* Getter and setter of the x field.
*/
double x() const;
double& x();
Example
Location location;
std::cout<<location.x()<<std::endl; // output 0
location.x() = 10;
std::cout<<location.x()<<std::endl; // output 10
/**
* Getter and setter of the y field.
*/
double y() const;
double& y();
/**
* Getter and setter of the z field.
*/
double z() const;
double& z();
/**
* Calcuate the euler distance between two points.
*/
double distanceTo(const Location& that) const;