Re: [eigen] Bounding Volume Hierarchies |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Bounding Volume Hierarchies
- From: Ilya Baran <baran37@xxxxxxxxx>
- Date: Fri, 6 Mar 2009 16:03:34 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KKVAmZ5K9bPARxtWU/38knhPsLQpdjr+D1DplK+Eb60=; b=WQuYVvCmY8EaTK2s9TuQDgdCIFpgom7/G4CT9Lfabkj165ALB0akcdNedipmriKnVW Y4y4oqwQEu25ms6ruBEr1kvVdLjMXDfHpx1i3tH/bBM4mBxPa5Hz/qTTljuVbtPZSxc7 Ifnoy/nI/VJ1Jok78vsJ2HFYGnzHlDs7yiCrM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=snKNw3HCU8TGyH8bNpph7+hxhG3VoFRkaMJ/LLAy8CALyU2BV9mruOhiwiGBJJuBXi Bb0uwxIwirUAaNZ0UWwTomKtJBj6rKabeM1fFZi1CUP6q0nU9melX/59KQdJiUi8Wanp kgGqKn6/wsAmankPwOM5br9w5Vipde6gdmJfQ=
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
>
>
>