[Python-ogre-commit] SF.net SVN: python-ogre: [442] trunk/python-ogre/ThirdParty/nxogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2007-10-19 07:11:28
|
Revision: 442 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=442&view=rev Author: andy_miller Date: 2007-10-19 00:11:32 -0700 (Fri, 19 Oct 2007) Log Message: ----------- Start of making NxOgre work under Linux - # ifdefs to remove fluid functions and enums # casting for Memorybuffers to NxStream Modified Paths: -------------- trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp 2007-10-18 14:01:33 UTC (rev 441) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp 2007-10-19 07:11:32 UTC (rev 442) @@ -569,7 +569,7 @@ NxThrow_Error(s.str()); } - mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh(MemoryReadBuffer(buf.data)); + mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh((NxStream)MemoryReadBuffer(buf.data)); #else @@ -730,7 +730,7 @@ NxThrow_Error(s.str()); } - mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh(MemoryReadBuffer(buf.data)); + mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh((NxStream)MemoryReadBuffer(buf.data)); #else @@ -1383,5 +1383,5 @@ return toVector3(vertices[vertex]); } -} //End of NxOgre namespace. +} //End of NxOgre namespace. ////#endif Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp 2007-10-18 14:01:33 UTC (rev 441) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp 2007-10-19 07:11:32 UTC (rev 442) @@ -71,12 +71,15 @@ case FT_NxSphericalJointFlag: return AsNxSphericalJointFlag(); break; case FT_NxPulleyJointFlag: return AsNxPulleyJointFlag(); break; case FT_NxContactPairFlag: return AsNxContactPairFlag(); break; + +#ifndef NX_DISABLE_FLUIDS case FT_NxFluidSimulationMethod: return AsNxFluidSimulationMethod(); break; case FT_NxFluidCollisionMethod: return AsNxFluidCollisionMethod(); break; case FT_NxFluidFlag: return AsNxFluidFlag(); break; + case FT_NxFluidEmitterFlag: return AsNxFluidEmitterFlag(); break; +#endif case FT_NxEmitterType: return AsNxEmitterType(); break; case FT_NxEmitterShape: return AsNxEmitterShape(); break; - case FT_NxFluidEmitterFlag: return AsNxFluidEmitterFlag(); break; case FT_NxClothFlag: return AsNxClothFlag(); break; case FT_NxForceFieldCoordinates: return AsNxForceFieldCoordinates(); break; case FT_NxSceneFlags: return AsNxSceneFlags(); break; @@ -567,6 +570,10 @@ } + + +#ifndef NX_DISABLE_FLUIDS + //////////////////////////////////////////////////////////////////////////////////////////////// StringList EnumsBlueprint::AsNxFluidSimulationMethod() { @@ -632,44 +639,8 @@ return l; } - //////////////////////////////////////////////////////////////////////////////////////////////// -StringList EnumsBlueprint::AsNxEmitterType() { - - StringList l; - - if (mEnum & NX_AF_DISABLE_COLLISION) - l.insert(NxString("NX_AF_DISABLE_COLLISION")); - - if (mEnum & NX_FE_CONSTANT_PRESSURE) - l.insert(NxString("NX_FE_CONSTANT_PRESSURE")); - - if (mEnum & NX_FE_CONSTANT_FLOW_RATE) - l.insert(NxString("NX_FE_CONSTANT_FLOW_RATE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxEmitterShape() { - - StringList l; - - if (mEnum & NX_FE_RECTANGULAR) - l.insert(NxString("NX_FE_RECTANGULAR")); - - if (mEnum & NX_FE_ELLIPSE) - l.insert(NxString("NX_FE_ELLIPSE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - StringList EnumsBlueprint::AsNxFluidEmitterFlag() { StringList l; @@ -716,8 +687,47 @@ } +#endif // NX_DISABLE_FLUIDS + + //////////////////////////////////////////////////////////////////////////////////////////////// +StringList EnumsBlueprint::AsNxEmitterType() { + + StringList l; + + if (mEnum & NX_AF_DISABLE_COLLISION) + l.insert(NxString("NX_AF_DISABLE_COLLISION")); + + if (mEnum & NX_FE_CONSTANT_PRESSURE) + l.insert(NxString("NX_FE_CONSTANT_PRESSURE")); + + if (mEnum & NX_FE_CONSTANT_FLOW_RATE) + l.insert(NxString("NX_FE_CONSTANT_FLOW_RATE")); + + return l; + +} + +//////////////////////////////////////////////////////////////////////////////////////////////// + +StringList EnumsBlueprint::AsNxEmitterShape() { + + StringList l; + + if (mEnum & NX_FE_RECTANGULAR) + l.insert(NxString("NX_FE_RECTANGULAR")); + + if (mEnum & NX_FE_ELLIPSE) + l.insert(NxString("NX_FE_ELLIPSE")); + + return l; + +} + + +//////////////////////////////////////////////////////////////////////////////////////////////// + StringList EnumsBlueprint::AsNxClothFlag() { StringList l; @@ -1188,4 +1198,4 @@ //////////////////////////////////////////////////////////////////////////////////////////////// } //End of Serialiser namespace. -} //End of NxOgre namespace. +} //End of NxOgre namespace. Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h 2007-10-18 14:01:33 UTC (rev 441) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h 2007-10-19 07:11:32 UTC (rev 442) @@ -49,12 +49,16 @@ FT_NxSphericalJointFlag, FT_NxPulleyJointFlag, FT_NxContactPairFlag, + + #ifndef NX_DISABLE_FLUIDS FT_NxFluidSimulationMethod, FT_NxFluidCollisionMethod, FT_NxFluidFlag, + FT_NxFluidEmitterFlag, + #endif + FT_NxEmitterType, FT_NxEmitterShape, - FT_NxFluidEmitterFlag, FT_NxClothFlag, FT_NxForceFieldCoordinates, FT_NxSceneFlags, @@ -102,12 +106,16 @@ StringList AsNxSphericalJointFlag(); StringList AsNxPulleyJointFlag(); StringList AsNxContactPairFlag(); + + #ifndef NX_DISABLE_FLUIDS StringList AsNxFluidSimulationMethod(); StringList AsNxFluidCollisionMethod(); StringList AsNxFluidFlag(); + StringList AsNxFluidEmitterFlag(); + #endif + StringList AsNxEmitterType(); StringList AsNxEmitterShape(); - StringList AsNxFluidEmitterFlag(); StringList AsNxClothFlag(); StringList AsNxForceFieldCoordinates(); StringList AsNxSceneFlags(); Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp 2007-10-18 14:01:33 UTC (rev 441) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp 2007-10-19 07:11:32 UTC (rev 442) @@ -171,7 +171,7 @@ NxThrow_Error(s.str()); } - mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh(MemoryReadBuffer(buf.data)); + mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh((NxStream)MemoryReadBuffer(buf.data)); #else @@ -320,7 +320,7 @@ NxThrow_Error(s.str()); } - mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh(MemoryReadBuffer(buf.data)); + mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh((NxStream)MemoryReadBuffer(buf.data)); #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |