[Python-ogre-commit] SF.net SVN: python-ogre:[695] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-08-18 08:33:02
|
Revision: 695 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=695&view=rev Author: andy_miller Date: 2008-08-18 08:33:08 +0000 (Mon, 18 Aug 2008) Log Message: ----------- Cleaned up some older files Added Particle universe patch Small updates to NxOgre demos -- more is required Modified Paths: -------------- trunk/python-ogre/demos/nxogre/CakeFramework.py trunk/python-ogre/demos/nxogre/Demo_101.py trunk/python-ogre/demos/nxogre/Lesson701.py trunk/python-ogre/demos/nxogre/resources.cfg Added Paths: ----------- trunk/python-ogre/demos/nxogre/media_old/ trunk/python-ogre/demos/nxogre/media_old/ComplexMeshes/ trunk/python-ogre/demos/nxogre/media_old/Env/ trunk/python-ogre/demos/nxogre/media_old/Essential/ trunk/python-ogre/demos/nxogre/media_old/SimpleMeshes/ trunk/python-ogre/demos/nxogre/media_old/resources.cfg trunk/python-ogre/patch/ParticleUniverse_0.8.patch Removed Paths: ------------- trunk/python-ogre/demos/nxogre/media/ trunk/python-ogre/demos/nxogre/media_old/ComplexMeshes/ trunk/python-ogre/demos/nxogre/media_old/Env/ trunk/python-ogre/demos/nxogre/media_old/Essential/ trunk/python-ogre/demos/nxogre/media_old/SimpleMeshes/ trunk/python-ogre/demos/nxogre/media_old/resources.cfg trunk/python-ogre/demos/ogre/plugins.cfg trunk/python-ogre/patch/ogre_svn.patch trunk/python-ogre/scripts_V2/ trunk/python-ogre/setup_dist.py Modified: trunk/python-ogre/demos/nxogre/CakeFramework.py =================================================================== --- trunk/python-ogre/demos/nxogre/CakeFramework.py 2008-08-18 04:12:37 UTC (rev 694) +++ trunk/python-ogre/demos/nxogre/CakeFramework.py 2008-08-18 08:33:08 UTC (rev 695) @@ -21,7 +21,7 @@ import ogre.gui.betagui as BetaGUI import ogre.io.OIS as OIS import ogre.physics.PhysX as PhysX -import ogre.physics.NxOgre_09 as nxogre +import ogre.physics.NxOgre as nxogre from Enums import * @@ -489,11 +489,11 @@ ##/ Grid ##self.SceneMgr.getRootSceneNode().attachObject(self.SceneMgr.createEntity("nx.floor","nx.floor.mesh")) - self.StaticGeom= self.SceneMgr.createStaticGeometry("Grid") - self.StaticGeom.addEntity(self.SceneMgr.createEntity("nx.floor", "nx.floor.mesh"), ogre.Vector3(0,-0.05,0)) - self.StaticGeom.addEntity(self.SceneMgr.createEntity("nx.axis", "nx.body.axis.mesh"), ogre.Vector3(0,0.01,0)) - self.StaticGeom.build() - self.StaticGeom.setCastShadows(False) +# self.StaticGeom= self.SceneMgr.createStaticGeometry("Grid") +# self.StaticGeom.addEntity(self.SceneMgr.createEntity("nx.floor", "nx.floor.mesh"), ogre.Vector3(0,-0.05,0)) +# self.StaticGeom.addEntity(self.SceneMgr.createEntity("nx.axis", "nx.body.axis.mesh"), ogre.Vector3(0,0.01,0)) +# self.StaticGeom.build() +# self.StaticGeom.setCastShadows(False) ## Light mSunLight = self.SceneMgr.createLight("SunLight") Modified: trunk/python-ogre/demos/nxogre/Demo_101.py =================================================================== --- trunk/python-ogre/demos/nxogre/Demo_101.py 2008-08-18 04:12:37 UTC (rev 694) +++ trunk/python-ogre/demos/nxogre/Demo_101.py 2008-08-18 08:33:08 UTC (rev 695) @@ -7,7 +7,7 @@ import ogre.renderer.OGRE as ogre import ogre.physics.PhysX as physx -import ogre.physics.NxOgre_09 as nxogre +import ogre.physics.NxOgre as nxogre import CakeFramework as cf class NxTutorial ( cf.Cake ): @@ -17,9 +17,10 @@ ##//////////////////////////////////////////////////////////////////////////////////////////////// def start(self ): - self.World = nxogre.World("Log: html") + self.World = nxogre.World(nxogre.PhysXParams("Log: html")) - self.Scene = self.World.createScene("Main", self.SceneMgr,"gravity: yes, floor: yes") + self.Scene = self.World.createScene("Main", nxogre.SceneParams("renderer: ogre, controller: accumulator, gravity: yes, floor: yes")) + ### self.SceneMgr,"gravity: yes, floor: yes") self.Scene.createBody('sphere.50cm.mesh',nxogre.SphereShape(0.5), ogre.Vector3(3,1.5,0), "mass: 10" ) @@ -71,4 +72,3 @@ except ogre.OgreException, e: print e - Modified: trunk/python-ogre/demos/nxogre/Lesson701.py =================================================================== --- trunk/python-ogre/demos/nxogre/Lesson701.py 2008-08-18 04:12:37 UTC (rev 694) +++ trunk/python-ogre/demos/nxogre/Lesson701.py 2008-08-18 08:33:08 UTC (rev 695) @@ -1,8 +1,8 @@ ## =============================================================================== -## AGEIA PHYSX SDK TRAINING PROGRAMS -## LESSON 701: WHEEL SHAPES +## AGEIA PHYSX SDK TRAINING PROGRAMS +## LESSON 701: WHEEL SHAPES ## -## Written by Bob Schade, 5-1-06 +## Written by Bob Schade, 5-1-06 ## =============================================================================== @@ -60,29 +60,13 @@ ##//////////////////////////////////////////////////////////////////////////////////////////////// -if __name__ == '__main__': - import exceptions,sys - try: - application = NxTutorial () - application.pre() - application.start() - application.WorldInstance = application.getWorld() - application.startRendering(application) - application.stop() - application.post() +def PrintControls(): - except ogre.OgreException, e: - print e + print("\n Flight Controls:\n ----------------\n w = forward, s = back\n a = strafe left, d = strafe right\n q = up, z = down\n") + print("\n Force Controls:\n ---------------\n i = +z, k = -z\n j = +x, l = -x\n u = +y, m = -y\n") + print("\n Miscellaneous:\n --------------\n p = Pause\n r = Select Next Actor\n f = Toggle Force Mode\n b = Toggle Debug Wireframe Mode\n x = Toggle Shadows\n t = Move Focus Actor to (0,5,0)\n") - -# # # def PrintControls(): -# # # -# # # print("\n Flight Controls:\n ----------------\n w = forward, s = back\n a = strafe left, d = strafe right\n q = up, z = down\n") -# # # print("\n Force Controls:\n ---------------\n i = +z, k = -z\n j = +x, l = -x\n u = +y, m = -y\n") -# # # print("\n Miscellaneous:\n --------------\n p = Pause\n r = Select Next Actor\n f = Toggle Force Mode\n b = Toggle Debug Wireframe Mode\n x = Toggle Shadows\n t = Move Focus Actor to (0,5,0)\n") -# # # -# # # # # # def RenderActors(bool shadows) # # # # # # ## Render all the actors in the scene @@ -91,12 +75,12 @@ # # # while (nbActors--) # # # # # # NxActor* actor = *actors++ -# # # DrawActor(actor, self.SelectedActor, False) +# # # DrawActor(actor, self.SelectedActor, False) # # # # # # ## Handle shadows # # # if (shadows): # # # -# # # DrawActorShadow(actor, False) +# # # DrawActorShadow(actor, False) # # # @@ -107,226 +91,229 @@ actors = self.Scene.getActors() while nbActors > 0: nbActors -= 1 - nbShapes = actors[nbActors].getNbShapes() - shapes = actors[nbActors].getShapes() - while nbShapes > 0: - nbShapes -= 1 + nbShapes = actors[nbActors].getNbShapes() + shapes = actors[nbActors].getShapes() + while nbShapes > 0: + nbShapes -= 1 - shape = shapes[nbShapes] - if (shape.getType() == nxogre.NX_SHAPE_WHEEL): + shape = shapes[nbShapes] + if (shape.getType() == nxogre.NX_SHAPE_WHEEL): -# NxWheelShape* ws = (NxWheelShape*)shape -# ShapeUserData* sud = (ShapeUserData*)(shape.userData) - ws = shape - sud = shape.userData - if sud: - ## Need to save away roll angle in wheel shape user data - rollAngle = sud.wheelShapeRollAngle -## rollAngle += ws.getAxleSpeed() * 1.0/60.0f - rollAngle += ws.getAxleSpeed() * gDeltaTime - while (rollAngle > nxogre.NxTwoPi) ##normally just 1x - rollAngle -= nxogre.NxTwoPi - while (rollAngle < -nxogre.NxTwoPi) ##normally just 1x - rollAngle += nxogre.NxTwoPi +# NxWheelShape* ws = (NxWheelShape*)shape +# ShapeUserData* sud = (ShapeUserData*)(shape.userData) + ws = shape + sud = shape.userData + if sud: + ## Need to save away roll angle in wheel shape user data + rollAngle = sud.wheelShapeRollAngle +## rollAngle += ws.getAxleSpeed() * 1.0/60.0f + rollAngle += ws.getAxleSpeed() * gDeltaTime + while (rollAngle > nxogre.NxTwoPi): ##normally just 1x + rollAngle -= nxogre.NxTwoPi + while (rollAngle < -nxogre.NxTwoPi): ##normally just 1x + rollAngle += nxogre.NxTwoPi - ## We have the roll angle for the wheel now - sud.wheelShapeRollAngle = rollAngle + ## We have the roll angle for the wheel now + sud.wheelShapeRollAngle = rollAngle - pose = ws.getGlobalPose() + pose = ws.getGlobalPose() - wcd = nxogre.NxWheelContactData () - s = ws.getContact(wcd) + wcd = nxogre.NxWheelContactData () + s = ws.getContact(wcd) - r = ws.getRadius() - st = ws.getSuspensionTravel() - steerAngle = ws.getSteerAngle() + r = ws.getRadius() + st = ws.getSuspensionTravel() + steerAngle = ws.getSteerAngle() -## NxWheelShapeDesc state -## ws.saveToDesc(state) +## NxWheelShapeDesc state +## ws.saveToDesc(state) - dir_ = NxVec3 () -# # /* -# # getWorldSegmentFast(seg) -# # seg.computeDirection(dir) -# # dir.normalize() -# # */ - p0 = pose.t ##cast from shape origin - pose.M.getColumn(1, dir_) - dir_ = -dir_ ##cast along -Y. - castLength = r + st ##cast ray self long + dir_ = NxVec3 () +# # /* +# # getWorldSegmentFast(seg) +# # seg.computeDirection(dir) +# # dir.normalize() +# # */ + p0 = pose.t ##cast from shape origin + pose.M.getColumn(1, dir_) + dir_ = -dir_ ##cast along -Y. + castLength = r + st ##cast ray self long -## renderer.addArrow(p0, dir, castLength, 1.0) - - ##have ground contact? - ## This code is from WheelShape.cpp in SDKs/core/common/src - ## if (contactPosition != nxogre.NX_MAX_REAL) : - if s and (wcd.contactForce > -1000) : +## renderer.addArrow(p0, dir, castLength, 1.0) + + ##have ground contact? + ## This code is from WheelShape.cpp in SDKs/core/common/src + ## if (contactPosition != nxogre.NX_MAX_REAL) : + if s and (wcd.contactForce > -1000) : -## pose.t = p0 + dir * wcd.contactPoint -## pose.t -= dir * state.radius //go from contact pos to center pos. - pose.t = wcd.contactPoint - pose.t -= dir_ * r ##go from contact pos to center pos. +## pose.t = p0 + dir * wcd.contactPoint +## pose.t -= dir * state.radius //go from contact pos to center pos. + pose.t = wcd.contactPoint + pose.t -= dir_ * r ##go from contact pos to center pos. - rot = nxogre.NxMat33() - axisRot = nxogre.NxMat33 () - rot.rotY(steerAngle) - axisRot.rotY(0) + rot = nxogre.NxMat33() + axisRot = nxogre.NxMat33 () + rot.rotY(steerAngle) + axisRot.rotY(0) -## NxReal rollAngle = ((ShapeUserData*)(wheel.userData)).rollAngle +## NxReal rollAngle = ((ShapeUserData*)(wheel.userData)).rollAngle - rollRot = nxogre.NxMat33 () - rollRot.rotX(rollAngle) + rollRot = nxogre.NxMat33 () + rollRot.rotX(rollAngle) - pose.M = rot * pose.M * axisRot * rollRot + pose.M = rot * pose.M * axisRot * rollRot - sud.wheelShapePose = pose + sud.wheelShapePose = pose - else: + else: - pose.t = p0 + dir * st - sud.wheelShapePose = pose + pose.t = p0 + dir * st + sud.wheelShapePose = pose def AddWheelToActor(self, actor, wheelDesc): - wheelShapeDesc = nxogre.NxWheelShapeDesc () + wheelShapeDesc = nxogre.NxWheelShapeDesc () - ## Create a shared car wheel material to be used by all wheels - if (!self.wsm): + ## Create a shared car wheel material to be used by all wheels + if not self.wsm: - m = nxogre.NxMaterialDesc () - m.flags |= nxogre.NX_MF_DISABLE_FRICTION - self.wsm = self.Scene.createMaterial(m) + m = nxogre.NxMaterialDesc () + m.flags |= nxogre.NX_MF_DISABLE_FRICTION + self.wsm = self.Scene.createMaterial(m) - wheelShapeDesc.materialIndex = self.wsm.getMaterialIndex() + wheelShapeDesc.materialIndex = self.wsm.getMaterialIndex() - wheelShapeDesc.localPose.t = wheelDesc.position - q = nxogre.NxQuat () - q.fromAngleAxis(90, nxogre.NxVec3(0,1,0)) - wheelShapeDesc.localPose.M.fromQuat(q) + wheelShapeDesc.localPose.t = wheelDesc.position + q = nxogre.NxQuat () + q.fromAngleAxis(90, nxogre.NxVec3(0,1,0)) + wheelShapeDesc.localPose.M.fromQuat(q) - heightModifier = (wheelDesc.wheelSuspension + wheelDesc.wheelRadius) / wheelDesc.wheelSuspension + heightModifier = (wheelDesc.wheelSuspension + wheelDesc.wheelRadius) / wheelDesc.wheelSuspension - wheelShapeDesc.suspension.spring = wheelDesc.springRestitution*heightModifier - wheelShapeDesc.suspension.damper = 0 ##wheelDesc.springDamping*heightModifier; - wheelShapeDesc.suspension.targetValue = wheelDesc.springBias*heightModifier + wheelShapeDesc.suspension.spring = wheelDesc.springRestitution*heightModifier + wheelShapeDesc.suspension.damper = 0 ##wheelDesc.springDamping*heightModifier; + wheelShapeDesc.suspension.targetValue = wheelDesc.springBias*heightModifier - wheelShapeDesc.radius = wheelDesc.wheelRadius - wheelShapeDesc.suspensionTravel = wheelDesc.wheelSuspension - wheelShapeDesc.inverseWheelMass = 0.1 ##not given!? TODO + wheelShapeDesc.radius = wheelDesc.wheelRadius + wheelShapeDesc.suspensionTravel = wheelDesc.wheelSuspension + wheelShapeDesc.inverseWheelMass = 0.1 ##not given!? TODO - ## wheelShapeDesc.lateralTireForceFunction = //TODO - ## wheelShapeDesc.longitudalTireForceFunction = //TODO + ## wheelShapeDesc.lateralTireForceFunction = //TODO + ## wheelShapeDesc.longitudalTireForceFunction = //TODO # # NxWheelShape* wheelShape -# # wheelShape = static_cast<NxWheelShape *>(actor.createShape(wheelShapeDesc)) +# # wheelShape = static_cast<NxWheelShape *>(actor.createShape(wheelShapeDesc)) def CreateCab( self, pos): """ create the cab from a box """ - actor = self.CreateBox(pos + nxogre.NxVec3(0,1,0), nxogre.NxVec3(1,0.5,0.5), 10) - actor.raiseBodyFlag(nxogre.NX_BF_FROZEN_ROT_X) - actor.raiseBodyFlag(nxogre.NX_BF_FROZEN_ROT_Z) - actor.setAngularDamping(0.5) + actor = self.CreateBox(pos + nxogre.NxVec3(0,1,0), nxogre.NxVec3(1,0.5,0.5), 10) + actor.raiseBodyFlag(nxogre.NX_BF_FROZEN_ROT_X) + actor.raiseBodyFlag(nxogre.NX_BF_FROZEN_ROT_Z) + actor.setAngularDamping(0.5) - wheelDesc =nxogre.NxWheelDesc - ##wheelDesc.wheelAxis.set(0,0,1) - ##wheelDesc.downAxis.set(0,-1,0) + wheelDesc =nxogre.NxWheelDesc + ##wheelDesc.wheelAxis.set(0,0,1) + ##wheelDesc.downAxis.set(0,-1,0) wheelDesc.wheelApproximation = 10 - wheelDesc.wheelRadius = 0.5 - wheelDesc.wheelWidth = 0.1 - wheelDesc.wheelSuspension = 0.2 - wheelDesc.springRestitution = 7000 - wheelDesc.springDamping = 800 - wheelDesc.springBias = 0 - wheelDesc.maxBrakeForce = 1 - wheelDesc.frictionToFront = 0.1 - wheelDesc.frictionToSide = 0.99 - wheelDesc.position = nxogre.NxVec3(0,-0.4,0) - wheelDesc.wheelFlags = nxogre.NX_WF_USE_WHEELSHAPE | nxogre.NX_WF_BUILD_LOWER_HALF | nxogre.NX_WF_ACCELERATED | - nxogre.NX_WF_AFFECTED_BY_HANDBRAKE | nxogre.NX_WF_STEERABLE_INPUT | nxogre.NX_WF_BUILD_LOWER_HALF + wheelDesc.wheelRadius = 0.5 + wheelDesc.wheelWidth = 0.1 + wheelDesc.wheelSuspension = 0.2 + wheelDesc.springRestitution = 7000 + wheelDesc.springDamping = 800 + wheelDesc.springBias = 0 + wheelDesc.maxBrakeForce = 1 + wheelDesc.frictionToFront = 0.1 + wheelDesc.frictionToSide = 0.99 + wheelDesc.position = nxogre.NxVec3(0,-0.4,0) + wheelDesc.wheelFlags = nxogre.NX_WF_USE_WHEELSHAPE | nxogre.NX_WF_BUILD_LOWER_HALF | nxogre.NX_WF_ACCELERATED |\ + nxogre.NX_WF_AFFECTED_BY_HANDBRAKE | nxogre.NX_WF_STEERABLE_INPUT | nxogre.NX_WF_BUILD_LOWER_HALF self.AddWheelToActor(actor, wheelDesc) - return actor + return actor -def InitNx() +def InitNx(): - ## Create a memory allocator - gAllocator = new UserAllocator + ## Create a memory allocator + gAllocator = nxogre.UserAllocator () ## Create the physics SDK self.gPhysicsSDK = NxCreatePhysicsSDK(nxogre.NX_PHYSICS_SDK_VERSION, gAllocator) - if (!self.gPhysicsSDK) return : + if not self.gPhysicsSDK : return - ## Set the physics parameters - self.gPhysicsSDK.setParameter(nxogre.NX_SKIN_WIDTH, 0.05) + ## Set the physics parameters + self.gPhysicsSDK.setParameter(nxogre.NX_SKIN_WIDTH, 0.05) - ## Set the debug visualization parameters - self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZATION_SCALE, 1) - self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_ACTOR_AXES, 1) - self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_COLLISION_SHAPES, 1) + ## Set the debug visualization parameters + self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZATION_SCALE, 1) + self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_ACTOR_AXES, 1) + self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_COLLISION_SHAPES, 1) - self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_CONTACT_POINT, 1) - self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_CONTACT_NORMAL, 1) + self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_CONTACT_POINT, 1) + self.gPhysicsSDK.setParameter(nxogre.NX_VISUALIZE_CONTACT_NORMAL, 1) ## Create the scene sceneDesc = nxogre.NxSceneDesc () sceneDesc.gravity = gDefaultGravity - sceneDesc.simType = nxogre.NX_SIMULATION_HW - self.Scene = self.gPhysicsSDK.createScene(sceneDesc) - if(!self.Scene){ : - sceneDesc.simType = nxogre.NX_SIMULATION_SW - self.Scene = self.gPhysicsSDK.createScene(sceneDesc) - if(!self.Scene) return : + sceneDesc.simType = nxogre.NX_SIMULATION_HW + self.Scene = self.gPhysicsSDK.createScene(sceneDesc) + if not self.Scene: + sceneDesc.simType = nxogre.NX_SIMULATION_SW + self.Scene = self.gPhysicsSDK.createScene(sceneDesc) + if not self.Scene :return - ## Create the default material - NxMaterial* defaultMaterial = self.Scene.getMaterialFromIndex(0) - defaultMaterial.setRestitution(0.5) - defaultMaterial.setStaticFriction(0.5) - defaultMaterial.setDynamicFriction(0.5) + ## Create the default material + defaultMaterial = self.Scene.getMaterialFromIndex(0) + defaultMaterial.setRestitution(0.5) + defaultMaterial.setStaticFriction(0.5) + defaultMaterial.setDynamicFriction(0.5) - ## Create the objects in the scene - groundPlane = CreateGroundPlane() + ## Create the objects in the scene + groundPlane = CreateGroundPlane() - self.box = CreateBox(NxVec3(5,0,0), NxVec3(0.5,1,0.5), 20) - self.sphere = CreateSphere(NxVec3(0,0,5), 1, 10) - self.capsule = CreateCapsule(NxVec3(-5,0,0), 2, 0.5, 10) + self.box = CreateBox(NxVec3(5,0,0), NxVec3(0.5,1,0.5), 20) + self.sphere = CreateSphere(NxVec3(0,0,5), 1, 10) + self.capsule = CreateCapsule(NxVec3(-5,0,0), 2, 0.5, 10) - ## Reset wheel material - self.wsm = None + ## Reset wheel material + self.wsm = None - self.cab = CreateCab(NxVec3(0,0,0)) + self.cab = CreateCab(NxVec3(0,0,0)) - self.SelectedActor = cab - self.gForceStrength = 35000 + self.SelectedActor = cab + self.gForceStrength = 35000 - ## Turn on all contact notifications - self.Scene.setActorGroupPairFlags(0, 0, NX_NOTIFY_ON_TOUCH) + ## Turn on all contact notifications + self.Scene.setActorGroupPairFlags(0, 0, NX_NOTIFY_ON_TOUCH) AddUserDataToActors(self.Scene) - ## Initialize HUD - InitializeHUD() + ## Initialize HUD + InitializeHUD() - ## Get the current time - UpdateTime() + ## Get the current time + UpdateTime() - ## Start the first frame of the simulation - if (self.Scene) StartPhysics() : + ## Start the first frame of the simulation + if self.Scene :StartPhysics() -int main(int argc, char** argv) +if __name__ == '__main__': + import exceptions,sys + try: + PrintControls() + InitGlut(argc, argv, "Lesson 701: Wheel Shapes") + InitNx() + glutMainLoop() + ReleaseNx() - PrintControls() - InitGlut(argc, argv, "Lesson 701: Wheel Shapes") - InitNx() - glutMainLoop() - ReleaseNx() - return 0 + except ogre.OgreException, e: + print e Deleted: trunk/python-ogre/demos/nxogre/media_old/resources.cfg =================================================================== --- trunk/python-ogre/demos/nxogre/media/resources.cfg 2008-08-17 13:10:15 UTC (rev 691) +++ trunk/python-ogre/demos/nxogre/media_old/resources.cfg 2008-08-18 08:33:08 UTC (rev 695) @@ -1,15 +0,0 @@ -# Resource locations to be added to the 'boostrap' path -# This also contains the minimum you need to use the Ogre example framework -[Bootstrap] -FileSystem=Media/Essential/Boot/ - -# Resource locations to be added to the default path -[General] -FileSystem=Media/ -FileSystem=Media/Essential/ -FileSystem=Media/Essential/BetaGUI/ -FileSystem=Media/Essential/BetaGUIExtended/ -FileSystem=Media/Essential/Fonts/ -FileSystem=Media/SimpleMeshes/ -FileSystem=Media/ComplexMeshes/ -FileSystem=Media/Env/ \ No newline at end of file Copied: trunk/python-ogre/demos/nxogre/media_old/resources.cfg (from rev 694, trunk/python-ogre/demos/nxogre/media/resources.cfg) =================================================================== --- trunk/python-ogre/demos/nxogre/media_old/resources.cfg (rev 0) +++ trunk/python-ogre/demos/nxogre/media_old/resources.cfg 2008-08-18 08:33:08 UTC (rev 695) @@ -0,0 +1,15 @@ +# Resource locations to be added to the 'boostrap' path +# This also contains the minimum you need to use the Ogre example framework +[Bootstrap] +FileSystem=Media/Essential/Boot/ + +# Resource locations to be added to the default path +[General] +FileSystem=Media/ +FileSystem=Media/Essential/ +FileSystem=Media/Essential/BetaGUI/ +FileSystem=Media/Essential/BetaGUIExtended/ +FileSystem=Media/Essential/Fonts/ +FileSystem=Media/SimpleMeshes/ +FileSystem=Media/ComplexMeshes/ +FileSystem=Media/Env/ \ No newline at end of file Modified: trunk/python-ogre/demos/nxogre/resources.cfg =================================================================== --- trunk/python-ogre/demos/nxogre/resources.cfg 2008-08-18 04:12:37 UTC (rev 694) +++ trunk/python-ogre/demos/nxogre/resources.cfg 2008-08-18 08:33:08 UTC (rev 695) @@ -1,15 +1,23 @@ # Resource locations to be added to the 'boostrap' path # This also contains the minimum you need to use the Ogre example framework [Bootstrap] -FileSystem=./media/Essential/Boot/ +#FileSystem=./media/Essential/Boot/ +Zip=../media/packs/OgreCore.zip +Zip=./media_new/cake.zip # Resource locations to be added to the default path [General] -FileSystem=./media/ -FileSystem=./media/Essential/ -FileSystem=./media/Essential/BetaGUI/ -FileSystem=./media/Essential/BetaGUIExtended/ -FileSystem=./media/Essential/Fonts/ -FileSystem=./media/SimpleMeshes/ -FileSystem=./media/ComplexMeshes/ -FileSystem=./media/Env/ \ No newline at end of file +FileSystem=./media_old/ +FileSystem=./media_old/Essential/ +FileSystem=./media_old/Essential/BetaGUI/ +FileSystem=./media_old/Essential/BetaGUIExtended/ +FileSystem=./media_old/Essential/Fonts/ +#FileSystem=./media_old/SimpleMeshes/ +#F#ileSystem=./media_old/ComplexMeshes/ +#F#ileSystem=./media_old/Env/ + +FileSystem=./media_new/gui +FileSystem=./media_new/images +FileSystem=./media_new/materials +FileSystem=./media_new/meshes +FileSystem=./media_new/programs Deleted: trunk/python-ogre/demos/ogre/plugins.cfg =================================================================== --- trunk/python-ogre/demos/ogre/plugins.cfg 2008-08-18 04:12:37 UTC (rev 694) +++ trunk/python-ogre/demos/ogre/plugins.cfg 2008-08-18 08:33:08 UTC (rev 695) @@ -1,15 +0,0 @@ -# Defines plugins to load -# Defines plugins to load - -# Define plugin folder -# CHANGE THIS TO YOUR PATH -PluginFolder=/home/andy/development/root/usr/lib/OGRE - -# Define D3D rendering implementation plugin -Plugin=RenderSystem_GL.so -Plugin=Plugin_ParticleFX.so -Plugin=Plugin_BSPSceneManager.so -Plugin=Plugin_OctreeSceneManager.so -Plugin=Plugin_CgProgramManager.so - - Added: trunk/python-ogre/patch/ParticleUniverse_0.8.patch =================================================================== --- trunk/python-ogre/patch/ParticleUniverse_0.8.patch (rev 0) +++ trunk/python-ogre/patch/ParticleUniverse_0.8.patch 2008-08-18 08:33:08 UTC (rev 695) @@ -0,0 +1,167 @@ +Only in \development\Particle Universe V0.8\Plugins\ParticleUniverse\Docs: desktop.ini +Only in \development\Particle Universe V0.8\Plugins\ParticleUniverse\Docs\html: class_particle_universe_1_1_align_affector_tokens_1_1_resize_token-members.html +Only in \development\Particle Universe V0.8\Plugins\ParticleUniverse\Docs\manual\files\images: Thumbs.db +Only in \development\Particle Universe V0.8\Plugins\ParticleUniverse\Docs: Thumbs.db +diff -r -U 3 .\include\ParticleUniverseHook.h \development\Particle Universe V0.8\Plugins\ParticleUniverse\include\ParticleUniverseHook.h +--- .\include\ParticleUniverseHook.h Mon Aug 18 14:57:32 2008 ++++ \development\Particle Universe V0.8\Plugins\ParticleUniverse\include\ParticleUniverseHook.h Fri Jun 13 09:31:50 2008 +@@ -36,8 +36,8 @@ + if (list->empty()) + return; + +- typename std::vector<T*>::iterator it; +- typename std::vector<T*>::iterator itEnd = list->end(); ++ std::vector<T*>::iterator it; ++ std::vector<T*>::iterator itEnd = list->end(); + for (it = list->begin(); it != itEnd; ++it) + { + (*it)->_prepare(technique); +@@ -51,8 +51,8 @@ + if (list->empty()) + return; + +- typename std::vector<T*>::iterator it; +- typename std::vector<T*>::iterator itEnd = list->end(); ++ std::vector<T*>::iterator it; ++ std::vector<T*>::iterator itEnd = list->end(); + for (it = list->begin(); it != itEnd; ++it) + { + (*it)->_notifyStart(); +@@ -66,8 +66,8 @@ + if (list->empty()) + return; + +- typename std::vector<T*>::iterator it; +- typename std::vector<T*>::iterator itEnd = list->end(); ++ std::vector<T*>::iterator it; ++ std::vector<T*>::iterator itEnd = list->end(); + for (it = list->begin(); it != itEnd; ++it) + { + (*it)->_notifyStop(); +@@ -83,8 +83,8 @@ + if (list->empty()) + return; + +- typename std::vector<T*>::iterator it; +- typename std::vector<T*>::iterator itEnd = list->end(); ++ std::vector<T*>::iterator it; ++ std::vector<T*>::iterator itEnd = list->end(); + for (it = list->begin(); it != itEnd; ++it) + { + (*it)->_preProcessParticles(technique, timeElapsed); +@@ -102,8 +102,8 @@ + if (list->empty()) + return; + +- typename std::vector<T*>::iterator it; +- typename std::vector<T*>::iterator itEnd = list->end(); ++ std::vector<T*>::iterator it; ++ std::vector<T*>::iterator itEnd = list->end(); + for (it = list->begin(); it != itEnd; ++it) + { + (*it)->_processParticle(particleTechnique, particle, timeElapsed, firstParticle); +@@ -119,8 +119,8 @@ + if (list->empty()) + return; + +- typename std::vector<T*>::iterator it; +- typename std::vector<T*>::iterator itEnd = list->end(); ++ std::vector<T*>::iterator it; ++ std::vector<T*>::iterator itEnd = list->end(); + for (it = list->begin(); it != itEnd; ++it) + { + (*it)->_postProcessParticles(technique, timeElapsed); +diff -r -U 3 .\include\ParticleUniverseSpatialHashTable.h \development\Particle Universe V0.8\Plugins\ParticleUniverse\include\ParticleUniverseSpatialHashTable.h +--- .\include\ParticleUniverseSpatialHashTable.h Mon Aug 18 14:59:01 2008 ++++ \development\Particle Universe V0.8\Plugins\ParticleUniverse\include\ParticleUniverseSpatialHashTable.h Fri Jun 13 09:31:51 2008 +@@ -35,7 +35,7 @@ + SpatialHashTable(void) : + mTableSize(50), + mCellDimension(15), +- mCellOverlap(5) ++ mCellOverlap(5), + { + _initialise(); + }; +Only in \development\Particle Universe V0.8\Plugins\ParticleUniverse\misc: Thumbs.db +Only in .: obj +Only in .\scripts: ParticleUniverse.vcproj.JNPR.amiller.user +diff -r -U 3 .\src\Externs\ParticleUniverseBoxColliderExtern.cpp \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseBoxColliderExtern.cpp +--- .\src\Externs\ParticleUniverseBoxColliderExtern.cpp Mon Aug 18 15:02:13 2008 ++++ \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseBoxColliderExtern.cpp Fri Jun 13 09:31:51 2008 +@@ -29,7 +29,7 @@ + if (isAttached()) + { + // Use the position of the parent node in this case. +- position = getParentNode()->getPosition(); ++ position = getParentNode()->getWorldPosition(); + mDerivedPosition = position; + populateAlignedBox(mBox, mDerivedPosition, mWidth, mHeight, mDepth); + _calculateBounds(); +diff -r -U 3 .\src\Externs\ParticleUniverseGravityExtern.cpp \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseGravityExtern.cpp +--- .\src\Externs\ParticleUniverseGravityExtern.cpp Mon Aug 18 15:02:15 2008 ++++ \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseGravityExtern.cpp Fri Jun 13 09:31:51 2008 +@@ -29,7 +29,7 @@ + // Use the position of the parent node in this case. + if (isAttached()) + { +- position = getParentNode()->getPosition(); ++ position = getParentNode()->getWorldPosition(); + mDerivedPosition = position; + } + } +diff -r -U 3 .\src\Externs\ParticleUniverseSphereColliderExtern.cpp \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseSphereColliderExtern.cpp +--- .\src\Externs\ParticleUniverseSphereColliderExtern.cpp Mon Aug 18 15:02:16 2008 ++++ \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseSphereColliderExtern.cpp Fri Jun 13 09:31:51 2008 +@@ -29,7 +29,7 @@ + if (isAttached()) + { + // Use the position of the parent node in this case. +- position = getParentNode()->getPosition(); ++ position = getParentNode()->getWorldPosition(); + mDerivedPosition = position; + mSphere.setCenter(mDerivedPosition); + } +diff -r -U 3 .\src\Externs\ParticleUniverseVortexExtern.cpp \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseVortexExtern.cpp +--- .\src\Externs\ParticleUniverseVortexExtern.cpp Mon Aug 18 15:02:16 2008 ++++ \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\Externs\ParticleUniverseVortexExtern.cpp Fri Jun 13 09:31:51 2008 +@@ -28,7 +28,7 @@ + { + if (isAttached()) + { +- position = getParentNode()->getPosition(); ++ position = getParentNode()->getWorldPosition(); + mDerivedPosition = position; + } + } +diff -r -U 3 .\src\ParticleUniverseSystem.cpp \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\ParticleUniverseSystem.cpp +--- .\src\ParticleUniverseSystem.cpp Mon Aug 18 15:17:00 2008 ++++ \development\Particle Universe V0.8\Plugins\ParticleUniverse\src\ParticleUniverseSystem.cpp Fri Jun 13 09:32:00 2008 +@@ -392,7 +392,7 @@ + if (!mTimeController) + { + mTimeSinceLastVisible = 0; +- mLastVisibleFrame = Ogre::Root::getSingleton().getNextFrameNumber(); ++ mLastVisibleFrame = Ogre::Root::getSingleton().getCurrentFrameNumber(); + Ogre::ControllerManager& controllerManager = Ogre::ControllerManager::getSingleton(); + Ogre::ControllerValueRealPtr particleSystemUpdateValue(new ParticleSystemUpdateValue(this)); + mTimeController = controllerManager.createFrameTimePassthroughController(particleSystemUpdateValue); +@@ -409,7 +409,7 @@ + void ParticleSystem::_notifyCurrentCamera(Ogre::Camera* cam) + { + Ogre::MovableObject::_notifyCurrentCamera(cam); +- mLastVisibleFrame = Ogre::Root::getSingleton().getNextFrameNumber(); ++ mLastVisibleFrame = Ogre::Root::getSingleton().getCurrentFrameNumber(); + mTimeSinceLastVisible = 0.0f; + + // Notify all techniques +@@ -500,7 +500,7 @@ + { + if (mNonvisibleUpdateTimeoutSet) + { +- long frameDiff = Ogre::Root::getSingleton().getNextFrameNumber() - mLastVisibleFrame; ++ long frameDiff = Ogre::Root::getSingleton().getCurrentFrameNumber() - mLastVisibleFrame; + if (frameDiff > 1 || frameDiff < 0) + { + mTimeSinceLastVisible += timeElapsed; +Only in \development\Particle Universe V0.8\Plugins\ParticleUniverse: Thumbs.db Deleted: trunk/python-ogre/patch/ogre_svn.patch =================================================================== --- trunk/python-ogre/patch/ogre_svn.patch 2008-08-18 04:12:37 UTC (rev 694) +++ trunk/python-ogre/patch/ogre_svn.patch 2008-08-18 08:33:08 UTC (rev 695) @@ -1,98 +0,0 @@ -Index: OgreMovableObject.h -=================================================================== ---- OgreMovableObject.h (revision 7604) -+++ OgreMovableObject.h (working copy) -@@ -479,7 +479,7 @@ - included too. - */ - virtual void visitRenderables(Renderable::Visitor* visitor, -- bool debugRenderables = false) = 0; -+ bool debugRenderables = false) { throw std::runtime_error ( std::string ("Virtual function MovableObject::visitRenderables called!") ); } - - /** Sets whether or not the debug display of this object is enabled. - @remarks -Index: OgreRenderQueueListener.h -=================================================================== ---- OgreRenderQueueListener.h (revision 7604) -+++ OgreRenderQueueListener.h (working copy) -@@ -31,7 +31,9 @@ - - #include "OgrePrerequisites.h" - #include "OgreRenderQueue.h" -+#include <stdexcept> - -+ - namespace Ogre { - - /** Abstract interface which classes must implement if they wish to receive -@@ -65,7 +67,7 @@ - for this queue group. - */ - virtual void renderQueueStarted(uint8 queueGroupId, const String& invocation, -- bool& skipThisInvocation) = 0; -+ bool& skipThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueStarted called!") ); } - - /** Event raised after a queue group is rendered. - @remarks -@@ -80,7 +82,7 @@ - events will also be fired for it again. - */ - virtual void renderQueueEnded(uint8 queueGroupId, const String& invocation, -- bool& repeatThisInvocation) = 0; -+ bool& repeatThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueEnded called!") ); } - }; - - } -Index: OgreDataStream.h -=================================================================== ---- OgreDataStream.h (revision 7604) -+++ OgreDataStream.h (working copy) -@@ -33,6 +33,7 @@ - #include "OgreString.h" - #include "OgreSharedPtr.h" - #include <istream> -+#include <stdexcept> - - namespace Ogre { - -@@ -79,7 +80,7 @@ - @param count Number of bytes to read - @returns The number of bytes read - */ -- virtual size_t read(void* buf, size_t count) = 0; -+ virtual size_t read(void* buf, size_t count) { throw std::runtime_error ( std::string ("Virtual function DataStream::read called!") ); } - /** Get a single line from the stream. - @remarks - The delimiter character is not included in the data -@@ -146,7 +147,7 @@ - /** Returns the total size of the data to be read from the stream, - or 0 if this is indeterminate for this stream. - */ -- size_t size(void) const { return mSize; } -+ virtual size_t size(void) const { return mSize; } - - /** Close the stream; this makes further operations invalid. */ - virtual void close(void) = 0; -Index: OgreHardwareBuffer.h -=================================================================== ---- OgreHardwareBuffer.h (revision 7604) -+++ OgreHardwareBuffer.h (working copy) -@@ -31,7 +31,9 @@ - - // Precompiler options - #include "OgrePrerequisites.h" -+#include <stdexcept> - -+ - namespace Ogre { - - /** Abstract class defining common features of hardware buffers. -@@ -244,7 +246,7 @@ - @param pDest The area of memory in which to place the data, must be large enough to - accommodate the data! - */ -- virtual void readData(size_t offset, size_t length, void* pDest) = 0; -+ virtual void readData(size_t offset, size_t length, void* pDest) { throw std::runtime_error ( std::string ("Virtual function HardwareBuffer::readData called!") ); } - /** Writes data to the buffer from an area of system memory; note that you must - ensure that your buffer is big enough. - @param offset The byte offset from the start of the buffer to start writing Deleted: trunk/python-ogre/setup_dist.py =================================================================== --- trunk/python-ogre/setup_dist.py 2008-08-18 04:12:37 UTC (rev 694) +++ trunk/python-ogre/setup_dist.py 2008-08-18 08:33:08 UTC (rev 695) @@ -1,50 +0,0 @@ -#!/usr/bin/env python -# -# This is the distutils setup script for python-ogre. -# Full instructions are in "install.txt" or "install.html" -# -# To configure, compile, install, just run this script. - -DESCRIPTION = """Python-Ogre is a Python wrapper module for the -OGRE 3D Graphics library. It contains python functions and classes -that will allow you to fully utilitize the Ogre library. It is -Unique in that the python wrappers are created automatically by -Py++, hence making maintainence etc very simple. -This version is built against the Ogre CVS""" - -METADATA = { - "name": "Python-Ogre", - "version": "0.65 CVS", - "license": "LGPL", - "url": "http://python-ogre.python-hosting.com/", - "author": "Lakin Wecker, Roman Yakovenko, Andy", - "author_email": "pyt...@go...", - "description": "Py++ Ogre Python Binding: For CVS version of Ogre", - "long_description": DESCRIPTION, -} -from distutils.core import setup -import os, sys - -def GetFileList ( basepath ): - filesout = [] - for root, dirs, files in os.walk(basepath): - for name in files: - filesout.append(os.path.join(root, name)) - return filesout - -base = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]) ) -demofiles = GetFileList ( os.path.join (base, "demos") ) - -PACKAGEDATA = { - "packages": ['Ogre', 'OIS', 'CEGUI', 'OgreRefApp', 'OgreNewt'], - "package_dir": {'': 'packages'}, - "package_data": {'': ['*.pyd', '*.dll']}, -# "data_files": [(base+'Demos', demofiles),] - -} - -PACKAGEDATA.update(METADATA) -setup(**PACKAGEDATA) - - - \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |