Page 2 of 2

Posted: Tue Jan 24, 2006 9:16 pm
by Yoann
So, I must to replace the old include file by my news include files. But I don't inderstand when you say "Change the lib path in your visual studio". Can you explain me more precisly ?

Thank !

Yoann.

Posted: Wed Jan 25, 2006 9:17 am
by sdi2000
change the path to the new "irrlicht.lib" in your project settings(alt-f7) or in the global settings(extra->options->folders) of your visual studio.
Note: it is necessary to learn more about you visual studio!!
How do you compile your project without change or modification of this propertys? Without this modification it dont works... =)
the easyest and dirty way is...
if u use the "#pragma comment(lib, "Irrlicht.lib")" in ur source, copy the new builded "Irrlicht.lib" and the "Irrlicht.dll" into the folder where the old irrlicht engine is or in ur project folder.
But i dont advise this way!!!

:shock: :? :)

Posted: Wed Jan 25, 2006 11:44 am
by Yoann
Yes, I know. I know how to compil a project Irrlicht. I know that we have to use irrlicht.lib, and irrlicht.dll.... but my problem is :

I don't know how to generate the new Irrlicht.lib and Irrlicht.dll .... You understand ?

Thank You


Yo

Posted: Wed Jan 25, 2006 12:06 pm
by Yoann
I found its ! :P .... There was in the debug ..... :D

Yo.

Posted: Wed Jan 25, 2006 12:29 pm
by Yoann
Thank you very much !!! My sun run over the axis X :P ! You have saved my life !!!!

Posted: Wed Jan 25, 2006 12:44 pm
by sdi2000
your life? nothing more? okay
:D

good luck with your project... :wink:

Posted: Thu Jan 26, 2006 3:20 pm
by Yoann
Yes , My Life ^^ .

Now I will try to create a floodlight ^^, I Hope that there are ever fonctions to make floodlight .... I will see ^^

Posted: Thu Jan 26, 2006 5:36 pm
by Yoann
I've got a new problem .... I want make a moon who turn as the sun, but with a
difference of PI.

I don't know how make that ...

How can I make that simply ?

Thank you !


Yoann.

Posted: Fri Jan 27, 2006 7:54 am
by sdi2000
if you want it really simple, add a sun and a moon and in the middle of both a dummynode for your scene.
Then set the moon and the sun as children of the dummynode and add a rotationAnimator, not the circleAnimatror, to the dummynode. thats all

(sun)-----(dummy)------(moon)

use the dummy node as center of your rotation. :D

Posted: Sun Jan 29, 2006 1:51 pm
by Yoann
Yes , I know ... but the dummynode must to be a ISceneNodeAnimator ? No ?

Because I make that, and it not compile :

Code: Select all

scene::ISceneNode* dummy;
dummy = smgr->addEmptySceneNode();
dummy->setPosition(core::vector3df(0,0,600));	

scene::ISceneNode* soleil;
soleil = smgr->addEmptySceneNode();	
soleil->setPosition(core::vector3df(-2200,0,600));


scene::ISceneNode* lune;
lune = smgr->addEmptySceneNode();
soleil->setPosition(core::vector3df(2200,0,600));


dummy->addChild(soleil);
dummy->addChild(lune);


dummy  = smgr->createRotationAnimator(core::vector3df(2,1,2));

But It's make error ... Normal , beacause dummy is not a ISceneNodeAnimator ....

Buf if I replace scene::ISceneNode* dummy, by scene::ISceneNodeAnimator* dummy, It's make error, because fonctions as setPosition are not member of ISceneNodeAnimator....

I don't how to resolve my problem ... :cry:

Thank you !

Yo

Posted: Sun Jan 29, 2006 7:40 pm
by sdi2000
just replace

Code: Select all

dummy  = smgr->createRotationAnimator(core::vector3df(2,1,2));
with

Code: Select all

scene::ISceneNodeAnimator *l_animate = smgr->createRotationAnimator(core::vector3df(2,1,2)); 

if(l_animate != NULL)
{
 dummy->addAnimator(l_animate);
 l_animate->drop();
}



Posted: Mon Jan 30, 2006 4:35 pm
by Yoann
Ok, thank ... I understand.... But it doesn't work ...

To resume , I have this code :

Code: Select all


scene::ISceneNode* dummy; 
scene::ISceneNodeAnimator* centre; 


