Boost logo

Geometry :

Subject: [ggl] Clipping (i.e. intersection) issues, still.
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-07-08 09:04:37

Hi Bruno,

> Hmm actually I'm not sure we can use tribool at all since I guess we
> need something usable at compile time.

I think that is possible using tribool as a type, but I agree that it is
not really convenient.

> enum orientation_type
> {
> clockwise,
> counter_closewise,
> indeterminate
> };
> template <>
> struct orientation<my_polygon>
> {
> static const orientation_type value = clockwise;
> };
> Here, orientation_traits<P>::value is a real compile-time value, I can
> pass it to a class declared as "template <orientation_type> struct
> foo" for instance.
> So I guess enums are better there... or did you have another idea
> about how to implement those traits?
Yes, enums look much better. Also because "true" is not so clear as
"clockwise". I also want to be able to specialize on these values and
that's possible this way as well. The traits look good like this.

Regards, Barend

-------------- next part --------------
An HTML attachment was scrubbed...

Geometry list run by mateusz at