IrrPhysx 0.2 - Nvidia Physx 2.8.1 wrapper
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
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
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...
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...
-
- Posts: 168
- Joined: Sun Feb 04, 2007 3:30 pm
- Location: France
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.
-
- Posts: 168
- Joined: Sun Feb 04, 2007 3:30 pm
- Location: France
So that the header change.
And the linker problem.IPhysxObject.h wrote:
/**
\brief Returns the angular damping of the object
\return a f32
*/
virtual f32 getAngularDamping() = 0;
inline virtual NxActor* getActor();
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
-
- Posts: 368
- Joined: Tue Aug 21, 2007 1:43 am
- Location: The Middle of Nowhere
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
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
-
- Posts: 168
- Joined: Sun Feb 04, 2007 3:30 pm
- Location: France
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.
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.
Hey, I love your engine, but I've had a problem loading the Examples and my own fused with the Wrapper.
Any help with this problem would be of great help.
Thank You
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
Thank You