getMesh() AddTerrainSceneNode

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
slaaitjuh
Posts: 26
Joined: Tue Oct 31, 2006 5:07 pm

getMesh() AddTerrainSceneNode

Post by slaaitjuh »

Hey,

this is actually an irrlicht net cp problem.
i currently have a small problem with getting the created mesh by the addTerrainSCeneNode function. I need the terrain mesh, so i can pass it to the newton wrapper class. I have the following code:

Code: Select all

            terrain = SceneManager.AddTerrainSceneNode(
                "terrain-heightmap.bmp", null, -1,
                new Vector3D(), new Vector3D(), new Vector3D(40, 4.4f, 40), new Color(255, 255, 255, 255), 5, TerrainPatchSize.TPS17);

            terrain.SetMaterialFlag(MaterialFlag.Lighting, false);
            terrain.SetMaterialType(MaterialType.DetailMap);
            terrain.SetMaterialTexture(0, VideoDriver.GetTexture("terrain-texture.jpg"));
            terrain.SetMaterialTexture(1, VideoDriver.GetTexture("detailmap3.jpg"));
            terrain.ScaleTexture(1.0f, 20.0f);
according to this link http://irrlicht.sourceforge.net/docu/cl ... _node.html it should be possible to use the function getMesh.

Any idea?
Locked