Boost logo

Geometry :

Subject: [ggl] Problem intersecting linestring & polygon in Xcode 3.2.2
From: Bruno Lalande (bruno.lalande)
Date: 2010-04-26 11:58:36


Hi Barend,

> I have checked this in the meantime. It is sometimes useful to have this
> policy as non-const, because it changes its internal state and returns
> immediately. For example, to check if two linestrings are disjoint, not all
> turns (intersections) have to be checked: at the first intersection it is
> known as disjoint. So it sets that state and returns.

Is it the policy that decides to change its state within a function
that's fundamentally not a modifier? Or is the client code
(get_turns()) modifying the policy on purpose? If the former, it's
typically a case where the object should be const and the attribute(s)
changed declared mutable, since the change is internal and is the
entire decision of the policy class itself. Makes sense?

Regards
Bruno


Geometry list run by mateusz at loskot.net