Revision: 443
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=443&view=rev
Author: andy_miller
Date: 2007-10-19 03:06:58 -0700 (Fri, 19 Oct 2007)
Log Message:
-----------
Linux fixes
Modified Paths:
--------------
trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp
Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp 2007-10-19 07:11:32 UTC (rev 442)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp 2007-10-19 10:06:58 UTC (rev 443)
@@ -567,10 +567,13 @@
s << "Cloth Mesh failed to cook";
NxThrow_Error(s.str());
- }
+ }
+
+ MemoryReadBuffer readbuffer (buf.data);
+ NxStream & streambuffer = dynamic_cast< NxStream & > (readbuffer);
+
+ mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh(streambuffer);
- mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh((NxStream)MemoryReadBuffer(buf.data));
-
#else
NxString filename;
@@ -729,8 +732,9 @@
NxThrow_Error(s.str());
}
-
- mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh((NxStream)MemoryReadBuffer(buf.data));
+ MemoryReadBuffer readbuffer (buf.data);
+ NxStream & streambuffer = dynamic_cast< NxStream & > (readbuffer);
+ mClothMesh = mOwner->getNxScene()->getPhysicsSDK().createClothMesh(streambuffer);
#else
Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp 2007-10-19 07:11:32 UTC (rev 442)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp 2007-10-19 10:06:58 UTC (rev 443)
@@ -698,13 +698,13 @@
if (mEnum & NX_AF_DISABLE_COLLISION)
l.insert(NxString("NX_AF_DISABLE_COLLISION"));
-
+#ifndef NX_DISABLE_FLUIDS
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"));
-
+#endif
return l;
}
@@ -714,13 +714,13 @@
StringList EnumsBlueprint::AsNxEmitterShape() {
StringList l;
-
+#ifndef NX_DISABLE_FLUIDS
if (mEnum & NX_FE_RECTANGULAR)
l.insert(NxString("NX_FE_RECTANGULAR"));
if (mEnum & NX_FE_ELLIPSE)
l.insert(NxString("NX_FE_ELLIPSE"));
-
+ #endif
return l;
}
Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp 2007-10-19 07:11:32 UTC (rev 442)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp 2007-10-19 10:06:58 UTC (rev 443)
@@ -170,8 +170,10 @@
NxThrow_Error(s.str());
}
-
- mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh((NxStream)MemoryReadBuffer(buf.data));
+ MemoryReadBuffer readbuffer (buf.data);
+ NxStream & streambuffer = dynamic_cast< NxStream & > (readbuffer);
+
+ mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh(streambuffer);
#else
@@ -319,8 +321,10 @@
NxThrow_Error(s.str());
}
+ MemoryReadBuffer readbuffer (buf.data);
+ NxStream & streambuffer = dynamic_cast< NxStream & > (readbuffer);
- mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh((NxStream)MemoryReadBuffer(buf.data));
+ mSoftBodyMesh = mOwner->getNxScene()->getPhysicsSDK().createSoftBodyMesh(streambuffer);
#else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|