[ODE] get triangle index of a trimesh

Geoff Carlton gcarlton at iinet.net.au
Sun Apr 23 17:31:57 MST 2006


Hi,
I have the full code containing the change, as well as several other 
changes.  In terms of extracting that one feature out into a separate 
patch that can be applied to SVN, I did say I would try to do that when 
I had more time.  Unfortunately, if anything, my free time is going the 
other way.  For now, I can offer the complete source (which you may have 
trouble merging), or you will still have to wait an indeterminate time 
until I get around to it.

Sorry about that,
Geoff


Jaroslav Sinecky wrote:
> It didn't get it over to the maillist, I guess it's still waiting for 
> approval, because it exceeded size of 10kB, or something like that. I 
> didn't bother because there was a better proposal - adding feedback 
> field in the contact struct and Geoff Carlton was going to send a patch 
> for that, which didn't happen yet.
> Nevermind, I can change my code to store the index in feedback field, 
> which is really minor change and apply it to svn.
> Or Geoff, will you send your code?
>
> Ettore Pancini wrote:
>   
>> quite strangely i can't find the original mail from Sinecky Jaroslav
>> neither in the archives nor in my inbox. someone has this patch?
>>
>>     ----- Original Message -----
>>     *From:* vicente conejeros <mailto:vicenteconejeros at hotmail.com>
>>     *To:* ODE mailing_list <mailto:ode at q12.org>
>>     *Sent:* Friday, March 10, 2006 21:05
>>     *Subject:* Re: [ODE] get triangle index of a trimesh
>>
>>     thanks :D
>>
>>         ----- Original Message -----
>>         *From:* Jaroslav Sinecky <mailto:sinecky at telefonica.net>
>>         *To:* adastra at inorbit.com <mailto:adastra at inorbit.com> ;
>>         vicente conejeros <mailto:vicenteconejeros at hotmail.com>
>>         *Cc:* ODE mailing_list <mailto:ode at q12.org>
>>         *Sent:* Friday, March 10, 2006 10:21 AM
>>         *Subject:* RE: [ODE] get triangle index of a trimesh
>>
>>         So here goes the patch, maybe someone finds it useful or you
>>         can include it in unstable. It's pretty simple: after dCollide
>>         returns, call
>>          
>>         int triIndex = dGeomTriMeshGetTouchedTriangle(g1, contactIndex);
>>          
>>         where contactIndex is the index in the list of returned
>>         contacts and g1 is the Trimesh geom involved in the collision.
>>          
>>         disclaimer:
>>         - Not implemented for ray or plane colliding with trimesh.
>>         Suppose should be similarily easy to implement though.
>>         - There is static buffer (64) to hold indexes. I believe if
>>         this overflows, it shouldn't crash, just some asserts will
>>         come out.
>>         - It's not completely robust, for example if you send
>>         contactIndex not consistent with immediately preceding
>>         dCollide call, result is undefined
>>          
>>         Performance impact should be negligible though.
>>          
>>          
>>         Cheers,
>>         Jaroslav
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
>>   
>>     
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>   


More information about the ODE mailing list