Hi!
This is a little test for ODE (without collision checking :()
If you don't have Mak.ODE, so you must start
syncmods.exe -u username -p password mak
I have rewritten quickly DreiDe for BMax 1.12, so you can download the complete package with DreiDe, Source and Exe at:
http://www.blitz-pasting.net/index.php?content=bp_showupload&id=640
Mak.ODE needs dODEClose, maybe, witout the are memory leaks.
For collision detection, you must write a CallBack function.
Maybe, I will write a better ODE module with helper functions.
It's just a quick test, if ODE works.
cu olli
This is a little test for ODE (without collision checking :()
If you don't have Mak.ODE, so you must start
syncmods.exe -u username -p password mak
Strict Framework Pub.DreiDe Import Mak.ODE Global World : Int Global Space : Int Global BoxBody : Int Global BoxMass : dMass Global BoxGeom : Int Global BoxMesh : TMesh Global PlaneGeom : Int Global PlaneMesh : TMesh Global Camera : TCamera Global Position : Float Ptr TDreiDe.Graphics3D(640, 480) ' Erstelle Welt World = dWorldCreate() dWorldSetGravity(World, 0.0, -9.81, 0.0) ' Erstelle Raum Space = dHashSpaceCreate(0) ' Erstelle Box BoxBody = dBodyCreate(World) dBodySetPosition(BoxBody, 0.0, 40.0, 0.0) BoxMass = New dMass dMassSetBoxTotal(BoxMass, 0.01, 2.0, 2.0, 2.0) dBodySetMass(BoxBody, BoxMass) BoxGeom = dCreateBox(Space, 2.0, 2.0, 2.0) dGeomSetBody(BoxGeom, BoxBody) BoxMesh = TPrimitive.CreateCube() BoxMesh.ScaleVertices(2.0, 2.0, 2.0) BoxMesh.SetPosition(0.0, 40.0, 0.0) ' Erstelle Boden PlaneGeom = dCreatePlane(Space, 0.0, 1.0, 0.0, 0.0) PlaneMesh = TPrimitive.CreateQuad() PlaneMesh.ScaleVertices(100.0, 100.0, 1.0) PlaneMesh.SetRotation(-90.0, 0.0, 0.0) ' Erstelle Kamera Camera = New TCamera Camera.SetPosition(0.0, 10.0, 50.0) While Not KeyDown(KEY_ESCAPE) dWorldQuickStep(World, 0.1) If dBodyIsEnabled(BoxBody) Then Position = dGeomGetPosition(BoxGeom) BoxMesh.SetPosition(Position[0], .. Position[1], .. Position[2]) EndIf Camera.Render() Flip() Wend EndGraphics()
I have rewritten quickly DreiDe for BMax 1.12, so you can download the complete package with DreiDe, Source and Exe at:
http://www.blitz-pasting.net/index.php?content=bp_showupload&id=640
Mak.ODE needs dODEClose, maybe, witout the are memory leaks.
For collision detection, you must write a CallBack function.
Maybe, I will write a better ODE module with helper functions.
It's just a quick test, if ODE works.
cu olli