View Full Version : TBCDL Collision Dection Library
D.J.Peters
07-03-2010, 02:29
Collision Detection Library for thinBasic
Joshy
Well done Joshy... looking forward to the examples!
This is something I've been working on and trying to figure out for quite some time in both python and freebasic... you have made it look easy! I'm still working hard and it is fantastic to learn from such good programmers as you, Eros, Petr, Charles, Michael, Kent, Frank, and everyone else posting great code examples!
Cheers,
Stan
i will post some examples later
but now i must sleeping i wrote two libs in one session. :escribe:
Joshy
Thanks, another great library.
Michael Hartlef
07-03-2010, 10:11
HI Joshi,
thanks for the contribution. Can you turn these into TB modules? Because
1) We get rid of the declares
2) To my knowledge, calling external DLL functions is slower than module functions. But I could be wrong here.
Petr Schreiber
07-03-2010, 11:05
Hi Joshy,
thanks a lot, this is looking fantastic.
I am looking forward to test it more.
Did you find the KeywordDocumenter usable?
Petr
ErosOlmi
07-03-2010, 11:07
To keep thing organized, I can create dedicated sub forum for this project.
Just ask for it.
Petr Schreiber
07-03-2010, 11:54
I would vote for making it module too.
Modules can autodeclare not only procedures for TB, but even UDTs (structs).
For UDTs, I would propose convention with module prefix as well -> here TBCDL_Vector3D.
This will help avoiding name conflicts.
Petr
D.J.Peters
08-03-2010, 00:37
Of course i can make a TB module later but in
it's current experimental state it's ok as "normal" DLL.
if we have
...
TBGL_EntityGetCurrentMatrix(%SceneID,%EntityID,Matrix)
TBCD_SetMatrix(%ModelID,Matrix)
...
i will compile it as real TBCD module.
(without "L" in it's name TBCDL = library TBCD = thinBasic module)
Joshy
D.J.Peters
08-03-2010, 10:21
first example RayModelTest.tBasic added.
it's nice if you will create an 3D editor and need to select triangles from model with the mouse.
get current version from first post.
i will add more examples from time to time.
Joshy
Petr Schreiber
08-03-2010, 10:29
Cool demo, keep it coming.
ErosOlmi
08-03-2010, 11:15
Created dedicated forum for TBCDL
Joshy, you are moderator in this area.
The best would be to have a post marked as "Sticky" where to have the latest version of your lib always updated and have different posts for specific discussions. This will simplify a lot searching and keeping things organized.
Ciao
Eros
D.J.Peters
08-03-2010, 19:23
added two new examples see first post.
happy collision :lol:
Joshy
Petr Schreiber
10-03-2010, 00:01
The example with 2 colliding pyramids is very nice, thanks!