Am 30.05.2007, 14:12 Uhr, schrieb Marcus Lindblom <[EMAIL PROTECTED]>:
> Philipp Roßberger wrote: >> Hi, >> >> I try to integrate the recent release (2.7) of Ageia's PhysX engine into >> an OpenSG 1.8 project. So far I stumbled over several differences. I >> have >> the feeling, that my implementation is not really correct, as I >> experience >> "strange behaviour" of certain objects in the scene. >> >> It would be great if someone who already successfully integrated PhysX >> would share his knowledge with me and verify the following observations >> I >> have made so far during my project. >> >> >> 1) Coordinate system differences >> >> OpenSG and PhysX coordinate systems' use different axis orientations. >> While the coordinate system in OpenSG looks like this >> >> z >> ^ y >> | ^ >> | / >> -----> x >> >> >> the coordinate system in PhysX looks like this: >> >> y >> ^ z >> | ^ >> | / >> x <----- >> >> > Both are righthand system. Does this PhysX care about the "front" of an > object? (OpenSG does for the camera & lights, but little else, I think) > So far I didn't find anything in PhysX where an object front is defined. > In any case, it's not hard to transform back-and-forth between these, is > it? Not really. Here a short example, that shows how I use values computed by the PhysX engine to transform OpenSG objects: //PhysX part NxVec3 pointerPos = pointer->getGlobalPosition(); NxQuat pointerRot = pointer->getGlobalOrientationQuat(); //OpenSG part mPointer.setTranslate(-pointerPos.x, pointerPos.z, pointerPos.y); mPointer.setTransform(Vec3f(-pointerPos.x, pointerPos.z, pointerPos.y), Quaternion(Vec3f (-pointerRot.x, pointerRot.z, pointerRot.y), pointerRot.w)); >> 2) Object scaling >> >> Objects instantiated in PhysX with default scaling are twice the size as >> their OpenSG counterparts. Here an example: >> >> Box in OpenSG | Box in PhysX >> ----------------------------- >> 1,1,1 = 0.5,0.5,0.5 >> > Yup. Primitives in OpenSG are unit sized, they do not have unit-coords. > I don't know which is better actually. :) > PhysX parameters are set up by default assuming 1 unit = 1 meter. I am wondering what would be the best way to make sure, that scaling in OpenSG and PhysX is equal. I was thinking about experimenting with the raycast methods in OpenSG and PhysX. Any better ideas? By the way: is there a method in OpenSG that allows you to convert world coordinates into the local coordinate system of an OpenSG body? I need this to create joints between objects. The anchor points of certain joints in PhysX are defined in the local coordinate system of individual bodies. Thanks Philipp > /Marcus > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Opensg-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensg-users -- http://www.placemarks.net ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
