[ODE] dSpaceCollide2 for dGeomID and dSpaceID

Flavien Brebion f.brebion at vrcontext.com
Tue Feb 3 17:41:53 MST 2004


Taken from my own code:
    dSpaceID				m_odeCollSpace;			// ode's space ID
    dGeomID					m_odeRay;				// ray for hovering physics
    ...
    dSpaceCollide2(m_odeRay, (dxGeom *)m_odeCollSpace, this,
&nearRayCallback);

Never had a problem with it.

F. Brebion

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Roel
van Dijk
Sent: Sunday, February 01, 2004 4:34 PM
To: ode at q12.org
Subject: Re: [ODE] dSpaceCollide2 for dGeomID and dSpaceID


On Tuesday 03 February 2004 15:38, Tibor Szabo wrote:
> Hi,
> i'd like to use dSpaceCollide2 function for ray (dGeomID) and space
> (dSpaceID). But the function only accepts dGeomID, dGeomID pair. Is it
> possible to get dGeomID for a given dSpaceID?
A space _is_ a geom. So you can use dGeomGetClass to get the geoms class
number and if it is dSimpleSpaceClass or dHashSpaceClass you can cast it to
a
dSpaceID.

But dSpaceCollide2 collides spaces not geoms. You could give it the space
that
contains the ray and the other space. You can get the rays space with
dGeomGetSpace.
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list