Terrain in Bindenlicht
Terrain in Bindenlicht
I am trying to add a terrain to my project, I am using the BINDENLICHT, tried to use example that I came in the IRRLICHT but no functioned, I tried the following form without success:
ITerrainSceneNode terreno = smgr.addTerrainSceneNode(0,0,driver.getTexture("terrain-texture.jpg"), "terrain-heightmap.bmp", driver->getTexture("detailmap3.jpg"),new Dimension2df(10,10), 20, new Dimension2di(15,10));
what I must make so that I add the terrain to the project?
ITerrainSceneNode terreno = smgr.addTerrainSceneNode(0,0,driver.getTexture("terrain-texture.jpg"), "terrain-heightmap.bmp", driver->getTexture("detailmap3.jpg"),new Dimension2df(10,10), 20, new Dimension2di(15,10));
what I must make so that I add the terrain to the project?
Bindenlicht is a Java binding for Irrlicht, as Irrlict is a C++ engine.
This may be the only problem: driver->getTexture("detailmap3.jpg"), it should be driver.getTexture("detailmap3.jpg")
I originally started using Bindenlicht but i changed to jIrr as it seems much better than Bindenlicht in my opinion, so you may want to look into that, basically in jIrr you can just write the C++ code in Java syntax (ie . instead of ->) whereas in Bindenlicht i think some of the parameters or method names differ.
This may be the only problem: driver->getTexture("detailmap3.jpg"), it should be driver.getTexture("detailmap3.jpg")
I originally started using Bindenlicht but i changed to jIrr as it seems much better than Bindenlicht in my opinion, so you may want to look into that, basically in jIrr you can just write the C++ code in Java syntax (ie . instead of ->) whereas in Bindenlicht i think some of the parameters or method names differ.
I had attemped to download jIrr but at the time the site was is off. But I download today jIrr and I was trying to test it, but I did not obtain, I executed the commands:
javac -classpath .;jirr_0_5.jar *.java
And after that run your test with
java -classpath ./jirr_0_5.jar TestHelloWorld
but it appears the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: TestHelloWorld
I placed the folder net and in the same diretorio of the folders .java and .class, and I placed irrlicht_wrap.dll and irrlicht.dll, in the same directory.
what I must make to function correctly?
thank you
javac -classpath .;jirr_0_5.jar *.java
And after that run your test with
java -classpath ./jirr_0_5.jar TestHelloWorld
but it appears the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: TestHelloWorld
I placed the folder net and in the same diretorio of the folders .java and .class, and I placed irrlicht_wrap.dll and irrlicht.dll, in the same directory.
what I must make to function correctly?
thank you
I'm afraid i can't help you with running from the command line as i dont run my java programs that way, i use an IDE called netbeans (an old version of it, cant understand the new version), ive been trying to run my program from the university computer labs from the command line (they have the new netbeans instead of the old one i know how to use) but i've had similar problems and don't really know how to get round them :s
Ok, well i can tell you how i'm using jIrr in Netbeans 3.5.1 as that's what i'm using, the very latest one is version 4 something, there's a version after 3.5.1 which i think works in a similar way, but version 4 is all about projects and doesn't let you mound filesystems like in version 3.
So what you need to do is mount the folders containing the Test code and also mount the jirr04.jar file, this contains the source code.
Then go to Tools -> Options -> Execution Types -> External Execution and click on the expert tab and change the working directory to whichever jirr folder contains the media folder, not sure which one that is i'm afraid, but shouldn't be too hard to find.
And that should work i think, let me know if you have any problems with it, if you have a slightly later version of netbeans to me then the Tools -> Options stage will be slightly different as they changed that part a bit, but hopfully you'll be able to find the right place to change the working directory.
So what you need to do is mount the folders containing the Test code and also mount the jirr04.jar file, this contains the source code.
Then go to Tools -> Options -> Execution Types -> External Execution and click on the expert tab and change the working directory to whichever jirr folder contains the media folder, not sure which one that is i'm afraid, but shouldn't be too hard to find.
And that should work i think, let me know if you have any problems with it, if you have a slightly later version of netbeans to me then the Tools -> Options stage will be slightly different as they changed that part a bit, but hopfully you'll be able to find the right place to change the working directory.
I will need to figure out how to run my project on the University computers as i will have to present it to my supervisor so he can mark it, so eventually i either have to be able to use my programs in version 4 of netbeans or run it from the command line. Although i can't say when that will be as i do all my project work from home, but if i manage to figure it out then i'll try and let you know.
JP
you can tell me more one how the construction one project of Jirr in netbeans, I download netbeans 4.1, but i don't understand:
"So what you need to do is mount the folders containing the Test code and also mount the jirr04.jar file, this contains the source code. "
but I want the explanation for exemple what the new project e I must to create, and everything.
very thanks.
you can tell me more one how the construction one project of Jirr in netbeans, I download netbeans 4.1, but i don't understand:
"So what you need to do is mount the folders containing the Test code and also mount the jirr04.jar file, this contains the source code. "
but I want the explanation for exemple what the new project e I must to create, and everything.
very thanks.