Esempio n. 1
0
/*!
  Copies the point and dir pointers from \a p.  Also copies the values
  of empty and gdType .
*/
cartesianGraspDirection::cartesianGraspDirection(const cartesianGraspDirection& p) : GraspDirection()
{
    point = new cartesian_coordinates(p.get_point());
    dir = new cartesian_coordinates(p.get_dir());
    empty = p.get_empty();
    set_gdType(p.get_gdType());
}
Esempio n. 2
0
/*!
  Returns a normalized distance measure between this grasp direction and
  \a to .
*/
double 
cartesianGraspDirection::distanceTo(cartesianGraspDirection to) const
{
    double dist = point->distanceTo(to.get_point());
    dist += dir->distanceTo(to.get_dir());
    /* max is 2.0, every dist normed to 1 */
    return dist / 2.0;
}