[Python-ogre-commit] SF.net SVN: python-ogre:[774] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2008-10-26 12:35:50
|
Revision: 774
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=774&view=rev
Author: andy_miller
Date: 2008-10-26 11:33:26 +0000 (Sun, 26 Oct 2008)
Log Message:
-----------
Change to Ogre Smart pointer detection to match change in pygccxml
Fix to expose Joystick events in OIS
Remove pathcing of pyplusplus in install as no longer needed
Small change to grass demo
Modified Paths:
--------------
trunk/python-ogre/code_generators/ogre/generate_code.py
trunk/python-ogre/code_generators/ois/generate_code.py
trunk/python-ogre/demos/ogre/Demo_Grass.py
trunk/python-ogre/environment.py
Modified: trunk/python-ogre/code_generators/ogre/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-24 02:56:40 UTC (rev 773)
+++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-26 11:33:26 UTC (rev 774)
@@ -74,38 +74,20 @@
for b in cls.bases:
r = b.related_class
if r.decl_string.startswith ( '::Ogre::SharedPtr<' ) :
-# print "ANDY Smart Class:", v, cls, r.decl_string
return True
else:
if cls.name.startswith ( 'SharedPtr<' ) or cls.name.endswith( 'SharedPtr' ):
-# print "Andy Smart 2", v, cls, cls.name
return True
return False
@staticmethod
def value_type( type ):
-# print "ANDY VALUE_TYPE", type
- if my_smart_ptr.is_smart_pointer( type ):
- return predefined_is_smart_ptr.value_type( type, False )
+ if my_smart_ptr.is_smart_pointer( type ):
+ return declarations.internal_type_traits.get_by_name( type, "element_type" )
pygccxml.declarations.smart_pointer_traits = my_smart_ptr
-# # # I defined new class - internal_type_traits, which provides access to
-# # # internal types.
-# # #
-# # # @staticmethod
-# # # def value_type( type ):
-# # # if my_smart_ptr.is_smart_pointer( type ):
-# # # return declarations.internal_type_traits.get_by_name(
-# # # type, "value_type" )
-# # #
-# # # The new class allows you to handle cases, where "value_type" has
-# # # different name. In case of auto_ptr it is "element_type".
-# # #
-# # # The new code is committed to SVN
-# # #
-
HACK = True
MAIN_NAMESPACE = 'Ogre'
Modified: trunk/python-ogre/code_generators/ois/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/ois/generate_code.py 2008-10-24 02:56:40 UTC (rev 773)
+++ trunk/python-ogre/code_generators/ois/generate_code.py 2008-10-26 11:33:26 UTC (rev 774)
@@ -59,7 +59,7 @@
main_ns = global_ns.namespace( MAIN_NAMESPACE )
else:
main_ns = global_ns
- main_ns.variable( "::OIS::JoyStickEvent::state" ).exclude()
+# main_ns.variable( "::OIS::JoyStickEvent::state" ).exclude()
############################################################
##
@@ -87,6 +87,8 @@
main_ns = global_ns
mb.class_( "Mouse" ).member_function( "getMouseState" ).call_policies =\
call_policies.return_value_policy( call_policies.reference_existing_object )
+ mb.class_( "JoyStick" ).member_function( "getJoyStickState" ).call_policies =\
+ call_policies.return_value_policy( call_policies.reference_existing_object )
############################################################
Modified: trunk/python-ogre/demos/ogre/Demo_Grass.py
===================================================================
--- trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-10-24 02:56:40 UTC (rev 773)
+++ trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-10-26 11:33:26 UTC (rev 774)
@@ -99,10 +99,10 @@
offset = ogre.Vector4(0,0,0,0)
for reg in mStaticGeom.getRegionIterator():
## a little randomness
- self.xpos += reg.getCentre().x * 0.001
- self.zpos += reg.getCentre().z * 0.001
- offset.x = math.sin(self.xpos) * 5
- offset.z = math.sin(self.zpos) * 5
+ self.xpos += reg.getCentre().x * 0.01
+ self.zpos += reg.getCentre().z * 0.01
+ offset.x = math.sin(self.xpos) * 1.5
+ offset.z = math.sin(self.zpos) * 1.5
for lod in reg.getLODIterator():
for mat in lod.getMaterialIterator():
for geom in mat.getGeometryIterator():
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2008-10-24 02:56:40 UTC (rev 773)
+++ trunk/python-ogre/environment.py 2008-10-26 11:33:26 UTC (rev 774)
@@ -285,18 +285,18 @@
[svn, " co -r 1383 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()]
]
else:
- source_version = "1441"
+ source_version = "1446"
source = [
- [svn, " co -r 1441 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()]
+ [svn, " co -r 1446 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()]
]
if isLinux() or isMac() :
buildCmds = [
- [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ],
+# # [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ],
[0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base) ],
]
if isWindows():
buildCmds = [
- [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ],
+# # [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ],
[0,"python setup.py install " , os.path.join (os.getcwd(), base) ],
]
@@ -311,9 +311,9 @@
[svn, " co -r 1383 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()]
]
else:
- source_version = "1441"
+ source_version = "1446"
source = [
- [svn, " co -r 1441 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()]
+ [svn, " co -r 1446 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()]
]
if isLinux() or isMac() :
buildCmds = [
@@ -1283,17 +1283,17 @@
if isWindows():
libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXLoader' ]
elif isLinux():
- libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ]
+ libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ]
source = [
[wget, "http://developer.download.nvidia.com/PhysX/2.8.1/PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz", downloadPath]
]
buildCmds = [
- [0, "tar zxf " + os.path.join(downloadPath, "PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz"), ''],
- [0, "sudo dpkg -i libphysx-common_2.8.1-4_i386.deb", ''],
- [0, "sudo dpkg -i libphysx-2.8.1_4_i386.deb", ''],
- [0, "sudo dpkg -i libphysx-dev-2.8.1_4_i386.deb", ''],
- [0, "sudo dpkg -i libphysx-extras-2.8.1_4_i386.deb", '']
+ [0, "tar zxf " + os.path.join(downloadPath, "PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz"), ''],
+ [0, "sudo dpkg -i libphysx-common_2.8.1-4_i386.deb", ''],
+ [0, "sudo dpkg -i libphysx-2.8.1_4_i386.deb", ''],
+ [0, "sudo dpkg -i libphysx-dev-2.8.1_4_i386.deb", ''],
+ [0, "sudo dpkg -i libphysx-extras-2.8.1_4_i386.deb", '']
]
ModuleName="PhysX"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|