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: Wed, 11 Mar 2009 09:52:01 -0400
- 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=xx9ru4DvGe5K+i1pePEu4sjCVQAbMhEEpHrNpCVcsao=; b=MEKLGb9OCmGnJitlQn9kpTIn44fzLzKl9mFzTrreZgbccTqg2JtSNrJvQT+e+1gMTs sBSpieKJw7Qgd7p3jCSG8lnm2KZHpI4hNBlcWtmKQWYMj24JUoEwqh29PIfK1EizxnbC P3dqdATiizUjluco7rglUjBPXZAhj6YjyCZOo=
- 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=SqRyItT74uRcpK/itjfj5vfsbzotxBgyUXZcUnnplHXWsvp9Y5FMRk330Z5IG0uwwh sGj/VUNAIpXAv1k2P4fpuP4/HgT34E2fq88HWSoVpKXSeonmjvtae/W4UlIdqn1myupG jHCaVgpF+nJkM3xDAa10yJy/ZJ46y/AkluvrU=
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
>
>
>