Re: [eigen] Bounding Volume Hierarchies

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


hm, there is another problem the choice of "union" as a replacement of
operator| is of course not possible (union is a keyword). It's getting
hard to have a consistent naming scheme, at least using operators &,
|, &=, and |= would solve all these issues, so perhaps it is still
worth reconsidering them ?

On Wed, Mar 11, 2009 at 10:09 AM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> ok, I see two options:
>
> options 1:
>
> a.makeUnion(b);
> a.makeIntersection(b);
> if (a.intersects(b)) blabla;
>
> option 2:
>
> a.unite(b);
> a.intersect(b);
> if (a.isIntersecting(b)) blabla;
>
> any preference ? (I vote for opt. 2)
>
>
> gael.
>
> On Fri, Mar 6, 2009 at 10:03 PM, Ilya Baran <baran37@xxxxxxxxx> wrote:
>> I think that "AlignedBox &intersect" vs. "bool intersects" would
>> usually be OK: it should be clear from the context which is intended
>> and because AlignedBox is not implicitly convertible to bool,
>> accidentally overwriting a box is likely to be caught by the compiler.
>>  That still leaves room for the following bug (for which existing
>> compilers, I guess, wouldn't issue a warning):
>>
>> a.intersects(b); //this has no effect: a.intersect(b) was intended
>>
>> If you think this is a problem, perhaps "overlaps" should be the
>> predicate? (although that's also somehow nonstandard).
>>
>>   -Ilya
>>
>> On Fri, Mar 6, 2009 at 3:42 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>>>> "union" and "intersection" are the obvious choices, "unite" is good
>>>> too. However, "intersect" is confusing because in my brain it would
>>>> return true or false whether the two boxes intersect or not. This is
>>>> why I used "clamp". There is also "crop" , yeah, I know that's not
>>>> better... (about unite vs extend, that's because I did not thought
>>>> about unite)
>>>>
>>>> gael
>>>
>>> Ah yes, right. Well, in proper english, that would be "intersects" but
>>> I agree that this little s is a too small difference...
>>>
>>> Benoit
>>>
>>>
>>>
>>
>>
>>
>



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