ITerrainSceneNode

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

ITerrainSceneNode

Post by disanti »

I'm having trouble making terrain with this.

errors:

Code: Select all

C:\irrlicht\examples\leveltest\main.cpp(174) : error C2039: 'ISceneManager' : is not a member of 'ITerrainSceneNode'
        C:\IRRLICHT\INCLUDE\ITerrainSceneNode.h(17) : see declaration of 'ITerrainSceneNode'
C:\irrlicht\examples\leveltest\main.cpp(174) : error C2039: 'ISceneManager' : is not a member of 'ITerrainSceneNode'
        C:\IRRLICHT\INCLUDE\ITerrainSceneNode.h(17) : see declaration of 'ITerrainSceneNode'
C:\irrlicht\examples\leveltest\main.cpp(174) : error C2653: 'ISceneManager' : is not a class or namespace name
C:\irrlicht\examples\leveltest\main.cpp(174) : error C2039: 'addTerrainSceneNode' : is not a member of 'ITerrainSceneNode'
        C:\IRRLICHT\INCLUDE\ITerrainSceneNode.h(17) : see declaration of 'ITerrainSceneNode'
C:\irrlicht\examples\leveltest\main.cpp(174) : error C2065: 'null' : undeclared identifier
code:

Code: Select all

	//terrain
	scene::ITerrainSceneNode* terrain;
	terrain->ISceneManager::addTerrainSceneNode(terrain,camera,
												"../../media/sulez.jpg",
												"../../media/sulez.jpg",
												null,12,120);
________
Gm Foods
Last edited by disanti on Tue Feb 22, 2011 7:56 am, edited 1 time in total.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

this: "terrain->ISceneManager::" does not work

you need to get an ISceneManager pointer from your device pointer like so:


//somewhere at the beginning of your code
IrrLichtDevice * device = createDevice(...);

//when u want to get the ISceneManager
ISceneManager * smgr = device->getSceneManager();

//to use it to create a terainscene node
ITerrainSceneNode* m_node = smgr->addTerrainSceneNode(...);
a screen cap is worth 0x100000 DWORDS
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

Ok, now I'm only getting one error. :?

C:\irrlicht\examples\leveltest\main.cpp(176) : error C2664: 'addTerrainSceneNode' : cannot convert parameter 2 from 'class irr::scene::ICameraSceneNode *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast

Code: Select all

	//terrain
	scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(terrain,camera,
												"../../media/sulez.jpg",
												"../../media/sulez.jpg",
												NULL,12,120);
I didn't get what the "camera ID" was supposed to be so I used the camera node in the second parameter, what am I supposed to do?
________
List Of Bmw Engines
Last edited by disanti on Tue Feb 22, 2011 7:56 am, edited 1 time in total.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

Code: Select all

  ITerrainSceneNode (ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f)) 
the second parameter is supposed to be a number. if u want to recieve events for this GUI element, the ID number of the event will be the same as the ID number u put here. If you dont care, just use -1

furthermore, your other arguments arent correct either.
a screen cap is worth 0x100000 DWORDS
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

I can tell you one thing, I'm no programmer :P I'm the artist of this game trying to test my artwork when my programmer is working on something else :(

This is hopeless, I don't understand it at all. Back to my town model :oops:
________
Thinkmill
Post Reply