From: Val Samko (boost_at_[hidden])
Date: 2004-11-06 08:12:16
>> I do not follow your logic. In mathematics, in Cartesian nD coordinate
>> system, a point is represented by a set of distances between that
>> point and the centre of coordinates, along each axe. Just like a vector.
>> And vectorA + vectorB is a very common operation.
RD> Yes, a point is taken w.r.t. the centre coordinates, but that does not
RD> mean that it behaves like a vector. All that means is that it is
RD> identifying a position in nD space, for example, a button is at (3,4)
RD> from a frame's client area.
And vector in nD space is ... identifying a position in nD space. Just
like a point. The difference is very vague and depends on the
particular topic you are working on.
RD> If you look up Point at MathWorld
RD> (http://mathworld.wolfram.com/Point.html) there is no reference to
RD> adding two points together, whereas for vectors
RD> (http://mathworld.wolfram.com/Vector.html) there is.
Once again, we are talking about Cartesian coordinates, and in this
particular case, point and vector are practically the same thing. In many
books/articles, etc. points are treated exactly the same as vectors.
Now, there might be completely different reasons for treating points
and sizes differently in a C++ program, and that would be the type
safety. But if we go in this direction, we might as well introduce a
type for velocity, to be able to do something like this:
void on_timer(time t)
velocity vel = getvelocity();
position pos = guiobject.pos();
move(guiobject, pos + (t - prev_t) * vel);
prev_t = t;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk