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!!
Version 0.12.0
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.
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);
}
...
}
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:
Any suggesstions?
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);
i figured out the problem.
instead of using:
i had do set the initial scale - apparently setting the scale afterwards will not work. here is what i used to make it work.
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);
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));