Using PhysicX with Irrlicht

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
sebi707
Posts: 18
Joined: Tue Feb 20, 2007 4:19 pm

Using PhysicX with Irrlicht

Post by sebi707 »

can somebody tell me how to use phsysix by ageia together with irrlicht?
this turial from the irrlicht homepage doesn't work any more!
i got those errors when compiling:

Code: Select all

1>------ Erstellen gestartet: Projekt: irrlicht_physx, Konfiguration: Release Win32 ------
1>Kompilieren...
1>Stream.cpp
1>main.cpp
1>E:\Programme\Microsoft Visual Studio 8\VC\include\Stream.h(26) : error C2143: Syntaxfehler: Es fehlt ';' vor '*'
1>E:\Programme\Microsoft Visual Studio 8\VC\include\Stream.h(26) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.
1>E:\Programme\Microsoft Visual Studio 8\VC\include\Stream.h(26) : error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.
1>g:\dokumente und einstellungen\sebi\desktop\irrlicht_physx\irrlicht_physx\main.h(107) : warning C4244: '=': Konvertierung von 'double' in 'NxReal', möglicher Datenverlust
1>g:\dokumente und einstellungen\sebi\desktop\irrlicht_physx\irrlicht_physx\scenenodes.h(645) : error C2259: 'CPhysXAnimatedMeshSceneNode': Instanz von abstrakter Klasse kann nicht erstellt werden
1>        aufgrund folgender Member:
1>        "irr::scene::ISceneNode *irr::scene::IAnimatedMeshSceneNode::getB3DJointNode(const irr::c8 *)": ist abstrakt
1>        e:\programme\microsoft visual studio 8\vc\include\IAnimatedMeshSceneNode.h(141): Siehe Deklaration von 'irr::scene::IAnimatedMeshSceneNode::getB3DJointNode'
1>        "void irr::scene::IAnimatedMeshSceneNode::setReadOnlyMaterials(bool)": ist abstrakt
1>        e:\programme\microsoft visual studio 8\vc\include\IAnimatedMeshSceneNode.h(182): Siehe Deklaration von 'irr::scene::IAnimatedMeshSceneNode::setReadOnlyMaterials'
1>        "bool irr::scene::IAnimatedMeshSceneNode::isReadOnlyMaterials(void)": ist abstrakt
1>        e:\programme\microsoft visual studio 8\vc\include\IAnimatedMeshSceneNode.h(185): Siehe Deklaration von 'irr::scene::IAnimatedMeshSceneNode::isReadOnlyMaterials'
1>        "void irr::scene::IAnimatedMeshSceneNode::setMesh(irr::scene::IAnimatedMesh *)": ist abstrakt
1>        e:\programme\microsoft visual studio 8\vc\include\IAnimatedMeshSceneNode.h(188): Siehe Deklaration von 'irr::scene::IAnimatedMeshSceneNode::setMesh'
1>        "irr::scene::IAnimatedMesh *irr::scene::IAnimatedMeshSceneNode::getMesh(void)": ist abstrakt
1>        e:\programme\microsoft visual studio 8\vc\include\IAnimatedMeshSceneNode.h(191): Siehe Deklaration von 'irr::scene::IAnimatedMeshSceneNode::getMesh'
1>.\main.cpp(243) : error C2039: 'broadPhase': Ist kein Element von 'NxSceneDesc'
1>        e:\programme\microsoft visual studio 8\vc\include\NxSceneDesc.h(175): Siehe Deklaration von 'NxSceneDesc'
1>.\main.cpp(243) : error C2065: 'NX_BROADPHASE_COHERENT': nichtdeklarierter Bezeichner
1>.\main.cpp(244) : error C2039: 'collisionDetection': Ist kein Element von 'NxSceneDesc'
1>        e:\programme\microsoft visual studio 8\vc\include\NxSceneDesc.h(175): Siehe Deklaration von 'NxSceneDesc'
1>.\main.cpp(370) : warning C4244: 'Argument': Konvertierung von 'time_t' in 'unsigned int', möglicher Datenverlust
1>Das Buildprotokoll wurde unter "file://g:\Dokumente und Einstellungen\Sebi\Desktop\irrlicht_physx\irrlicht_physx\Release\BuildLog.htm" gespeichert.
1>irrlicht_physx - 7 Fehler, 2 Warnung(en)
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
sorry i'm german and so my visual studio is german, too.
can somebody tell me ho to change the code form the tutorial to get the latest physicX with the latest irrlicht?
datamagik
Posts: 26
Joined: Wed Feb 14, 2007 11:25 pm
Location: Bar Harbor, Maine USA

Post by datamagik »

Unfortunately that physics engine only seems to support Windows(TM) operating systems and I am currently devoting my efforts to cross platform SDKs.

Looking at the Irrlicht tutorial page it appears that this tutorial was tested with Irrlicht 0.14. Perhaps if you download that version of the Irrlicht 3D Engine you can get the sample code to compile against that. Then you could look at changes to the engine since that release and perhaps you will locate the source of your build errors.

Although I am fiercely proud of my little bit of German Swiss ancestry, that unfortunately does not translate into any useful language skills (Thai, perhaps simple French or Spanish, but alas no German). If you try your build again in an English copy of your dev tools I may have a better shot at guessing as to what is preventing the project from building. :)
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Hmmm, it looks like there are some defines screwed up !?!?!
Maybe you did the includings and/or using namespaces in a wrong order...
I had similar errors a while ago and was pretty curious about it...
Then I found out that I used the namespace of Irlicht before including windows.h...
like this:

Code: Select all

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#include <windows.h>
then when I included windows.h before using namespace it worked:

Code: Select all

#include <windows.h>
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
Maybe you have a similar problem ???
Try to change the order of the includings...

Or maybe you have a problem with the namespaces themselves ???
For example Tokamak has some objects (classes, structs, or similar) that also Irrlicht has...
So if you use all namespaces from Irrlicht and Tokamak you'll get errors...
So try it without using namespaces...

If this are not your problems, post your code (at least the beginning), please...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
sebi707
Posts: 18
Joined: Tue Feb 20, 2007 4:19 pm

Post by sebi707 »

so here are my sources! they are the (almost) original sources of the physix with irrlicht tutoial! you can download the sources here!
i hope you can help me with my problem

PS: windows.h is included first


ok! now i tried the old version of irrlicht an now the are only 2 errors which are interesting.
the problem is in this 2 lines of code

Code: Select all

sceneDesc.broadPhase            = NX_BROADPHASE_COHERENT;
sceneDesc.collisionDetection    = true;
collisionDetection and NX_BROADPHASE_COHERENT are unknown!! can somebody tell me how the are named now?
Post Reply