Load a .x mesh file in Irrlicht.NET + other

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
itguru80
Posts: 12
Joined: Fri Feb 18, 2005 9:13 am
Contact:

Load a .x mesh file in Irrlicht.NET + other

Post by itguru80 »

Hi,
has anyone been able to do this

1) Load a .x file mesh using Irrlicht.NET API

I have tried but I get an exception every time. I tried the following line but it doesn't compile, as GetMesh returns an animated mesh.

Irrlicht.Scene.IMesh mesh = device.SceneManager.GetMesh(fileName);

2)
Does anyone know if it is possible to produce a complete .NET dll for Irrlicht by compiling the C++ source code in Visual Studio .NET - I heard a rumour that this is possible?

Thanks

;-)
Pete
Life is wonderful
Fingers
Posts: 38
Joined: Thu Feb 10, 2005 10:17 am
Location: South Africa

Not sure but ...

Post by Fingers »

Code: Select all

	Irrlicht.Scene.IAnimatedMesh a = device.SceneManager.GetMesh( "Arrow.3ds" );
	Irrlicht.Scene.IMesh m = a.GetMesh( 0 );
If you load the Animated Mesh with the Scenemanager, then get the mesh at frame 0.

Or you could do it all in one line

Code: Select all

	Irrlicht.Scene.IMesh a = device.SceneManager.GetMesh( "Arrow.3ds" ).GetMesh( 0 );
Can't say I've tried it with a .x file, but it works with 3ds files
Fingers
Posts: 38
Joined: Thu Feb 10, 2005 10:17 am
Location: South Africa

Tried it

Post by Fingers »

K, well I tried the code above, using the earth.x file which is in the media directory that comes with irrlicht, and it loads and gets the texture, I Then added a IMeshNode into the scene and it worked, It's not loading the texture, but the node is created and I can see the object ...
itguru80
Posts: 12
Joined: Fri Feb 18, 2005 9:13 am
Contact:

Post by itguru80 »

Thanks a lot!!

Do any of you .NET users know the answer to question 2?

I was wondering whether it was possible to produce my own .NET wrapper for Irrlicht.dll somehow using Visual Studio .NET - someone said this was possible, as, as you have probably noticed the .NET wrapper for 0.8 does not have all the features.
Pete
Life is wonderful
Post Reply