NewtonWorldForEachBodyInOOBBDo

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

NewtonWorldForEachBodyInOOBBDo

Postby JernejL » Mon Apr 23, 2018 5:03 am

Could an OOBB version of NewtonWorldForEachBodyInAABBDo be added to newton? for some things i could completely stop using raycasts if this was an option, it might work far more efficient and faster for some purposes when i just wish to test for basic path / proximity checks since it would only need to check oobb and not do any kind of face checks and ray direction sorting the way raycasting needs.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: NewtonWorldForEachBodyInOOBBDo

Postby Julio Jerez » Mon Apr 23, 2018 2:21 pm

what do you mean an obb, the function test each body obb again the AABB you pass.
you mean passing an OBB?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonWorldForEachBodyInOOBBDo

Postby JernejL » Tue Apr 24, 2018 1:48 am

Yes, obb / oobb (object-oriented bounding box)

is that feasible?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: NewtonWorldForEachBodyInOOBBDo

Postby Julio Jerez » Tue Apr 24, 2018 10:15 am

yes that's possible, can you write the prototype of how the function need to be?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonWorldForEachBodyInOOBBDo

Postby JernejL » Wed Apr 25, 2018 6:01 am

It needs parameters for OBB / OOBB dimensions in local space and a matrix for transforming it to world space:

procedure NewtonWorldForEachBodyInOBBDo (const newtonWorld: PNewtonWorld; const p0: pfloat; const p1: pfloat; const matrix: pfloat; callback: NewtonBodyIterator; const userData: Pointer); cdecl; external newtondll;

const newtonWorld: PNewtonWorld; - newton world
const p0: pfloat; - min for object oriented box size
const p1: pfloat; - max for object oriented box size
const matrix: pfloat; location and orientation for the box
callback: NewtonBodyIterator; - same as NewtonWorldForEachBodyInAABBDo
const userData: Pointer - same as NewtonWorldForEachBodyInAABBDo
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 14 guests

cron