Anyone Bullet Sharp & Irrlicht Lime?

WaxyChicken
Posts: 4
Joined: Sat Aug 20, 2011 5:27 am

Anyone Bullet Sharp & Irrlicht Lime?

Post by WaxyChicken »

I've just downloaded the Bullet Sharp (.net wrapper for bullet) and intend to use it with my Irrlicht Lime based project.
If anyone can point me to ANYTHING about using these two engines together then i'd greatly appreciate it.

Specifically: BSP loading, MAYA loading, Matching Bullet Sharp collision data with Irrlicht Lime rendering engine.
eagletree
Posts: 28
Joined: Sun Jul 31, 2011 11:20 pm

Re: Anyone Bullet Sharp & Irrlicht Lime?

Post by eagletree »

I know nothing about the wrappers, but http://irrlicht.sourceforge.net/forum/v ... hp?t=32593 is a rewrite of the irrlicht demo to load bsp, using bullet and irrlicht. It was posted by Erwin Coumans.
WaxyChicken
Posts: 4
Joined: Sat Aug 20, 2011 5:27 am

Re: Anyone Bullet Sharp & Irrlicht Lime?

Post by WaxyChicken »

i got a routine pointed out by someone from IrrBullet and translated it.

if anyone else looks for this, you may find it here (untested code):
http://irrlicht.sourceforge.net/forum/v ... 18&t=44639

now if only i can figure out where BtTransform is in Bullet Sharp

Dim fallMotionState As New BulletSharp.DefaultMotionState(btTransform(New BulletSharp.Quaternion(0, 0, 0, 1), New BulletSharp.Vector3(0, 50, 0)))

:roll:

(i know it has to do with Matrix)
xexuxjy
Posts: 225
Joined: Wed Jan 07, 2009 11:43 am
Location: London

Re: Anyone Bullet Sharp & Irrlicht Lime?

Post by xexuxjy »

Yup, it is Matrix. For your example :

BulletSharp.Matrix m = BulletSharp.Matrix.CreateFromQuaternion(new New BulletSharp.Quaternion(0,0,0,1));
m.Translation = New BulletSharp.Vector3(0, 50, 0);

or something like that :)
WaxyChicken
Posts: 4
Joined: Sat Aug 20, 2011 5:27 am

Re: Anyone Bullet Sharp & Irrlicht Lime?

Post by WaxyChicken »

wait a sec, there is no:
Matrix.CreateFromQuaternion :?:

and no matix.transform property or function.

(yes, i have the most recent Bullet Sharp)

what i have so far is
VB.NET 2010

Code: Select all

      Dim q As New BulletSharp.Quaternion(0, 0, 0, 1)
        Dim m As New BulletSharp.Matrix
        BulletSharp.Matrix.RotationQuaternion(q, m)
        Dim groundMotionState As New BulletSharp.DefaultMotionState(m)




but i can't find where the vector3 fits into all of this.

Dim q As New BulletSharp.Quaternion(0, 0, 0, 1)
Public Sub New(ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal w As Single)
Member of BulletSharp.Quaternion

Dim m As New BulletSharp.Matrix
Protected Sub New()
Member of System.ValueType
Summary:
Initializes a new instance of the System.ValueType class.



BulletSharp.Matrix.RotationQuaternion(q, m)
Public Shared Sub RotationQuaternion(ByRef rotation As BulletSharp.Quaternion, ByRef result As BulletSharp.Matrix)
Member of BulletSharp.Matrix

Dim groundMotionState As New BulletSharp.DefaultMotionState(m)
Public Sub New(ByVal startTrans As BulletSharp.Matrix)
Public Class DefaultMotionState
Inherits BulletSharp.MotionState
Member of BulletSharp




there is a bulletsharp.transformUtil (utility? routines?)
but none of them fit the tutorial i found.
I'm beginning to wonder if this is an older version tut.
xexuxjy
Posts: 225
Joined: Wed Jan 07, 2009 11:43 am
Location: London

Re: Anyone Bullet Sharp & Irrlicht Lime?

Post by xexuxjy »

Sorry, looks like I was getting confused with the XNA functions for that. Looking at Andres' checked in code (Matrix.h) it seems like you need :

static Matrix RotationQuaternion( Quaternion rotation );

to generate the rotation matrix from the quaternion.

static Matrix Translation( Vector3 amount );

to create a translation matrix.

Then multiply the two together to get a final matrix.(theres an example in the BulletSharp trunk at : trunk/demos/SlimDX/GImpactTestDemo/Physics.cs )
WaxyChicken
Posts: 4
Joined: Sat Aug 20, 2011 5:27 am

Re: Anyone Bullet Sharp & Irrlicht Lime?

Post by WaxyChicken »

xexuxjy wrote:Then multiply the two together to get a final matrix.(theres an example in the BulletSharp trunk at : trunk/demos/SlimDX/GImpactTestDemo/Physics.cs )
AH!
the webpage said no documentation so i didn't bother looking LOL

Thanks XEXUXJY!!