A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by PJani » Thu Oct 20, 2011 7:00 am
Hy, i need some help, ok i don't now if engine supports listing bodies by "intersecting" AABB-s(axis aligned bounding box). It would be great if i could use engine internal structure for searching bodies in AABB box.
I would need such things for fast search the bodies in "hit" radius(decreasing pressure by distance and calculating force by area of 2d concave polygon which outline 3d shape) for explosions(i dont want to go thru all bodies) or for searching car hooks...
If engine doesn't support such thing then i would think of using "sensor" shape, but if i am not mistaking the sensor shape needs at least one step to "report" all collisions/intersections which makes things complicated...
hmm so...any help would be appreciated.
Greetings, pj.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by Julio Jerez » Thu Oct 20, 2011 7:05 am
PJani wrote:Hy, i need some help, ok i don't now if engine supports listing bodies by "intersecting" AABB-s(axis aligned bounding box).
what does this means? can you provide an example?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by PJani » Thu Oct 20, 2011 8:22 am
most of graphics and physics engines keeps data in some kind of space partitioned tree(usually the 2D or 3D) which is build from bounding boxes usually the axis aligned bounding box. I actually don't know how do you store bodies in world, but i assume u use some kind of space partitioned tree so you can search faster before you do the convex collision test.
Anyway here is example what i mean in 2D.
- Attachments
-

- my example in 2d
- evo2.PNG (17.89 KiB) Viewed 1498 times
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by Julio Jerez » Thu Oct 20, 2011 9:27 am
does not this function do the job?
void NewtonWorldForEachBodyInAABBDo (const NewtonWorld* newtonWorld, const dFloat* p0, const dFloat* p1, NewtonBodyIterator callback, void* userData);
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by PJani » Thu Oct 20, 2011 12:21 pm
Huh tnx, i don't know how i missed that!!! I think it is not implemented in OgreNewt 0_o...
Anyway i know this is kind of offtopic, but any news on contact sub/multi sampling!? I don't know really how to implement contact sub/multi sampling in newton dynamics by my self, i would really need it for vehicles and other stuff which needs "precise" friction...
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 1 guest