Re: [eigen] Bounding Volume Hierarchies

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Wow, what a mess :)  Good point about the union thing...  The other
thing is that combining two boxes is not technically a union, so I
think it's OK to call it something else.  On the other hand
merge/merged is IMHO worse than intersect/intersects because the
return types are more similar and hence more room for error.  Also,
I'm a real (well, American) English speaker (despite my name) and
isIntersecting, while correct, sounds slightly awkward when reading
code aloud: "if a is intersecting b ..."--"if a intersects b ..." or
"if a overlaps b ..." is better.  Here is an option with all this in
mind (if operators are out--I still think they're the simplest way to
go):

a = b.getUnion(c)
a = b.getIntersection(c)
b.unite(c)
b.intersect(c)
if(a.overlaps(b))

Unfortunately, this violates the "no getters" convention, but I can't
think of a word other than "union" that doesn't suggest a destructive
operation (the noun "join" is the mathematical term for the operation
if rectangles are a poset ordered by inclusion, but that really sounds
destructive colloquially).

   -Ilya

On Wed, Mar 11, 2009 at 7:41 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> 2009/3/11 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
>> option 2:
>>
>> a.unite(b);
>> a.intersect(b);
>> if (a.isIntersecting(b)) blabla;
>>
>> any preference ? (I vote for opt. 2)
>
> I vote for option 2 too, unless a real english speaker tells us that
> "unite" doesn't mean that...
>
> Cheers,
> Benoit
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/