summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/see/ovision.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/see/ovision.cc')
-rw-r--r--2005/i/robert/src/ovision/see/ovision.cc21
1 files changed, 1 insertions, 20 deletions
diff --git a/2005/i/robert/src/ovision/see/ovision.cc b/2005/i/robert/src/ovision/see/ovision.cc
index 2cbb4a1..c66d64a 100644
--- a/2005/i/robert/src/ovision/see/ovision.cc
+++ b/2005/i/robert/src/ovision/see/ovision.cc
@@ -120,26 +120,7 @@ OVision::showInfo () const
void
OVision::getLoc (Zone &zone, int &x, int &y, int &angle, int &dist)
{
- space_->getLoc (zone.ymax, zone.centerx, x, y);
- double newPcX, newPcY;
- if (zone.pcY > 0)
- {
- newPcY = - zone.pcY;
- newPcX = - zone.pcX;
- }
- else
- {
- newPcX = zone.pcX;
- newPcY = zone.pcY;
- }
- int tmpX = (int)((zone.xmax - zone.centerx) * newPcX + zone.centerx);
- int tmpY = (int)((zone.ymax - zone.centery) * newPcY + zone.centery);
- int newX, newY;
- space_->getLoc (tmpX, tmpY, newX, newY);
- angle = (int)(atan ((double)newX / ((double)newY + 90)));
- x = newX; y = newY;
- dist = (int)sqrt (y*y + x*x);
- std::cout << "<OVision::getLoc> " << " " << newX << " " << newY << " " << angle << " " << dist << "\n";
+ space_->getRealLoc (zone, x, y, angle, dist);
}
/// Renvoie la liste des quilles