Coordinate elements are values along 3 perpendicular axes. More...
#include <grasp_coordinates.h>
Public Member Functions | |
cartesian_coordinates () | |
cartesian_coordinates (vec3 v) | |
cartesian_coordinates (const cartesian_coordinates &cc) | |
cartesian_coordinates (cartesian_coordinates *cc) | |
cartesian_coordinates (double x, double y, double z) | |
virtual double | distanceTo (coordinates) const |
cartesian_coordinates | get_pos_cartesian () const |
cylindrical_coordinates | get_pos_cylindrical () const |
spherical_coordinates | get_pos_spherical () const |
cartesian_coordinates | get_vec_cartesian (cartesian_coordinates from) const |
cylindrical_coordinates | get_vec_cylindrical (cartesian_coordinates from) const |
spherical_coordinates | get_vec_spherical (cartesian_coordinates from) const |
cartesian_coordinates | operator+ (cartesian_coordinates) |
cartesian_coordinates | operator- (cartesian_coordinates) |
Coordinate elements are values along 3 perpendicular axes.
This class allows conversion to other coordinate systems
Definition at line 94 of file grasp_coordinates.h.
cartesian_coordinates::cartesian_coordinates | ( | double | x, | |
double | y, | |||
double | z | |||
) |
Initializes the coordinates with the values x , y , z .
Definition at line 182 of file grasp_coordinates.cpp.
cartesian_coordinates::cartesian_coordinates | ( | cartesian_coordinates * | cc | ) |
Copies coordinate values from cc .
Definition at line 190 of file grasp_coordinates.cpp.
cartesian_coordinates::cartesian_coordinates | ( | const cartesian_coordinates & | cc | ) |
Copies coordinate values from cc .
Definition at line 198 of file grasp_coordinates.cpp.
cartesian_coordinates::cartesian_coordinates | ( | vec3 | v | ) |
Initializes coordinate values with values from v . .
Definition at line 206 of file grasp_coordinates.cpp.
cartesian_coordinates::cartesian_coordinates | ( | ) |
Initializes coordinates to 0,0,0.
Definition at line 214 of file grasp_coordinates.cpp.
double cartesian_coordinates::distanceTo | ( | coordinates | to | ) | const [virtual] |
Computes a distance ratio of the length of this - to over the max length of this and to .
Reimplemented from coordinates.
Definition at line 323 of file grasp_coordinates.cpp.
cartesian_coordinates cartesian_coordinates::get_pos_cartesian | ( | ) | const [virtual] |
Returns a copy of this.
Reimplemented from coordinates.
Definition at line 223 of file grasp_coordinates.cpp.
cylindrical_coordinates cartesian_coordinates::get_pos_cylindrical | ( | ) | const [virtual] |
Converts the cartesian coordinates to cylindrical ones, by computing the radius, and azimuth from x and y.
Reimplemented from coordinates.
Definition at line 233 of file grasp_coordinates.cpp.
spherical_coordinates cartesian_coordinates::get_pos_spherical | ( | ) | const [virtual] |
Converts the cartesian coordinates to spherical ones, by computing the radius, azimuth, and elevation angles from x, y, and z.
Reimplemented from coordinates.
Definition at line 247 of file grasp_coordinates.cpp.
cartesian_coordinates cartesian_coordinates::get_vec_cartesian | ( | cartesian_coordinates | from | ) | const |
Returns a copy of this.
Definition at line 260 of file grasp_coordinates.cpp.
cylindrical_coordinates cartesian_coordinates::get_vec_cylindrical | ( | cartesian_coordinates | from | ) | const |
Definition at line 270 of file grasp_coordinates.cpp.
spherical_coordinates cartesian_coordinates::get_vec_spherical | ( | cartesian_coordinates | from | ) | const |
Definition at line 284 of file grasp_coordinates.cpp.
cartesian_coordinates cartesian_coordinates::operator+ | ( | cartesian_coordinates | in | ) | [inline] |
Returns the sum of this coordinate with in .
Definition at line 304 of file grasp_coordinates.cpp.
cartesian_coordinates cartesian_coordinates::operator- | ( | cartesian_coordinates | in | ) | [inline] |
Returns the difference between this and in .
Definition at line 313 of file grasp_coordinates.cpp.