Search found 291 matches

by Insomniacp
Wed Aug 03, 2011 4:13 pm
Forum: Advanced Help
Topic: Distance to bounding box
Replies: 2
Views: 1144

Re: Distance to bounding box

I don't think I found an easy way to do this. One way you will probably be able to use is to get a vector to the center of the bounding box. Then reverse the vector and normalize it. Then you can multiply this new vector by the boundingBox.getExtent()/2 to get to the edge of the bounding box in that...
by Insomniacp
Wed Aug 03, 2011 3:58 pm
Forum: Beginners Help
Topic: Terrain scale
Replies: 3
Views: 147

Re: Terrain scale

are you referencing this against anything? if you just change the size you won't notice a difference unless there is another static object you can compare it to. Try placing a cube or something in the scene so you can tell where the end of the terrain is compared to that.
by Insomniacp
Wed Aug 03, 2011 3:00 am
Forum: Beginners Help
Topic: IFileSystem questions, ISceneManager::getMesh() fails
Replies: 21
Views: 691

Re: IFileSystem questions, ISceneManager::getMesh() fails

could it be you don't have permission? try doing it to /home/yourUsername/resource that way you should have permissions and can make sure. That or run as sudo but that could be a bad idea.
by Insomniacp
Tue Aug 02, 2011 3:53 pm
Forum: Advanced Help
Topic: How to load textures faster?
Replies: 29
Views: 1988

Re: How to load textures faster?

you can create a texture from the image though can you not? makes it so the texture is loaded in the main thread by doesn't need to read from the hard disk only memory.
by Insomniacp
Tue Aug 02, 2011 3:48 pm
Forum: Advanced Help
Topic: How to load textures faster?
Replies: 29
Views: 1988

Re: How to load textures faster?

you can thread your program to preload the textures, if you have a menu or something to begin with then it will work well. just load all the image files into memory or an IIMage then get the data back to the main thread and load them in as textures. This will make it so you don't have to load them a...
by Insomniacp
Tue Aug 02, 2011 3:43 pm
Forum: Beginners Help
Topic: IGUIElement::setUserData() and the like not in 1.7.2
Replies: 8
Views: 299

Re: IGUIElement::setUserData() and the like not in 1.7.2

Yeah, you would need to add your element. casting from a base class to derived class is a very bad thing ;) Only do that when you know the base class is from a derived class. Otherwise you corrupt memory by accessing something that isn't really there or used by something else. Doing that will help y...
by Insomniacp
Tue Aug 02, 2011 12:02 am
Forum: Beginners Help
Topic: IGUIElement::setUserData() and the like not in 1.7.2
Replies: 8
Views: 299

Re: IGUIElement::setUserData() and the like not in 1.7.2

It would be a minor change because its only two functions and one variable. Hmmm... I am not sure if you can accomplish this through inheritance but it could be possible. (either inherit each class you use and add the function yourself through that) I don't think you would be able to inherit the IGU...
by Insomniacp
Mon Aug 01, 2011 2:57 pm
Forum: Beginners Help
Topic: IGUIElement::setUserData() and the like not in 1.7.2
Replies: 8
Views: 299

Re: IGUIElement::setUserData() and the like not in 1.7.2

You could edit irrlicht source and add it in if you would like, not a very hard thing to create.
by Insomniacp
Mon Aug 01, 2011 5:18 am
Forum: Beginners Help
Topic: VS C++ 2010 express warning error
Replies: 6
Views: 267

Re: VS C++ 2010 express warning error

not sure, I use the same program and have had no trouble with that. Go to file -> advanced save options -> encoding: unicode. and of course save the file afterwards ;)
by Insomniacp
Mon Aug 01, 2011 1:14 am
Forum: Beginners Help
Topic: ITexture, IImage, heightmap and Texture
Replies: 10
Views: 2153

Re: ITexture, IImage, heightmap and Texture

cout<<"create image"<<endl; //make image, you make this yourself already I am just loading one from a file to save time         video::IImage* heightMapImage=driver->createImageFromFile("../../media/terrain-heightmap.bmp"); //get file system from irrlicht         io::IFileSystem...
by Insomniacp
Mon Aug 01, 2011 12:43 am
Forum: Beginners Help
Topic: ITexture, IImage, heightmap and Texture
Replies: 10
Views: 2153

Re: ITexture, IImage, heightmap and Texture

for a slow workaround you can save the image to a temp file and then load using that file ;) Looking through my old code where I did something similar for a better way to do things. EDIT: Try this, create an IImage then call driver->addTexture (const io::path &name, IImage *image, void *mipmapDa...
by Insomniacp
Sun Jul 31, 2011 5:38 pm
Forum: Advanced Help
Topic: Custom Terrain Vertices and Selector
Replies: 7
Views: 1056

Re: Custom Terrain Vertices and Selector

Yes this is a new post. I have a work around so figured I may as well make a new one instead of making my fourth edit. Anyway this is how I solved the problem. Use node->getMesh()->getMeshBuffer(0) instead of node->getRenderBuffer(). The render buffer gets its data from the mesh's meshbuffer so alte...
by Insomniacp
Sun Jul 31, 2011 4:08 pm
Forum: Advanced Help
Topic: Custom Terrain Vertices and Selector
Replies: 7
Views: 1056

Re: Custom Terrain Vertices and Selector

Oh yeah, that problem... I still get in occasionally and in the past I needed to recreate the bounding box for the changed meshes, I believe culling or something is done with the bounding boxes and having a bad one will cause that... Testing now. Darn I was already doing that... Guess it was with my...
by Insomniacp
Sun Jul 31, 2011 5:24 am
Forum: Advanced Help
Topic: Custom Terrain Vertices and Selector
Replies: 7
Views: 1056

Re: Custom Terrain Vertices and Selector

hmmm, interesting. So you have visual holes? Is it a single terrain scene node? And all you do is edit the height? Can you post the code for that part?
by Insomniacp
Sun Jul 31, 2011 4:22 am
Forum: Advanced Help
Topic: Custom Terrain Vertices and Selector
Replies: 7
Views: 1056

Re: Custom Terrain Vertices and Selector

How are you creating the triangle selector? I do this using nvidia physx and alter height in real time so I have quite a bit of experience with this besides the triangle selector part. I will read how they are created. It could be the data is int based for terrains as the normal heightmaps are int b...