dummy = smgr->addEmptySceneNode();
dummy->setPosition(core::vector3df(0,0,600)); 

scene::ISceneNode* soleil;
soleil = smgr->addEmptySceneNode();	
soleil->setPosition(core::vector3df(-2,0,600));

scene::ISceneNode* lune;
lune = smgr->addEmptySceneNode();
soleil->setPosition(core::vector3df(2,0,600));

dummy->addChild(soleil);
dummy->addChild(lune); 

centre = smgr->createRotationAnimator(core::vector3df(2,1,2)); 

dummy->addAnimator(centre);	
centre->drop;


I haven't my sun and my moon....

Thank you !

Yoann[/code]

Posted: Wed Feb 01, 2006 11:00 am
by Guest
Nobody know ?

^^

Yoann

Posted: Wed Feb 01, 2006 12:07 pm
by sdi2000
u kiddn me? :?
use visible scene nodes for your moon and your sun not empty scene nodes!!!

the following code snipped works properly:

Code: Select all

		IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
	IAnimatedMeshSceneNode* node;
	IAnimatedMeshSceneNode* node1;
	ISceneNode* nodeDummy = smgr->addEmptySceneNode();

	if(mesh != NULL)
	{
		node = smgr->addAnimatedMeshSceneNode( mesh);
		node1 = smgr->addAnimatedMeshSceneNode( mesh);
	}
	 

	ISceneNodeAnimator *anim = NULL;
	if (node && node1 && nodeDummy)
	{
		node->setMaterialFlag(EMF_LIGHTING, false);
		node->setFrameLoop(0, 0);
		node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
		node->setPosition(core::vector3df(50.0f, 0.0f, 0.0f));

		node1->setMaterialFlag(EMF_LIGHTING, false);
		node1->setFrameLoop(0, 0);
		node1->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
		node1->setPosition(core::vector3df(-50.0f, 0.0f, 0.0f));

		nodeDummy->addChild(node);
		nodeDummy->addChild(node1);

		nodeDummy->setPosition(core::vector3df(0,0,0));

		ISceneNodeAnimator *anim = smgr->createRotationAnimator(core::vector3df(0,0,0.1));
		if(anim)
		{
			nodeDummy->addAnimator(anim);
			anim->drop();
		}
	}


Posted: Sun Feb 05, 2006 5:49 pm
by Yoann
Thank you very much ! It's good :D

Code: Select all

 

	scene::ISceneNode* dummy; 
	scene::ISceneNodeAnimator* centre = 0;
	u32 time;

	dummy = smgr->addEmptySceneNode(); 



	scene::ISceneNode* soleil;
	scene::ISceneNode* lumsoleil;
	soleil = smgr->addEmptySceneNode();	
	lumsoleil = smgr->addEmptySceneNode();	

	soleil = smgr->addBillboardSceneNode(soleil, core::dimension2d<f32>(400,400));
	soleil->setMaterialFlag(video::EMF_LIGHTING, false);
	soleil->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
	soleil->setMaterialTexture(0,	driver->getTexture("soleil.jpg"));
	soleil->setPosition(core::vector3df(-3000,0,600));

	lumsoleil = smgr->addLightSceneNode(0, core::vector3df(0,0,0),video::SColorf(0.8f, 1.0f, 0.0f, 1.0f), 5000.0f);
	lumsoleil->setPosition(core::vector3df(-3000,0,600));



	scene::ISceneNode* lune;
	scene::ISceneNode* lumlune;
	lune = smgr->addEmptySceneNode();
	lumlune = smgr->addEmptySceneNode();


	lune = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(400,400));
	lune->setMaterialFlag(video::EMF_LIGHTING, false);
	lune->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
	lune->setMaterialTexture(0,	driver->getTexture("lune.jpg"));
	lune->setPosition(core::vector3df(3000,0,600));

	lumlune = smgr->addLightSceneNode(0, core::vector3df(0,0,0),video::SColorf(0.5f, 0.5f, 0.5f, 1.0f), 2000.0f);
	lumlune->setPosition(core::vector3df(3000,0,600));


	
	dummy->addChild(soleil);
	dummy->addChild(lumsoleil);
	dummy->addChild(lune); 
	dummy->addChild(lumlune);

	centre = smgr->createRotationAnimator(core::vector3df(0,0,0.1)); 

	dummy->addAnimator(centre);
	dummy->setPosition(core::vector3df(0,0,600));  
	centre->drop();