IrrPhysx 0.2 - Nvidia Physx 2.8.1 wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Yeah, JP, you're very right, but still, i won't update, Windows now has over 2 years in my computer on an old HD (more than 5 years) and never has given me any troubles. If i installed anything over it, i fear that it could turn in disaster. Besides instead if updating XP, i'd move onto Vista, and to do that, better i build a new computer, and start from zero. I just don't want to touch anything which works well. Although it would be the best to update.

None the less. onto another matters. I got to compile IrrPhysx under DevCPP. Before the party begins, i must say it was to no avail, so i couldn't get anything functional. I can't point the source of the trouble though... It is probably that combining LINUX defines with WIN32 data has anthing to see with that, My fault, i know, but i just wanted to compile the wrapper, something i could do. I guess the rest is to figure what doesn work right, or what doesn't work at all.

I probably won't keep working on this, but if someone feels curiosity about the (Probably INMENSE) mistakes i've surelly commited to make the thing compile, just ask ^^U
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Steel Style, I've kept all of Physx's inner workings away from the user in IrrPhysx and so that means you don't have access to the Physx Actors.

If you want access then you would have to edit the IrrPhysx source yourself and then recompile it and use the new lib and headers. So i guess all you'd really need is to put a function getActor() in IPhysxObject (but note that not all sub classes of IPhysxObject can return an actor) and then you'd probably need the Physx includes in IrrPhysx.h and that may be all you'd require...
Image Image Image
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

Yeah I ever added "NxActor.h" as include header in IPhysxObject and it's was seeming to me that you already create and getActor() function although it wasn't in the header so I try to put it on the header as a "inline virtual getActor();" but when I wanna compile my project I have a linder error with the function.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

There's probably a function of that name in CPhysxActor.... Not sure why making the one you're adding virtual doesn't work... are they different function signatures? What's the linker error?
Image Image Image
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

So that the header change.
IPhysxObject.h wrote:
/**
\brief Returns the angular damping of the object
\return a f32
*/
virtual f32 getAngularDamping() = 0;

inline virtual NxActor* getActor();
And the linker problem.
Linker error wrote: Erreur 6 error LNK2001: symbole externe non résolu "public: virtual class NxActor * __thiscall IrrPhysx::IPhysxObject::getActor(void)" (?getActor@IPhysxObject@IrrPhysx@@UAEPAVNxActor@@XZ) IrrPhysx.lib
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

instead of modifying IPhysicsObject, why not cast it to CPhysicsObject and then access the actor?

Otherwise, you need to remove inline from both instances of getActor().
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I'm assuming you do actually implement the getActor() function somewhere? If not then how do you expect to get the actor from it?

I think Dark's suggestion of casting to CPhysxObject is actually a good idea, that way you're using the standard release of IrrPhysx so wouldn't have trouble if you wanted to update to a new version. Obviously you'd want to check that your IPhysxObject is actually a CPhysxObject before doing so though, if i remember correctly then the following object types are all CPhysxObjects:

EOT_BOX,
EOT_MULTISHAPE,
EOT_SPHERE,
EOT_CAPSULE,
EOT_PLANE,
EOT_HEIGHTFIELD
Image Image Image
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

Oh seems that I forgot to send the message, so like Dark_Kilauea said I cast the IPhysxObject by CPhysxObjects and now it's seems good. Also I have needed to create a IrrPhysx->createJoint() instead of getting Scene.
Now I will try using Rag dolls
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

That's cool man, if you get ragdolls working nicely then feel free to send me the code and i'll include it in the next release!
Image Image Image
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Post by Seven »

does anyone have code for loading a quake 3 map using IrrPhysx?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

It's in the raycast example... There's some optimisations which could be done for sure but it works as-is. Basically it just uses the render model as the physics mesh but clearly you don't need that kind of accuracy for the physics so a lot of the polys could be reduced down into simpler, lower-poly shapes to improve the performance. I guess you could do that by loading the Q3 map into a modeller (do any modellers other than things like radiant accept Q3 maps?) and then make a lower poly version enclosing it and then use that as the physics representation instead.
Image Image Image
GameDude
Posts: 500
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

Wow, nice project, I kinda overlooked this until now. I'll have to look more into it
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

After the whole debacle with Sio2's IrrPhysx 0.3 release I think what we'll do is treat that as a preview of 0.3, as he hasn't released the source to it, just binaries (as far as i can tell). So hopefully at some point i'll get the source off him and make sure it's nicely done in the style i'd set out for IrrPhysx and then maybe add in Steel Style's ragdoll stuff (if he gets on ok with it) and anything else that i get round to doing myself.
Image Image Image
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Post by Seven »

i gotta tell you, I love this wrapper :0
Last edited by Seven on Sat Jan 24, 2009 1:51 am, edited 1 time in total.
Studio7
Posts: 2
Joined: Thu Jan 15, 2009 6:59 am

Post by Studio7 »

Hey, I love your engine, but I've had a problem loading the Examples and my own fused with the Wrapper.

Code: Select all


1>fatal error C1900: Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'
1>LINK : fatal error LNK1257: code generation failed

Any help with this problem would be of great help.

Thank You
Post Reply