[ODE] get triangle index of a trimesh
Jaroslav Sinecky
sinecky at telefonica.net
Fri Mar 10 07:14:00 MST 2006
Yep, the problem of dTriCallback and dTriArrayCallback is that they are
called for every potential intersecting triangle. I guess it's designed more
to allow user say, that concrete triangle shouldn't be tested for collision.
But in this callback, you don't know, if the triangle will finaly generate
some contact or lot of them or noone so there's no way, how to relate them
to contacts returned from dCollide.
Jaroslav
> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf
> Of Ettore Pancini
> Sent: Friday, March 10, 2006 9:15 AM
> To: ODE mailing_list
> Subject: Re: [ODE] get triangle index of a trimesh
>
>
> I've tried dGeomTriMeshSetCallback and it works to an extent
>
> just some notes:
> * there was a bug in the trimesh-sphere collider. solved by Geoff Carlton
> (http://q12.org/pipermail/ode/2005-March/015563.html). it seems is not
> applied to unstable, but i can confirm it works
> * ode will callback many times for the same collision. rather then telling
> you
> the exact triangle that collides, you'll have a bunch of potentially
> colliding tris.
> or at least, this is how i understand it
>
> there was some talk in the past about adding an Index param in the
> collision callback. the meaning could be depending on the geom type:
> it could be the side of the box, or the triangle index for a trimesh.
> i think is not a very general solution, but i could be very useful
>
> cheers
>
>
> ----- Original Message -----
> From: "Jon Watte (ODE)" <hplus-ode at mindcontrol.org>
> To: <adastra at inorbit.com>
> Cc: "ODE mailing_list" <ode at q12.org>
> Sent: Thursday, March 09, 2006 18:30
> Subject: Re: [ODE] get triangle index of a trimesh
>
>
> >
> > In my copy of the manual, on page 66, section 10.7.6, it talks about the
> > callbacks that will tell you which triangles are hit during collision;
> > it's an old version, so it may have moved around. Search for
> > dTriCallback and dTriRayCallback to locate it.
> >
> > If you have read this part, and experimented with the code, and it still
> > won't let you do what you want, please post a description of what you
> > have tried, and why it didn't work for you.
> >
> > Cheers,
> >
> > / h+
> >
> >
> > adastra at inorbit.com wrote:
> > > I had the same problem with my indices. I just used my visualization
> > > software (VTK) to work it out.
> > > I used GetCell() and then GetPoints() for each cell and made an array
> > > with that data.
> > >
> > > Is there a way to do this using ODE without wasting processing time on
> > > finding the same index so many times?
> > >
> > > Jemma
> >
> > _______________________________________________
> > 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