[Python-ogre-commit] SF.net SVN: python-ogre:[765] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-10-20 15:00:48
|
Revision: 765 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=765&view=rev Author: andy_miller Date: 2008-10-20 15:00:39 +0000 (Mon, 20 Oct 2008) Log Message: ----------- Further cleanup of demos and unittest tweaks Modified Paths: -------------- trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py trunk/python-ogre/demos/et/Demo_CEGUI_ET.py trunk/python-ogre/scripts/UnitTest.py Modified: trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py 2008-10-20 15:00:39 UTC (rev 765) @@ -67,7 +67,7 @@ ## that's all we'll need to do for this object. dynamic objects have a few more steps, so look ## at the code in the FrameListener for more. body.attachToNode( floornode ) - body.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + body.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(body) ## position camera Modified: trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py 2008-10-20 15:00:39 UTC (rev 765) @@ -88,7 +88,7 @@ floor3.setMaterialName( "Examples/DarkMaterial" ) floor3.setCastShadows( False ) floornode3.setPosition( Ogre.Vector3(-80.0, 0.0, 0.0) ) - floornode3.setOrientation( Ogre.Quaternion( Ogre.Degree(d=0.0), Ogre.Vector3.UNIT_Z ) ) + floornode3.setOrientation( Ogre.Quaternion( Ogre.Degree(d=0.0), Ogre.Vector3().UNIT_Z ) ) ##------------------------------------------------------------- ## using the new "SceneParser" TreeCollision primitive. this will automatically parse an entire tree of @@ -99,13 +99,13 @@ del stat_col bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-20.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-20.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append( bod ) ## make a simple rope. size = Ogre.Vector3(3,1.5,1.5) pos = Ogre.Vector3(0,3,0) - orient = Ogre.Quaternion.IDENTITY + orient = Ogre.Quaternion().IDENTITY ## loop through, making bodies and connecting them. parent = None Modified: trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py 2008-10-20 15:00:39 UTC (rev 765) @@ -54,13 +54,13 @@ belt = conveyorBelt() belt.init( "ConveyorBelt1", self.sceneManager, self.World, Ogre.Vector3(15,0.3,3), Ogre.Vector3(1,0,0), 2.0, - Ogre.Vector3(0,2,0), Ogre.Quaternion.IDENTITY, self.MatConveyor, BT_CONVEYOR ) + Ogre.Vector3(0,2,0), Ogre.Quaternion().IDENTITY, self.MatConveyor, BT_CONVEYOR ) self.Belts.append( belt ) belt = conveyorBelt() belt.init( "ConveyorBelt2", self.sceneManager, self.World, Ogre.Vector3(23,0.3,4), Ogre.Vector3(-1,0,0), 6.0, Ogre.Vector3(3,-1,0), - Ogre.Quaternion.IDENTITY, self.MatConveyor, BT_CONVEYOR ) + Ogre.Quaternion().IDENTITY, self.MatConveyor, BT_CONVEYOR ) self.Belts.append( belt ) ## floor object! @@ -77,7 +77,7 @@ ##floornode.setScale( siz ) bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append ( bod ) @@ -192,7 +192,7 @@ body.setMassMatrix( mass, inertia ) body.attachToNode( node ) body.setStandardForceCallback() - body.setPositionOrientation( Ogre.Vector3(-5,8,0), Ogre.Quaternion.IDENTITY ) + body.setPositionOrientation( Ogre.Vector3(-5,8,0), Ogre.Quaternion().IDENTITY ) self.bodies.append ( body ) self.timer = 1.5 Modified: trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py 2008-10-20 15:00:39 UTC (rev 765) @@ -91,13 +91,13 @@ ##floornode.setScale( siz ) bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(bod) ## make a simple rope. size=Ogre.Vector3 (3,1.0,1.0) pos=Ogre.Vector3 (0,1,0) - orient = Ogre.Quaternion.IDENTITY + orient = Ogre.Quaternion().IDENTITY ## loop through, making bodies and connecting them. parent = None @@ -306,7 +306,7 @@ self.dragBody.setAutoFreeze(1) self.dragBody = None - self.dragPoint = Ogre.Vector3.ZERO + self.dragPoint = Ogre.Vector3().ZERO self.dragDist = 0.0 self.dragging = False Modified: trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py 2008-10-20 15:00:39 UTC (rev 765) @@ -58,14 +58,14 @@ del col bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-2.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-2.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(bod) ## here's where we make the simple vehicle. everything is taken care of in the constuctor. self.Car = SimpleVehicle.SimpleVehicle( self.sceneManager, self.World, - Ogre.Vector3(0,-0.5,0), Ogre.Quaternion.IDENTITY ) + Ogre.Vector3(0,-0.5,0), Ogre.Quaternion().IDENTITY ) ## position camera self.msnCam = self.sceneManager.getRootSceneNode().createChildSceneNode() @@ -251,7 +251,7 @@ del self.Car self.Car = SimpleVehicle.SimpleVehicle( self.sceneManager, self.World, Ogre.Vector3(0,Ogre.Math.UnitRandom() * 10.0,0), - Ogre.Quaternion.IDENTITY ) + Ogre.Quaternion().IDENTITY ) if ( not self.Keyboard.isKeyDown( OIS.KC_R )): self.R = False Modified: trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py 2008-10-20 15:00:39 UTC (rev 765) @@ -99,13 +99,13 @@ ##floornode.setScale( siz ) bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(bod) ## make a simple rope. size=Ogre.Vector3 (3,1.0,1.0) pos=Ogre.Vector3 (0,1,0) - orient = Ogre.Quaternion.IDENTITY + orient = Ogre.Quaternion().IDENTITY ## loop through, making bodies and connecting them. parent = None @@ -336,7 +336,7 @@ self.dragBody.setAutoFreeze(1) self.dragBody = None - self.dragPoint = Ogre.Vector3.ZERO + self.dragPoint = Ogre.Vector3().ZERO self.dragDist = 0.0 self.dragging = False Modified: trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py 2008-10-20 15:00:39 UTC (rev 765) @@ -71,7 +71,7 @@ for z in range (-1, 2, 2): ## okay, let's create the tire itself. we'll use the OgreNewt.Vehicle.Tire class for this. most of the ## parameters are self-explanatory... try changing some of them to see what happens. - tireorient = Ogre.Quaternion(Ogre.Degree(0), Ogre.Vector3.UNIT_Y) + tireorient = Ogre.Quaternion(Ogre.Degree(0), Ogre.Vector3().UNIT_Y) tirepos = offset * Ogre.Vector3(x,0.5,z) pin= Ogre.Vector3(0,0,x) mass = 15.0 Modified: trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py =================================================================== --- trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py 2008-10-20 15:00:39 UTC (rev 765) @@ -120,7 +120,7 @@ v = rttTex.addViewport( rttCam ) v.setOverlaysEnabled(False) v.setClearEveryFrame( True ) - v.setBackgroundColour( ogre.ColourValue.Black ) + v.setBackgroundColour( ogre.ColourValue().Black ) ## Retrieve CEGUI texture for the RTT Modified: trunk/python-ogre/demos/et/Demo_CEGUI_ET.py =================================================================== --- trunk/python-ogre/demos/et/Demo_CEGUI_ET.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/et/Demo_CEGUI_ET.py 2008-10-20 15:00:39 UTC (rev 765) @@ -146,7 +146,7 @@ self.mMoveSpeed = 320.0 #self.mRotateSpeed = ogre.Degree(36)*0.008 self.mRotateSpeed = 8.0 - self.mDirection = ogre.Vector3.ZERO + self.mDirection = ogre.Vector3().ZERO ## Create RaySceneQuery self.mRaySceneQuery = self.mSceneMgr.createRayQuery( ogre.Ray() ) @@ -685,7 +685,7 @@ lightmap = ogre.Image() ET.createTerrainLightmap(terrainInfo, lightmap, 128, 128,\ ogre.Vector3(1, -1, 1),\ - ogre.ColourValue.White,\ + ogre.ColourValue().White,\ ogre.ColourValue(0.3, 0.3, 0.3,1.0)) lightmapTex.getBuffer(0, 0).blitFromMemory(lightmap.getPixelBox(0, 0)) Modified: trunk/python-ogre/scripts/UnitTest.py =================================================================== --- trunk/python-ogre/scripts/UnitTest.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/scripts/UnitTest.py 2008-10-20 15:00:39 UTC (rev 765) @@ -89,7 +89,7 @@ ret = [] p = os.path.abspath( os.path.join ( parent, base) ) for f in os.listdir ( p ): - if f.lower().startswith("demo_") and f.lower().endswith(".py") and not f in knownBad: + if f.lower().startswith("demo") and f.lower().endswith(".py") and not f in knownBad: if os.path.isfile ( os.path.join(p,f) ): file = open ( os.path.join(p,f) ) l = file.readline() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |