![]() |
RoboCup2D Tutorial
|
rcsc/geom/vector_2d.h
This class represents a point in a 2D space.
Where O is the origin, that is, the field center. Do not forget that the y axis is inverted in the simulator. Thus, the quadrant in which the point is on the image below is positive (x, y).
The points are:
There are several utility methods on this class, so do not waste your time trying to rewrite them. To see them all, look for rcsc/geom/vector_2d.h
in the same folder librcsc was installed. There's a brief explanation for all methods in that file.
The Vector2D parameter used in the methods below will use the Vector2D parameters passedn in the constructor as the origin.
You can check this library for more methods such as printing, comparison, division, subtraction, etc.