[Python-ogre-commit] SF.net SVN: python-ogre:[710] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-08-22 08:22:52
|
Revision: 710 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=710&view=rev Author: andy_miller Date: 2008-08-22 08:23:01 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Update to Ogre code based upon Py++ improvements bullet support for 2.70 Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/demos/bullet/test01.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-08-21 02:26:07 UTC (rev 709) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-08-22 08:23:01 UTC (rev 710) @@ -74,7 +74,7 @@ PATH_opensteer = os.path.join(BASE_DIR, 'opensteer', 'trunk') PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.69') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.70') PATH_PhysX= "c:/program files/NVIDIA Corporation/NVIDIA Physx SDK/v2.8.1/SDKs" PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(PATH_THIRDPARTY,'extra') Modified: trunk/python-ogre/code_generators/bullet/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/bullet/generate_code.py 2008-08-21 02:26:07 UTC (rev 709) +++ trunk/python-ogre/code_generators/bullet/generate_code.py 2008-08-22 08:23:01 UTC (rev 710) @@ -94,6 +94,7 @@ ,'::btAxisSweep3Internal<unsigned short>::processAllOverlappingPairs' ,'::btMultiSapBroadphase::createProxy' ,'::btMultiSapBroadphase::quicksort' + ,'::btBvhTriangleMeshShape::setOptimizedBvh' # new in 2.70 ] @@ -114,7 +115,7 @@ ,'btAlignedAllocator<btRaycastVehicle*, 16u>' ,'btAlignedAllocator<btBroadphaseInterface*, 16u>' - ,'btAlignedAllocator<btDbvt::Node const*, 16u>' + ,'btAlignedAllocator<btDbvtNode const*, 16u>' # ,'btAlignedObjectArray<short>' # ,'btAlignedAllocator<btDbvt::sStkNN, 16u>' # ,'btAlignedAllocator<btDbvt::sStkNP, 16u>' @@ -126,7 +127,8 @@ # ,'btAlignedAllocator<btOdeSolverBody, 16u>' ,'btAlignedAllocator<btOdeSolverBody*, 16u>' # ,'btAlignedAllocator<btOdeTypedJoint, 16u>' - ,'btAlignedAllocator<short, 16u>' + ,'btAlignedAllocator<unsigned int, 16u>' + ,'btAlignedAllocator<unsigned short, 16u>' # ,'btAlignedObjectArray<btDbvt::Node const*>' # ,'btAlignedObjectArray<btDbvt::sStkNN>' # ,'btAlignedObjectArray<btDbvt::sStkNP>' @@ -197,6 +199,12 @@ for a in c.arguments: if a.default_value and "&0.0" in a.default_value: a.default_value = "::btVector3( (0.0), (0.0), (0.0) )" + + ## Bug ingccxml where it doesn't get the namespace for default values + ## btCollisionWorld::addCollisionObject + f=main_ns.class_('btCollisionWorld').mem_fun('addCollisionObject') + f.arguments[1].default_value = 'btBroadphaseProxy::DefaultFilter' # (short int)(btBroadphaseProxy::DefaultFilter) + f.arguments[2].default_value = 'btBroadphaseProxy::AllFilter' # (short int)(btBroadphaseProxy::AllFilter) ############################################################ ## Modified: trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h =================================================================== --- trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h 2008-08-21 02:26:07 UTC (rev 709) +++ trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h 2008-08-22 08:23:01 UTC (rev 710) @@ -25,7 +25,7 @@ typedef btAlignedAllocator<btBroadphaseInterface*, 16> BroadphaseInterfacePtr16; // new changes -typedef btAlignedAllocator<btDbvt::Node const*, 16u> AlignedAllocatorDbvtNode; +typedef btAlignedAllocator<btDbvtNode const*, 16u> AlignedAllocatorDbvtNode; typedef btAlignedObjectArray<short> AlignedObjectArrayShort; typedef btAlignedAllocator<btDbvt::sStkNN, 16u> AlignedAllocatorsStkNN; typedef btAlignedAllocator<btDbvt::sStkNP, 16u> AlignedAllocatorsStkNP; @@ -38,7 +38,7 @@ typedef btAlignedAllocator<btOdeSolverBody*, 16u> AlignedAllocatorOdeSolverBodyPtr; typedef btAlignedAllocator<btOdeTypedJoint, 16u> AlignedAllocatorOdeTypedJoint; typedef btAlignedAllocator<short, 16u> AlignedAllocatorShort16; -typedef btAlignedObjectArray<btDbvt::Node const*> AlignedObjectArrayDbvtNode; +typedef btAlignedObjectArray<btDbvtNode const*> AlignedObjectArrayDbvtNode; typedef btAlignedObjectArray<btDbvt::sStkNN> AlignedObjectArrayDbvtsStkNN; typedef btAlignedObjectArray<btDbvt::sStkNP> AlignedObjectArrayDbvtsStkNP; typedef btAlignedObjectArray<btDbvt::sStkNPS> AlignedObjectArrayDbvtsStkNPS; Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-08-21 02:26:07 UTC (rev 709) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-08-22 08:23:01 UTC (rev 710) @@ -764,7 +764,11 @@ def Fix_NT ( mb ): """ fixup for NT systems """ - mb.global_ns.class_( 'vector<Ogre::Vector4, std::allocator<Ogre::Vector4> >' ).exclude( ) + try: + # change in py++ so this doesn't get found? + mb.global_ns.class_( 'vector<Ogre::Vector4, std::allocator<Ogre::Vector4> >' ).exclude( ) + except: + pass Skeleton = mb.namespace( MAIN_NAMESPACE ).class_( 'Skeleton' ).constructors().exclude() ## handle the hashmaps -- TODO FIX under LINUX ??? Modified: trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-08-21 02:26:07 UTC (rev 709) +++ trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-08-22 08:23:01 UTC (rev 710) @@ -887,7 +887,19 @@ Input: None\\n\\ Ouput: List containing particles" );""" ] - + +# ################################################################################################# +# WRAPPER_DEFINITION_Vector3 =\ +# """ +# int Vector3_len( Ogre::Vector3 & me ) { +# return 3; +# } +# """ +# WRAPPER_REGISTRATION_Vector3 = [ +# """def( "__len__", &Vector3_len, +# "Python-Ogre Helper Function: return length of Vector3");""", +# ] +# ################################################################################################# def iter_as_generator_vector( cls ): @@ -928,6 +940,10 @@ rt.add_declaration_code( WRAPPER_DEFINITION_RenderTarget ) apply_reg (rt, WRAPPER_REGISTRATION_RenderTarget ) +# rt = mb.class_( 'Vector3' ) +# rt.add_declaration_code( WRAPPER_DEFINITION_Vector3 ) +# apply_reg (rt, WRAPPER_REGISTRATION_Vector3 ) + rt = mb.class_( 'ResourceManager' ) rt.add_declaration_code( WRAPPER_DEFINITION_ResourceManager ) apply_reg (rt, WRAPPER_REGISTRATION_ResourceManager ) Modified: trunk/python-ogre/demos/bullet/test01.py =================================================================== --- trunk/python-ogre/demos/bullet/test01.py 2008-08-21 02:26:07 UTC (rev 709) +++ trunk/python-ogre/demos/bullet/test01.py 2008-08-22 08:23:01 UTC (rev 710) @@ -22,13 +22,18 @@ solver = bullet.btSequentialImpulseConstraintSolver() -world = bullet.btDiscreteDynamicsWorld(dispatcher, broadphase , solver) +world = bullet.btDiscreteDynamicsWorld(dispatcher, broadphase , solver, collisionConfiguration) world.getDispatchInfo().m_enableSPU = True world.setGravity(bullet.btVector3(0,-10,0)) print world +print dir(world) print solver print broadphase print dispatcher print collisionConfiguration - +for x in range (30): + world.stepSimulation( x * 1/30) + +world.stepSimulation(0) +world.stepSimulation(-0.333) Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-08-21 02:26:07 UTC (rev 709) +++ trunk/python-ogre/environment.py 2008-08-22 08:23:01 UTC (rev 710) @@ -1426,7 +1426,7 @@ class bullet: active = True pythonModule = True - version= "2.69" + version= "2.70" name='bullet' base = "bullet-" + version baseDir = os.path.join(os.getcwd(), base) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |