Page 1 of 1

Version 0.12.0

Posted: Wed Aug 24, 2005 9:45 pm
by Irme
Thanks so much Niko!

i have yet to test out the new featured you added for us .Net'ers but i can't wait till i get off work to go home and try!

Great Job Once Again Niko!!

Posted: Thu Aug 25, 2005 2:22 am
by shurijo
Do you plan on adding overloads to the Irrlicht methods for .NET objects?

Examples:
Irrlicht.Video.Color vs System.Drawing.Color
Irrlicht.Core.Position2D vs System.Drawing.PointF
Irrlicht.Core.Rect vs System.Drawing.Rectangle
etc.

I created a class with static methods (named “IrrichtHelper”) that perform these translations. Although, I only have a few so far (the above 3 are the most common, with a few different overloads themselves, along with a few for Vector3Ds.

I use the .NET native objects in my code (and other libraries). So I just translate to Irrlicht objects whenever I need to pass something to the graphics engine.

It is not a big thing and definitely not more important than porting the remaining items over to .NET, but it would probably help make your .NET library friendlier to .NET programmers who are already familiar with the existing .NET libraries.

Code: Select all

public class IrrlichtHelper
{
...
     static public Irrlicht.Video.Color Color(System.Drawing.Color color)
     {
          return new Irrlicht.Video.Color(color.A, color.R, color.G, color.B);
     }
...
}

Posted: Thu Aug 25, 2005 5:39 pm
by Irme
Well i got a chance to work with the terain node, but i'm having problems - everything seems to be loading just fine, but it never shows the terrain. here is the code to add the node:

Code: Select all

ITerrainSceneNode theTerrain = device.SceneManager.AddTerrainSceneNode("terrain-heightmap.bmp", null ,1010,new Vector3D(0,0,0),new Vector3D(100,100,100),new Color(0,255,255,255));
			theTerrain.Scale = new Vector3D(40,4.4f,40);
			theTerrain.SetMaterialFlag(Irrlicht.Video.MaterialFlag.LIGHTING,false);
			theTerrain.SetMaterialTexture(0, device.VideoDriver.GetTexture("terrain-texture.jpg"));
			theTerrain.SetMaterialTexture(1, device.VideoDriver.GetTexture("detailmap3.jpg"));
			theTerrain.SetMaterialType(Irrlicht.Video.MaterialType.DETAIL_MAP);
			theTerrain.ScaleTexture(1.0f,20.0f);
Any suggesstions?

Posted: Thu Aug 25, 2005 6:24 pm
by niko
shurijo wrote:Do you plan on adding overloads to the Irrlicht methods for .NET objects?
Yes, already thought about it. Maybe a good idea :)

About the non visible terrain: Does it work in the example app I wrote? If yes, does Irrlicht write an error in the console of your app?

Posted: Fri Aug 26, 2005 3:15 am
by Irme
i figured out the problem.

instead of using:

Code: Select all

ITerrainSceneNode theTerrain = device.SceneManager.AddTerrainSceneNode("terrain-heightmap.bmp", null ,1010,new Vector3D(0,0,0),new Vector3D(100,100,100),new Color(0,255,255,255)); 
         theTerrain.Scale = new Vector3D(40,4.4f,40); 
i had do set the initial scale - apparently setting the scale afterwards will not work. here is what i used to make it work.

Code: Select all

ITerrainSceneNode theTerrain = device.SceneManager.AddTerrainSceneNode("terrain-heightmap.bmp", null ,1010,new Vector3D(0,0,0),new Vector3D(40,4.4f,40),new Color(0,255,255,255));