Search found 13 matches

by larztheloser
Sat Jan 30, 2010 11:51 am
Forum: Beginners Help
Topic: Passing arrays to functions
Replies: 1
Views: 258

Passing arrays to functions

Hi all, With the help of Travis from the advanced forum, I added this method to the ITerrainSceneNode object: bool CTerrainSceneNode::loadHeightMapFromArray(irr::f32 heights[], int width, video::SColor vertexColor, s32 smoothFactor) Then I added another method to the sceneManager, addArrTerrainScene...
by larztheloser
Sat Jan 30, 2010 8:00 am
Forum: Advanced Help
Topic: Terrain data from array
Replies: 3
Views: 900

Thanks vitec! That was a very silly mistake of mine!
by larztheloser
Sat Jan 30, 2010 1:34 am
Forum: Advanced Help
Topic: Terrain data from array
Replies: 3
Views: 900

Terrain data from array

Hi all, I'm working at extending the CTerrainSceneNode class to add a method with loads a heightmap from an array of values. Right now my function looks like this: bool CTerrainSceneNode::loadHeightMapFromArray(irr::f32* heights[], int width, video::SColor vertexColor, s32 smoothFactor) { const u32 ...
by larztheloser
Sun Oct 25, 2009 9:38 pm
Forum: Beginners Help
Topic: Real-time terrain modification
Replies: 2
Views: 379

Thanks! Will try.
by larztheloser
Sun Oct 25, 2009 5:17 am
Forum: Beginners Help
Topic: Real-time terrain modification
Replies: 2
Views: 379

Real-time terrain modification

Hi all,
I bet this has been answered somewhere (can't find it), but is it possible to modify a terrain (without reloading it from scratch) in real time? Specifically, I want to change the height of a terrain if, for example, a cannonball hits it.
Thanks!
by larztheloser
Sat Oct 10, 2009 1:57 am
Forum: Beginners Help
Topic: Alt key crashes engine :(
Replies: 7
Views: 539

Could you please post us the non-working code. Because my programs compile fine with no alt-key trouble.

Of course, alt-F4 will close the current window etc, so I take it you are handling that case.
by larztheloser
Sat Oct 10, 2009 1:29 am
Forum: Open Discussion and Dev Announcements
Topic: Request: Passing IImage or ITexture as heightmaps
Replies: 6
Views: 1385

An IImage would do just as well (Just trying to do simple perlin noise random terrains).
by larztheloser
Sat Oct 10, 2009 1:15 am
Forum: Beginners Help
Topic: Camera problem
Replies: 6
Views: 387

Yeah - I'm only using setRotation.

Thanks for that code snippet though!
by larztheloser
Fri Oct 09, 2009 3:08 am
Forum: Beginners Help
Topic: Camera problem
Replies: 6
Views: 387

Solved my own problem, I think.

For some reason, if you set the position, then render, then rotate, then update the absolute position, that works.

Can anybody tell me why? I'm confused - doesn't rendering the scene update the absolute position for me?
by larztheloser
Fri Oct 09, 2009 12:29 am
Forum: Beginners Help
Topic: Camera problem
Replies: 6
Views: 387

I thought of that. But shouldn't that be handled by:

Code: Select all

cam->bindTargetAndRotation(true)
?
Thanks for trying!
by larztheloser
Thu Oct 08, 2009 10:48 pm
Forum: Beginners Help
Topic: Camera problem
Replies: 6
Views: 387

Sorry, I'll be even more descriptive of the problem.

Why does the camera tilt down when moving up, or up if moving down?
Why does the camera turn 180 degrees when moving forward?
by larztheloser
Thu Oct 08, 2009 9:46 pm
Forum: Open Discussion and Dev Announcements
Topic: Request: Passing IImage or ITexture as heightmaps
Replies: 6
Views: 1385

I still think the suggestion has merit. Or at least the ability to convert a texture to a sort of virtual io::IReadFile. What I have is a texture. Currently, as I understand it, it is not possible to convert that texture to a height map for a terrain without saving the file (hope I'm not missing som...
by larztheloser
Thu Oct 08, 2009 9:10 pm
Forum: Beginners Help
Topic: Camera problem
Replies: 6
Views: 387

Camera problem

Because I'm using windows to do my input I can't use the FPS or Maya camera classes. What I've done is create a normal camera and made it float above a terrain. Then I made 4 global variables to store information about the camera's position: camx, camy, camz and camr (the last one being rotation). T...