[ODE] Ray - Cylinder collider submission
jose_marin2 at yahoo.com.br
Thu Jun 29 08:44:46 MST 2006
This is great!
Any chance of a Cylinder-Cylinder collider soon?
--- David Walters <hidden.asbestos at googlemail.com>
> > Thanks for this! I will get it into svn shortly.
> One thing I've spotted is the rather untidy code at
> around line 117 of
> my ray.cpp.
> I tidier solution is:
> // Check if the ray lies completely inside or
> outside the cylinder.
> if ( ( ( uv > 0 ) && ( d + ( uvsign * ray->length )
> < half_length *
> internal ) ) ||
> ( ( uv < 0 ) && ( d + ( uvsign * ray->length ) >
> half_length * internal ) ) )
> return 0; // No intersection with caps or curved
> // Compute depth (distance from ray to cylinder)
> contact->depth = ( ( -uvsign * d ) - ( internal *
> half_length ) );
> It's not really important to make this change, as I
> guess the first
> step in any development should be initial support
> for a feature, then
> bug fixing, then optimisation... but still, it
> seemed too messy to
> leave it without saying anything: - )
> ODE mailing list
> ODE at q12.org
Fale com seus amigos de graça com o novo Yahoo! Messenger
More information about the ODE