Revision: 551
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=551&view=rev
Author: andy_miller
Date: 2008-01-15 21:33:53 -0800 (Tue, 15 Jan 2008)
Log Message:
-----------
Updating NxOgre library to the Bleeding svn rev
Added Paths:
-----------
trunk/python-ogre/ThirdParty/nxogre/
trunk/python-ogre/ThirdParty/nxogre/FireState.cpp
trunk/python-ogre/ThirdParty/nxogre/FireState.h
trunk/python-ogre/ThirdParty/nxogre/NxOgre.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreAnimatedRenderable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreBody.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreBody.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreClothRaycaster.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreClothRaycaster.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCollisionModel.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActor.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActor.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreContactStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreContactStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreDebugRenderer.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreDebugRenderer.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreDominanceGroup.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreDominanceGroup.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreEngine.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreEngine.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsDefinesTypedefs.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreError.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreError.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreExtendedTypes.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreExtendedTypes.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreFluid.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreFluid.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreForceField.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreForceField.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreGlobalFunctions.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreHash.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreIntersection.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreIntersection.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreJSON.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreJSON.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONCollection.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONRead.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONSchema.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONWrite.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreJoint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreJoint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet1.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet1.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet2.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet2.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacter.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacter.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterController.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterController.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterHitReport.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterHitReport.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreLog.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreLog.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreMachine.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreMachine.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterial.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterial.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreNodeRenderable.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreNodeRenderable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreNxActorController.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreNxActorController.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreNxCharacterController.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreNxCharacterController.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreNxSerialiser.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreNxSerialiser.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreNxuStreamSerialiser.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreSceneRenderer.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreSceneRenderer.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreParametersBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreParams.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreParams.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreParticleSystem.h
trunk/python-ogre/ThirdParty/nxogre/NxOgrePerformer.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgrePerformer.h
trunk/python-ogre/ThirdParty/nxogre/NxOgrePhysXDriver.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgrePhysXDriver.h
trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.h
trunk/python-ogre/ThirdParty/nxogre/NxOgrePrerequisites.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreRaycaster.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreRaycaster.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreRemoteDebuggerConnection.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreRemoteDebuggerConnection.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderable.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderableSource.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderableSource.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Convex.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Triangle.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceSystem.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceSystem.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreScene.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreScene.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneContactController.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneContactController.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneController.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneController.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneRenderer.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneRenderer.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneSource.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneSource.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneTriggerController.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneTriggerController.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSerialiser.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSerialiser.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShape.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShape.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintConvex.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintConvex.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintPrimitives.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintPrimitives.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintTerrain.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintTerrain.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintWheel.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintWheel.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeConvex.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeConvex.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapePrimitives.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapePrimitives.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeWheel.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeWheel.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleShape.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleShape.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeletalRenderable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeleton.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeleton.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSpriteRenderable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreState.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreStateMachine.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreTestIdea.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreTesting.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreTesting.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreTrigger.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreTrigger.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserAllocator.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserAllocator.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserData.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreVoxelRenderable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreWheelSet.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreWheelSet.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreWorld.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreWorld.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreWorldBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreWorldBlueprint.h
Added: trunk/python-ogre/ThirdParty/nxogre/FireState.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp (rev 0)
+++ trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-01-16 05:33:53 UTC (rev 551)
@@ -0,0 +1 @@
+// FireState
Added: trunk/python-ogre/ThirdParty/nxogre/FireState.h
===================================================================
Added: trunk/python-ogre/ThirdParty/nxogre/NxOgre.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgre.h (rev 0)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgre.h 2008-01-16 05:33:53 UTC (rev 551)
@@ -0,0 +1,160 @@
+/** @mainpage NxOgre
+@section licence Licence
+
+<pre>
+NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine.
+Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+</pre>
+
+@section whatisit What is it?
+NxOgre is a physics connector library between the physics library PhysX and the Ogre 3D rendering system.
+With a help of some short, fast and neat code you can have a quick physics system within your Ogre game
+or engine within a matter of minutes.
+
+@section installing Installing
+@subsection Ogre
+
+The SDK or Source versions will both work with NxOgre. You should have some knowledege with working Ogre.
+If you can make a simple application that can show an Ogre head with a movement camera, you can work with
+NxOgre.
+\n\n
+You will need to create an environmental variable called "OGRE_HOME" pointing to the ogremain directory
+in your Ogre folder. Normally for SDK users this is automatically created by the installer, but it's work
+checking, if you installed Ogre from the source you'll need to create one.
+
+[1] http://www.ogre3d.org/wiki/index.php/Installing_An_SDK \n
+[2] http://www.ogre3d.org/wiki/index.php/Building_From_Source \n
+
+@subsection PhysX
+The PhysX SDK can be downloaded from the Ageia Support Center, a user account is required to download the
+SDK. Once your account has been registered (Accounts are processed by hand, so a wait of 1-2 business days
+is common), download the PhysX SDK and the SystemSoftware.
+\n\n
+Install the SystemSoftware first, then the PhysX SDK. I recommend you install the PhysX SDK in the same
+parent directory as Ogre. Once the installation is completed, create a Environmental variable called
+"<code>PHYSX_DIR</code>" pointing to the PhysX SDK directory.
+\n\n
+[3] http://devsupport.ageia.com/ \n
+
+@subsection NxOgre
+ - Create a "NxOgre" folder, it should be in the parent of your Ogre or nearby
+ - Using Tortoise SVN or another Subversion client checkout the HEAD repositry
+ - Go to the parent directory of Ogre and the PhysX SDK i.e. (c:/dev/)
+ - New Folder, name as NxOgre, and go inside
+ - File, SVN, SVN Checkout
+ - Set the URL to http://latest.nxogre.org/nxogre3/
+ - Click okay
+ - Open up the project and compile.
+
+*/
+
+#ifndef __NXOGRE_H__
+#define __NXOGRE_H__
+
+///////////////////////////////////////////
+
+#include "NxOgreStable.h"
+#include "NxOgrePrerequisites.h"
+#include "NxOgrePhysXDriver.h"
+#include "NxOgreError.h"
+#include "NxOgreLog.h"
+#include "NxOgreExtendedTypes.h"
+
+///////////////////////////////////////////
+
+#include "NxOgreActor.h"
+#include "NxOgreActorBlueprint.h"
+#include "NxOgreBody.h"
+#include "NxOgreContactStream.h"
+#include "NxOgreContainer.h"
+#include "NxOgreCooking.h"
+#if NX_USE_LEGACY_NXCONTROLLER
+# include "NxOgreLegacyCharacter.h"
+# include "NxOgreLegacyCharacterController.h"
+# include "NxOgreLegacyCharacterHitReport.h"
+#else
+# include "NxOgreCharacterSystem.h"
+# include "NxOgreCharacter.h"
+# include "NxOgreCharacterModel.h"
+# include "NxOgreCharacterMovementModel.h"
+#endif
+#include "NxOgreCloth.h"
+#include "NxOgreClothRaycaster.h"
+#include "NxOgreCompound.h"
+#include "NxOgreDebugRenderer.h"
+#include "NxOgreDominanceGroup.h"
+#include "NxOgreEngine.h"
+#include "NxOgreEnumsBlueprint.h"
+#include "NxOgreFileResourceSystem.h"
+#include "NxOgreFluid.h"
+#include "NxOgreFluidMesh.h"
+#include "NxOgreForceField.h"
+#include "NxOgreGroup.h"
+#include "NxOgreHelpers.h"
+#include "NxOgreJointSet1.h"
+#include "NxOgreJointSet2.h"
+#include "NxOgreIntersection.h"
+#include "NxOgreMaterial.h"
+#include "NxOgreMachine.h"
+#include "NxOgreNodeRenderable.h"
+#include "NxOgreResourceManager.h"
+#include "NxOgreOgreResourceSystem.h"
+#include "NxOgreParams.h"
+#include "NxOgrePose.h"
+#include "NxOgreRaycaster.h"
+#include "NxOgreRenderable.h"
+#include "NxOgreRenderableSource.h"
+#include "NxOgreRemoteDebuggerConnection.h"
+#include "NxOgreResourceSystem.h"
+#include "NxOgreResourceStreamPtr.h"
+#include "NxOgreSerialiser.h"
+#include "NxOgreScene.h"
+#include "NxOgreSceneBlueprint.h"
+#include "NxOgreSceneController.h"
+#include "NxOgreSceneContactController.h"
+#include "NxOgreSceneRenderer.h"
+#include "NxOgreShape.h"
+#include "NxOgreShapeBlueprint.h"
+#include "NxOgreShapeBlueprintConvex.h"
+#include "NxOgreShapeBlueprintMesh.h"
+#include "NxOgreShapeBlueprintPrimitives.h"
+#include "NxOgreShapeBlueprintTerrain.h"
+#include "NxOgreShapeBlueprintWheel.h"
+#include "NxOgreShapeConvex.h"
+#include "NxOgreShapeMesh.h"
+#include "NxOgreShapePrimitives.h"
+#include "NxOgreShapeTerrain.h"
+#include "NxOgreShapeWheel.h"
+#include "NxOgreSimpleShape.h"
+#include "NxOgreSoftBody.h"
+#include "NxOgreState.h"
+#include "NxOgreStateMachine.h"
+#include "NxOgreTesting.h"
+#include "NxOgreTrigger.h"
+#include "NxOgreMemoryStream.h"
+#include "NxOgreUserAllocator.h"
+#include "NxOgreUserData.h"
+#include "NxOgreWheelSet.h"
+#include "NxOgreWorld.h"
+#include "NxOgreWorldBlueprint.h"
+
+///////////////////////////////////////////
+
+#include "NxOgreOgreSceneRenderer.h"
+#include "NxOgreOgreNodeRenderable.h"
+
+#endif
Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.cpp (rev 0)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.cpp 2008-01-16 05:33:53 UTC (rev 551)
@@ -0,0 +1,1123 @@
+//
+// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine.
+// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#include "NxOgreStable.h"
+#include "NxOgreActor.h"
+#include "NxOgreActorBlueprint.h"
+#include "NxOgreUserData.h" // For NxActorUserData for NxActor
+#include "NxOgrePose.h" // For conversions
+#include "NxOgreHelpers.h" // For conversions
+#include "NxOgreScene.h" // For Actor::mOwner
+#include "NxOgreShapeBlueprint.h" // For ShapeBlueprint System
+#include "NxOgreDominanceGroup.h" // For Dominance Groups
+#include "NxOgreGroup.h" // For ActorGroup and ShapeGroups
+#include "NxOgreContainer.h" // For Getting an ActorGroup
+#include "NxOgreActorBlueprint.h" // For Quick Duplication.
+
+#include "OgreStringConverter.h"
+#include "OgreRoot.h"
+#include "OgreSingleton.h"
+#include "OgreMatrix3.h"
+
+namespace NxOgre {
+
+//////////////////////////////////////////////////////////
+
+void ActorParams::setToDefault() {
+
+
+ mDensity = 0.0f;
+ mActorFlags = 0;
+ mGroupAsIndex = 0;
+ mGroupAsName = "";
+#if NX_SDK_VERSION_NUMBER >= 272
+ mDominanceGroupAsIndex = 0;
+ mDominanceGroupAsName = "";
+#endif
+#if NX_SDK_VERSION_NUMBER >= 260
+ mCompartment = NULL;
+#endif
+ mMassLocalPose . id();
+ mMassSpaceInertia . zero();
+ mLinearVelocity . zero();
+ mAngularVelocity . zero();
+ mWakeUpCounter = 20.0f * 0.02f;
+ mMass = 10.0f;
+ mLinearDamping = 0.0f;
+ mAngularDamping = 0.05f;
+ mMaxAngularVelocity = -1.0f;
+ mBodyFlags = NX_BF_VISUALIZATION;
+ mBodyFlags |= NX_BF_ENERGY_SLEEP_TEST;
+ mSleepLinearVelocity = -1.0f;
+ mSleepAngularVelocity = -1.0f;
+ mCCDMotionThreshold = 0.0f;
+ mSolverIterationCount = 4;
+ mSleepEnergyThreshold = -1.0f;
+ mSleepDamping = 0.0f;
+
+ mNodeScale = Ogre::Vector3(1,1,1);
+ mNodeName = "";
+ mNodeShadows = true;
+ mNodePose . id();
+
+}
+
+//////////////////////////////////////////////////////////
+
+void ActorParams::parse(Parameters P) {
+
+ for (Parameters::iterator p = P.begin(); p != P.end();p++) {
+
+ if ((*p).first == "static") {
+ if ( (*p).second.substr(0,1) == "y" || (*p).second.substr(0,1) == "Y") {
+ mMass = 0;
+ mDensity = 0;
+ continue;
+ }
+ else {
+ mMass = 10;
+ mDensity = 0;
+ }
+ }
+
+ if ((*p).first == "kinematic") {
+ if ( (*p).second.substr(0,1) == "y" || (*p).second.substr(0,1) == "Y") {
+ mBodyFlags |= NX_BF_KINEMATIC;
+ if (mMass == 0 || mDensity == 0) {
+ mMass = 1;
+ mDensity = 0;
+ }
+ }
+ }
+
+ if (Set("density", (*p), mDensity)) continue;
+ if (Set("group", (*p), mGroupAsName)) continue;
+ if (Set("group-index", (*p), mGroupAsIndex)) continue;
+#if NX_SDK_VERSION_NUMBER >= 272
+ if (Set("dominancegroup", (*p), mDominanceGroupAsName)) continue;
+ if (Set("dominancegroup-index", (*p), mDominanceGroupAsIndex)) continue;
+#endif
+ if (Set("massspaceinertia", (*p), mMassSpaceInertia)) continue;
+ if (Set("linearvelocity", (*p), mLinearVelocity)) continue;
+ if (Set("angularvelocity", (*p), mAngularVelocity)) continue;
+ if (Set("wakeupcounter", (*p), mWakeUpCounter)) continue;
+ if (Set("mass", (*p), mMass)) continue;
+ if (Set("lineardamping", (*p), mLinearDamping)) continue;
+ if (Set("angulardamping", (*p), mAngularDamping)) continue;
+ if (Set("maxangularvelocity", (*p), mMaxAngularVelocity)) continue;
+ if (Set("sleepangularvelocity", (*p), mSleepAngularVelocity)) continue;
+ if (Set("ccdmotionthreshold", (*p), mCCDMotionThreshold)) continue;
+ if (Set("solveriterationcount", (*p), mSolverIterationCount)) continue;
+ if (Set("sleepenergythreshold", (*p), mSleepEnergyThreshold)) continue;
+ if (Set("sleepdamping", (*p), mSleepDamping)) continue;
+ if (Set("node-scale", (*p), mNodeScale)) continue;
+ if (Set("node-shadows", (*p), mNodeShadows)) continue;
+ if (Set("node", (*p), mNodeName)) continue;
+ if (Set("node-orientation", (*p), mNodePose.q)) continue;
+ if (Set("node-offset", (*p), mNodePose.v)) continue;
+
+ }
+
+}
+
+//////////////////////////////////////////////////////////
+
+void ActorParams::fromNxActorDesc(NxActorDesc& desc) {
+
+ mDensity = desc.density;
+ mActorFlags = desc.flags;
+ mGroupAsIndex = desc.group;
+#if NX_SDK_VERSION_NUMBER >= 272
+ mDominanceGroupAsIndex = desc.dominanceGroup;
+#endif
+#if NX_SDK_VERSION_NUMBER >= 260
+ mCompartment = desc.compartment;
+#endif
+}
+
+//////////////////////////////////////////////////////////
+
+void ActorParams::fromNxBodyDesc(NxBodyDesc& desc) {
+
+ mMassLocalPose = desc.massLocalPose;
+ mMassSpaceInertia = desc.massSpaceInertia;
+ mLinearVelocity = desc.linearVelocity;
+ mAngularVelocity = desc.angularVelocity;
+ mWakeUpCounter = desc.wakeUpCounter;
+ mMass = desc.mass;
+ mLinearDamping = desc.linearDamping;
+ mAngularDamping = desc.angularDamping;
+ mMaxAngularVelocity = desc.maxAngularVelocity;
+ mBodyFlags = desc.flags;
+ mSleepLinearVelocity = desc.sleepLinearVelocity;
+ mSleepAngularVelocity = desc.sleepAngularVelocity;
+ mCCDMotionThreshold = desc.CCDMotionThreshold;
+ mSolverIterationCount = desc.solverIterationCount;
+ mBodyFlags = desc.flags;
+ mSleepEnergyThreshold = desc.sleepEnergyThreshold;
+ mSleepDamping = desc.sleepDamping;
+
+}
+
+//////////////////////////////////////////////////////////
+
+Actor::Actor(const NxString& Identifier, Scene* scene, bool isActorBased) : mName(Identifier), mOwner(scene) {
+ mActor = 0;
+ if (isActorBased)
+ mOwner->_registerActor(mName, this);
+}
+
+//////////////////////////////////////////////////////////
+
+Actor::Actor(const NxString& name, Scene* scene, ShapeBlueprint *shape, const Pose& pose, ActorParams params)
+: mName(name), mOwner(scene) {
+
+ if (name.length() == 0) {
+ mName = NxCreateID(scene->getNbActors(), "Actor");
+ }
+ else {
+
+ std::vector<NxString> splitID = Ogre::StringUtil::split(name, ";", 2);
+
+ NxString identifier;
+
+ if (splitID.size() == 1) {
+ identifier = name;
+ }
+ else {
+ identifier = splitID[0];
+ }
+
+ Ogre::StringUtil::trim(identifier);
+
+ if (identifier.substr(0,1) == ">") {
+ mName = identifier.substr(1, identifier.length() - 1);
+ if (scene->getActors()->has(mName)) {
+ NxThrow_Error("Duplicate Actor with identifier '" + mName + "' found!");
+ }
+
+ }
+ else if (scene->getActors()->has(identifier)) {
+ // Generate a identifier based on the the suggested name.
+ // i.e.
+ // myBody -> myBody 1
+ // myBody10 -> myBody 11
+
+ Actors actors;
+ scene->getActors()->CopyTo(actors);
+
+ NxU32 highest = 0;
+ NxString workingName;
+ for(Actor* a = actors.begin();a = actors.next();) {
+ if (Ogre::StringUtil::startsWith(a->getName(), identifier, false)) {
+ workingName = a->getName();
+ workingName = workingName.substr(identifier.length(), workingName.length() - identifier.length());
+ std::stringstream ss(workingName);
+ NxU32 current = 0;
+ ss >> current;
+ if (current > highest)
+ highest = current;
+ }
+ }
+
+ highest++;
+ mName = identifier;
+ mName.append(Ogre::StringConverter::toString(highest));
+ }
+ else {
+ mName = identifier;
+ }
+ }
+
+ _createActor(shape,pose,params);
+ mOwner->_registerActor(mName, this);
+}
+
+//////////////////////////////////////////////////////////
+
+Actor::~Actor() {
+
+ mOwner->_unregisterActor(mName);
+
+ if (!isDead())
+ _destroyActor();
+
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::_createActor(ShapeBlueprint *shape, const Pose& pose, ActorParams params) {
+
+ NxActorDesc ad;
+ NxBodyDesc bd;
+ ad.setToDefault();
+ bd.setToDefault();
+
+ mNxActorUserData = new NxActorUserData(this, NxActorUserData::T_Actor);
+#if NX_SDK_VERSION_NUMBER >= 260
+ ad.compartment = params.mCompartment;
+#endif
+ if (params.mMass == 0)
+ ad.density = params.mDensity;
+#if NX_SDK_VERSION_NUMBER >= 272
+ if (params.mDominanceGroupAsIndex != 0)
+ ad.dominanceGroup = params.mDominanceGroupAsIndex;
+ else if (params.mDominanceGroupAsName.length() > 0)
+ ad.dominanceGroup = mOwner->getDominanceGroup(params.mDominanceGroupAsName)->getGroupID();
+#endif
+ ad.flags = params.mActorFlags;
+
+ ad.globalPose.t = pose.getVec3();
+ ad.globalPose.M.fromQuat(pose.getQuat());
+
+ if (params.mGroupAsIndex != 0)
+ ad.group = params.mGroupAsIndex;
+ else if (params.mGroupAsName.length() > 0)
+ ad.group = mOwner->getActorGroup(params.mGroupAsName)->getGroupID();
+
+ ad.userData = mNxActorUserData;
+
+ if (params.mDensity == 0 && params.mMass == 0) {
+ ad.body = NULL;
+ }
+ else {
+ bd.angularDamping = params.mAngularDamping;
+ bd.angularVelocity = params.mAngularVelocity;
+ bd.CCDMotionThreshold = params.mCCDMotionThreshold;
+ bd.flags = params.mBodyFlags;
+ bd.linearDamping = params.mLinearDamping;
+ bd.linearVelocity = params.mLinearVelocity;
+ if (ad.density == 0)
+ bd.mass = params.mMass;
+ bd.massLocalPose = params.mMassLocalPose;
+ bd.massSpaceInertia = params.mMassSpaceInertia;
+ bd.maxAngularVelocity = params.mMaxAngularVelocity;
+ bd.sleepAngularVelocity = params.mSleepAngularVelocity;
+ bd.sleepDamping = params.mSleepDamping;
+ bd.sleepEnergyThreshold = params.mSleepEnergyThreshold;
+ bd.sleepLinearVelocity = params.mSleepLinearVelocity;
+ bd.solverIterationCount = params.mSolverIterationCount;
+ bd.wakeUpCounter = params.mWakeUpCounter;
+ ad.body = &bd;
+ }
+
+ shape->_bindToActorDescription(this, 0, ad.shapes);
+
+ mActor = mOwner->mScene->createActor(ad);
+
+ if (!mActor) {
+ std::stringstream ss;
+ ss << "Creation of Actor with the identifier '" << mName << "' failed." << std::endl;
+ NxThrow_Error(ss.str());
+ return;
+ }
+
+ if (!shape->isShared())
+ delete shape;
+
+ NxU32 nbShapes = mActor->getNbShapes();
+ NxShape*const* shapes = mActor->getShapes();
+
+ int i=0;
+ while (nbShapes--) {
+ mCollisionModel[i]->_bindNxShapeToShape(shapes[nbShapes]);
+ i++;
+ }
+
+#if (OGRE_VERSION_MAJOR >= 1) && (OGRE_VERSION_MINOR >= 5)
+ mBirthFrame = Ogre::Root::getSingletonPtr()->getNextFrameNumber() - 1;
+#else
+ mBirthFrame = Ogre::Root::getSingletonPtr()->getCurrentFrameNumber();
+#endif
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::_destroyActor() {
+ mCollisionModel.destroyAllOwned();
+ delete mNxActorUserData;
+ mOwner->mScene->releaseActor(*mActor);
+ mActor = 0;
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setName(NxString name) {
+ mOwner->mActors.rename(mName, name);
+ mName = name;
+}
+
+//////////////////////////////////////////////////////////
+
+NxString Actor::getName() const {
+ return mName;
+}
+
+//////////////////////////////////////////////////////////
+
+NxScene* Actor::getNxScene() {
+ return mOwner->getNxScene();
+}
+
+//////////////////////////////////////////////////////////
+
+Actor* Actor::duplicate(const NxString& name, const Pose& p) {
+ Blueprints::ActorBlueprint* ab = new Blueprints::ActorBlueprint();
+ ab->serialise(this, mOwner);
+ Actor* a = ab->unserialise(name, mOwner);
+ a->setGlobalPose(p);
+ delete ab;
+ return a;
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGlobalPose(const Pose& pose) {
+ mActor->setGlobalPose(pose.toMat34());
+}
+
+//////////////////////////////////////////////////////////
+
+Pose Actor::getGlobalPose() {
+ static Pose p;
+ p.fromMat34(mActor->getGlobalPose());
+ return p;
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Quaternion Actor::getGlobalOrientation() {
+ return NxConvert<Ogre::Quaternion, NxQuat>(mActor->getGlobalOrientationQuat());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGlobalOrientation(const Ogre::Quaternion& quat) {
+ mActor->setGlobalOrientation(NxConvert<NxQuat, Ogre::Quaternion>(quat));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getGlobalPosition() {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getGlobalPosition());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGlobalPosition(const Ogre::Vector3& vec) {
+ mActor->setGlobalPosition(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::moveGlobalPose(const Pose& pose) {
+ mActor->moveGlobalPose(pose.toMat34());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::moveGlobalPosition(const Ogre::Vector3& vec) {
+ mActor->moveGlobalPosition(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::moveGlobalOrientation(const Ogre::Quaternion& quat) {
+ mActor->moveGlobalOrientationQuat(NxConvert<NxQuat, Ogre::Quaternion>(quat));
+}
+
+////////////////////////////////////////////////////////
+
+void Actor::moveTowards(const Pose& p, float force) {
+ NxVec3 fc = p.v - mActor->getGlobalPosition();
+ fc *= force;
+ fc -= mActor->getPointVelocity(mActor->getGlobalPosition());
+ mActor->addForceAtPos(fc, mActor->getGlobalPosition());
+}
+
+////////////////////////////////////////////////////////
+
+#if 0
+
+const ShapeBlueprint& Actor::createShapeDescription(const ShapeBlueprint& s) {
+ NxUnderConstruction;
+ return s;
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::destroyShapeDescription(const ShapeBlueprint&) {
+ NxUnderConstruction;
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::uint Actor::getNbShapeDescriptions() {
+ return mActor->getNbShapeDescriptions();
+}
+
+//////////////////////////////////////////////////////////
+
+std::vector<const ShapeBlueprint&> Actor::getAllShapeDescriptions() {
+ NxUnderConstruction;
+ std::vector<const ShapeBlueprint&> s;
+ return s;
+}
+
+//////////////////////////////////////////////////////////
+
+ShapeBlueprint Actor::getFirstShapeDescription() {
+ NxUnderConstruction;
+ return NULL;
+}
+
+//////////////////////////////////////////////////////////
+
+ShapeBlueprint Actor::getShapeDescription(Ogre::uint id) {
+ NxUnderConstruction;
+ return NULL;
+}
+
+#endif
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGroup(ActorGroup* ag) {
+ mActor->setGroup(ag->getGroupID());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGroup(const NxString& GroupIdentifier) {
+ mActor->setGroup(mOwner->getActorGroups()->get(GroupIdentifier)->getGroupID());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGroup(NxActorGroup agid) {
+ mActor->setGroup(agid);
+}
+
+//////////////////////////////////////////////////////////
+
+ActorGroup* Actor::getGroup() const {
+ NxActorGroup agid = mActor->getGroup();
+ return mOwner->getActorGroupsByIndex()->get(agid);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::raiseActorFlag(NxActorFlag f) {
+ mActor->raiseActorFlag(f);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::clearActorFlag(NxActorFlag f) {
+ mActor->clearActorFlag(f);
+}
+
+//////////////////////////////////////////////////////////
+
+bool Actor::hasActorFlag(NxActorFlag f) const {
+ return mActor->readActorFlag(f);
+}
+//////////////////////////////////////////////////////////
+
+bool Actor::isDynamic() const {
+ return mActor->isDynamic();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetLocalPose(const Pose& pose) {
+ mActor->setCMassOffsetLocalPose(pose.toMat34());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetLocalPosition(const Ogre::Vector3& vec) {
+ mActor->setCMassOffsetLocalPosition(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetLocalOrientation(const NxMat33& m) {
+ mActor->setCMassOffsetLocalOrientation(m);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetLocalOrientation(const Ogre::Matrix3& vec) {
+ NxUnderConstruction;
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetGlobalPose(const Pose& pose) {
+ mActor->setCMassOffsetGlobalPose(pose.toMat34());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetGlobalPosition(const Ogre::Vector3& vec) {
+ mActor->setCMassOffsetGlobalPosition(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetGlobalOrientation(const NxMat33& m) {
+ mActor->setCMassOffsetGlobalOrientation(m);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassOffsetGlobalOrientation(const Ogre::Matrix3& quat) {
+ NxUnderConstruction;
+ NxMat33 m;
+ mActor->setCMassOffsetGlobalOrientation(m);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassGlobalPose(const Pose& pose) {
+ mActor->setCMassGlobalPose(pose.toMat34());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassGlobalPosition(const Ogre::Vector3& vec) {
+ mActor->setCMassGlobalPosition(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCMassGlobalOrientation(const Ogre::Quaternion& quat) {
+ NxUnderConstruction;
+ NxMat33 m;
+ mActor->setCMassGlobalOrientation(m);
+}
+//////////////////////////////////////////////////////////
+
+
+Pose Actor::getCMassLocalPose() const {
+ Pose pose;
+ pose.fromMat34(mActor->getCMassLocalPose());
+ return pose;
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getCMassLocalPosition() const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getCMassLocalPosition());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Quaternion Actor::getCMassLocalOrientation() const {
+ return NxConvert<Ogre::Quaternion, NxQuat>(mActor->getCMassLocalOrientation());
+}
+
+//////////////////////////////////////////////////////////
+
+Pose Actor::getCMassGlobalPose() const {
+ Pose pose;
+ pose.fromMat34(mActor->getCMassGlobalPose());
+ return pose;
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getCMassGlobalPosition() const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getCMassGlobalPosition());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Quaternion Actor::getCMassGlobalOrientation() const {
+ NxQuat quat;
+ mActor->getCMassGlobalOrientation().toQuat(quat);
+ return NxConvert<Ogre::Quaternion, NxQuat>(quat);
+}
+
+//////////////////////////////////////////////////////////
+
+
+void Actor::setMass(NxReal r) {
+ mActor->setMass(r);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getMass() const {
+ return mActor->getMass();
+}
+
+//////////////////////////////////////////////////////////
+
+
+void Actor::setMassSpaceInertiaTensor(const Ogre::Vector3& vec) {
+ mActor->setMassSpaceInertiaTensor(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getMassSpaceInertiaTensor() const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getMassSpaceInertiaTensor());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Matrix3 Actor::getGlobalInertiaTensor() const {
+ NxUnderConstruction;
+ Ogre::Matrix3 m;
+ return m;
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Matrix3 Actor::getGlobalInertiaTensorInverse() const {
+ NxUnderConstruction;
+ Ogre::Matrix3 m;
+ return m;
+}
+
+//////////////////////////////////////////////////////////
+
+
+void Actor::updateMassFromShapeFromDensity(NxReal r) {
+ mActor->updateMassFromShapes(r,0);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::updateMassFromShapeAsMass(NxReal r) {
+ mActor->updateMassFromShapes(0,r);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setLinearDamping(NxReal r) {
+ mActor->setLinearDamping(r);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getLinearDamping() const {
+ return mActor->getLinearDamping();
+}
+
+//////////////////////////////////////////////////////////
+
+
+void Actor::setAngularDamping(NxReal r) {
+ mActor->setAngularDamping(r);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getAngularDamping() const {
+ return mActor->getAngularDamping();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setLinearVelocity(const Ogre::Vector3& vec) {
+ mActor->setLinearVelocity(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setAngularVelocity(const Ogre::Vector3& vec) {
+ mActor->setAngularVelocity(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+
+Ogre::Vector3 Actor::getLinearVelocity() const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getLinearVelocity());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getAngularVelocity() const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getAngularVelocity());
+}
+
+//////////////////////////////////////////////////////////
+
+
+void Actor::setMaxAngularVelocity(NxReal r) {
+ mActor->setMaxAngularVelocity(r);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getMaxAngularVelocity() const {
+ return mActor->getMaxAngularVelocity();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setCCDMotionThreshold(NxReal r) {
+ mActor->setCCDMotionThreshold(r);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getCCDMotionThreshold() const {
+ return mActor->getCCDMotionThreshold();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setLinearMomentum(const Ogre::Vector3& vec) {
+ mActor->setLinearMomentum(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setAngularMomentum(const Ogre::Vector3& vec) {
+ mActor->setAngularMomentum(NxConvert<NxVec3, Ogre::Vector3>(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getLinearMomentum() const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getLinearMomentum());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getAngularMomentum() const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getAngularMomentum());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForceAtPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addForceAtPos(NxConvert<NxVec3, Ogre::Vector3>(force), NxConvert<NxVec3, Ogre::Vector3>(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForceAtLocalPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addForceAtLocalPos(NxConvert<NxVec3, Ogre::Vector3>(force), NxConvert<NxVec3, Ogre::Vector3>(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalForceAtPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addLocalForceAtPos(NxConvert<NxVec3, Ogre::Vector3>(force), NxConvert<NxVec3, Ogre::Vector3>(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalForceAtLocalPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addLocalForceAtLocalPos(NxConvert<NxVec3, Ogre::Vector3>(force), NxConvert<NxVec3, Ogre::Vector3>(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForce(const Ogre::Vector3& force, NxForceMode mode, bool wakeup) {
+ mActor->addForce(NxConvert<NxVec3, Ogre::Vector3>(force), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForce(const NxVec3& force, NxForceMode mode, bool wakeup) {
+ mActor->addForce(force, mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForce(NxReal x, NxReal y, NxReal z, NxForceMode mode, bool wakeup) {
+ mActor->addForce(NxVec3(x,y,z), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalForce(const Ogre::Vector3& force, NxForceMode mode, bool wakeup) {
+ mActor->addLocalForce(NxConvert<NxVec3, Ogre::Vector3>(force), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addTorque(const NxVec3& torque, NxForceMode mode, bool wakeup) {
+ mActor->addTorque(torque, mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addTorque(const Ogre::Vector3& torque, NxForceMode mode, bool wakeup) {
+ mActor->addTorque(NxConvert<NxVec3, Ogre::Vector3>(torque), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalTorque(const Ogre::Vector3& torque, NxForceMode mode, bool wakeup) {
+ mActor->addLocalTorque(NxConvert<NxVec3, Ogre::Vector3>(torque), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::computeKineticEnergy() const {
+ return mActor->computeKineticEnergy();
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getPointVelocity(const Ogre::Vector3& vec) const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getPointVelocity(NxConvert<NxVec3, Ogre::Vector3>(vec)));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getLocalPointVelocity(const Ogre::Vector3& vec) const {
+ return NxConvert<Ogre::Vector3, NxVec3>(mActor->getLocalPointVelocity(NxConvert<NxVec3, Ogre::Vector3>(vec)));
+}
+
+//////////////////////////////////////////////////////////
+
+bool Actor::isGroupSleeping() const {
+ return mActor->isGroupSleeping();
+}
+
+//////////////////////////////////////////////////////////
+
+bool Actor::isSleeping() const {
+ return mActor->isSleeping();
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getSleepLinearVelocity() const {
+ return mActor->getSleepLinearVelocity();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setSleepLinearVelocity(NxReal threshold) {
+ mActor->setSleepLinearVelocity(threshold);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getSleepAngularVelocity() const {
+ return mActor->getSleepAngularVelocity();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setSleepAngularVelocity(NxReal threshold) {
+ mActor->setSleepAngularVelocity(threshold);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::getSleepEnergyThreshold() const {
+ return mActor->getSleepEnergyThreshold();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setSleepEnergyThreshold(NxReal threshold) {
+ mActor->setSleepEnergyThreshold(threshold);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::wakeUp(NxReal wakeCounterValue) {
+ mActor->wakeUp(wakeCounterValue);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::putToSleep() {
+ mActor->putToSleep();
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::raiseBodyFlag(NxBodyFlag f) {
+ mActor->raiseBodyFlag(f);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::clearBodyFlag(NxBodyFlag f) {
+ mActor->clearBodyFlag(f);
+}
+
+//////////////////////////////////////////////////////////
+
+bool Actor::hasBodyFlag(NxBodyFlag f) const {
+ return mActor->readBodyFlag(f);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setSolverIterationCount(NxU32 c) {
+ mActor->setSolverIterationCount(c);
+}
+
+//////////////////////////////////////////////////////////
+
+NxU32 Actor::getSolverIterationCount() const {
+ return mActor->getSolverIterationCount();
+}
+
+//////////////////////////////////////////////////////////
+
+#if NX_SUPPORT_SWEEP_API
+
+NxU32 Actor::linearSweep(const Ogre::Vector3& motion, NxU32 flags, void* userData, NxU32 nbShapeDescriptions, NxSweepQueryHit* shapes, NxUserEntityReport<NxSweepQueryHit>* callback, const NxSweepCache* sweepCache) {
+ return mActor->linearSweep(NxConvert<NxVec3, Ogre::Vector3>(motion), flags, userData, nbShapeDescriptions, shapes, callback, sweepCache);
+}
+
+#endif
+
+//////////////////////////////////////////////////////////
+
+#if NX_SDK_VERSION_NUMBER >= 260
+
+Compartment* Actor::getCompartment() const {
+ NxUnderConstruction;
+ return NULL;
+}
+
+#endif
+
+//////////////////////////////////////////////////////////
+
+Shape* Actor::addShape(ShapeBlueprint* sd) {
+
+
+ NxShapeIndex id = mCollisionModel.count();
+ sd->_bindToNxActor(this, id);
+ delete sd;
+ Shape* s = mCollisionModel.get(id);
+
+
+ return s;
+
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::removeShape(Shape* sh) {
+
+
+ for (Shape* shape = mCollisionModel.begin();shape = mCollisionModel.next();) {
+ if (shape == sh) {
+ mActor->releaseShape(*sh->getNxShape());
+ mCollisionModel.remove(sh->getIndex());
+
+ if (mDynamicCollisionModel.has(sh->getIndex()))
+ mDynamicCollisionModel.remove(sh->getIndex());
+
+ delete shape;
+
+ return;
+ }
+ }
+
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::removeShape(NxShapeIndex id) {
+
+ Shape* shape = mCollisionModel[id];
+
+ if (shape == 0)
+ return;
+
+ shape->releaseShape();
+ mCollisionModel.remove(id);
+
+ delete shape;
+}
+
+//////////////////////////////////////////////////////////
+
+NxU32 Actor::getNbShapes() const {
+ return mCollisionModel.count();
+}
+
+//////////////////////////////////////////////////////////
+
+CollisionModel* Actor::getCollisionModel() {
+ return &mCollisionModel;
+}
+
+//////////////////////////////////////////////////////////
+
+CollisionModel* Actor::getDynamicCollisionModel() {
+ return &mDynamicCollisionModel;
+}
+
+//////////////////////////////////////////////////////////
+
+void* Actor::getNxActorUserData() {
+ return mActor->userData;
+}
+
+//////////////////////////////////////////////////////////
+
+NxActorUserData* Actor::getUserData() {
+ return mNxActorUserData;
+}
+
+//////////////////////////////////////////////////////////
+
+StringPairList Actor::saveCustom() {
+ StringPairList l;
+ l.insert("ActorType", "Actor");
+
+ return l;
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::disable() {
+
+ mActor->raiseActorFlag(NX_AF_DISABLE_COLLISION);
+ mActor->raiseActorFlag(NX_AF_DISABLE_RESPONSE);
+ mActor->raiseActorFlag(NX_AF_FLUID_DISABLE_COLLISION);
+ mActor->raiseBodyFlag(NX_BF_FROZEN);
+ mActor->raiseBodyFlag(NX_BF_FROZEN_ROT);
+ mActor->setAngularVelocity(NxVec3(0,0,0));
+ mActor->setAngularMomentum(NxVec3(0,0,0));
+ mActor->setLinearMomentum(NxVec3(0,0,0));
+ mActor->setLinearVelocity(NxVec3(0,0,0));
+
+// disableVisualisation();
+}
+
+//////////////////////////////////////////////////////////
+
+FixedJoint* Actor::joinWith(Actor* actorB, JointParams jp) {
+ return mOwner->createFixedJoint(this, actorB, jp);
+}
+
+//////////////////////////////////////////////////////////
+
+} //End of NxOgre namespace.
Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.h (rev 0)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.h 2008-01-16 05:33:53 UTC (rev 551)
@@ -0,0 +1,825 @@
+//
+// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine.
+// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#ifndef __NXOGRE_ACTOR_H__
+#define __NXOGRE_ACTOR_H__
+
+#include "NxOgrePrerequisites.h"
+#include "NxOgreContainer.h" // For: mCollisionList
+#include "NxOgreParams.h"
+#include "NxOgrePose.h"
+
+namespace NxOgre {
+
+ /** \page actorparams ActorParams
+
+ String base params are case and space insensitive.
+
+ Examples:
+
+ <code>
+ "mass: 1"
+
+ "mass: 1, group: myActors"
+
+ "mass: 1, group: myActors, lineardamping: 3"
+ </code>
+
+ Non-String based params can be used as well, and offer access to some variables of the params
+ that cannot be converted into a string (pointers, etc.).
+
+ Due to efficency purposes and insane string conversion. With string parameters more than four,
+ you should work with the non-string based params system.
+
+ <code>
+ ActorParams params;
+ params.setToDefault();
+ params.mMass = 10;
+ params.mGroupAsIndex = 1;
+ </code>
+
+ Is exactly the same as:
+
+ <code>
+ "mass: 10, group-index: 1"
+ </code>
+
+ Current Supported String Params
+ -----------------------------
+
+ - density (float)
+ - Description: Density of this Actor. Use this or mass, do not use both.
+ - Example: "Density: 1.5"
+ - See: ActorParams::mDensity and NxActorDesc::density for more information.
+
+ - group (string)
+ - Description: Actor Group name of this actor. Use this or group-index, but not both.
+ - Example: "group: myGroup"
+ - See: ActorParams::mGroupAsName
+
+ - group-index (unsigned int)
+ - Description: Actor Group ID of this actor. Use this or group, but not both.
+ - Example: "group-index: 0"
+ - See: ActorParams::mGroupAsIndex
+
+ - dominancegroup (unsigned int)
+ - Description: Dominance Group ID of this actor.
+ - Example: "dominancegroup: 0"
+ - See: ActorParams::mDominanceGroup
+
+ - massspaceinertia (Vector3)
+ - Description: Mass Space Inertia of this Actor
+ - Example: "massspaceinertia: 1 0 1"
+ - See: ActorParams::mMassSpaceInertia
+
+ - linearvelocity (Vector3)
+ - Description: Linear Velocity of this Actor
+ - Example: "linearvelocity: 1 0 1"
+ - See: ActorParams::mLinearVelocity
+
+ - angularvelocity (Vector3)
+ - Description: Angular Velocity of this Actor
+ - Example: "angularvelocity: 1 0 1"
+ - See: ActorParams::mAngularVelocity
+
+ - wakeupcounter (float)
+ - Description: Wake up time counter
+ - Example: "wakeupcounter: 1000.0"
+ - See: ActorParams::mWakeupCounter
+
+ - mass (float)
+ - Description: Mass of this Actor. Use this or density, do not use both.
+ - Example: "mass: 10"
+ - See: ActorParams::mMass and NxBodyDesc::mass for more information.
+
+ - lineardamping (float)
+ - Description: Linear Damping of the Actor
+ - Example: "lineardamping: 0.1"
+ - See: ActorParams::mLinearDamping
+
+ - angulardamping (float)
+ - Description: Angular Damping of the Actor
+ - Example: "angulardamping: 0.1"
+ - See: ActorParams::mAngularDamping
+
+ - maxangularvelocity (float)
+ - Description: Maximum allowed angular velocity
+ - Example: "maxangularvelocity: 10"
+ - See: ActorParams::mMaxAngularVelocity
+
+ - sleepangularvelocity (float)
+ - Description: Maximum angular velocity at which the Actor can go to sleep.
+ - Example: "sleepangularvelocity: 20"
+ - See: ActorParams:mSleepAngularVelocity
+
+ - ccdmotionthreshold (float)
+ - Description: When CCD is globally enabled, it is still not performed if the
+ motion distance of all points on the Actor is below this threshold.
+ - Example: "ccdmotionthreshold: 5"
+ - See: ActorParams::mCCDMotionThreshold
+
+ - solveriterationcount (unsigned int)
+ - Description: Number of solver iterations performed when processing joint/contacts
+ connected to this Actor.
+ - Example: "solveriterationcount: 5"
+ - Range: 1 to 255
+ - See: ActorParams::mSolverIterationCount
+
+ - sleepenergytheshold (float)
+ - Description: Threshold for the energy-based sleeping algorithm. Only used when
+ the NX_BF_ENERGY_SLEEP_TEST flag is set
+ - Example: "sleepenergythreshold: 0.006"
+ - See: ActorParams::mSleepEnergyThreshold
+
+ - sleepdamping (float)
+ - Description: Damping factor for bodies that are about to sleep.
+ - Example: "sleepdamping: 0.5"
+ - See: ActorParams::mSleepDamping
+
+ - node-scale (Vector3)
+ - Applicable to Body and Actors that use a visual representation of the NxActor.
+ - Description: Scale factor of the SceneNode
+ - Example: "node-slace: 2 2 2"
+ - See: ActorParams::mNodeScale
+
+ - node-shadows (bool)
+ - Applicable to Body and Actors that use a visual representation of the NxActor.
+ - Description: Apply shadows to the first entity (Body class). See other custom Actors
+ to see how shadows apply to it.
+ - Example: "node-shadows: yes"
+ - See: ActorParams::mNodeShaodws
+
+ - node (string)
+ - Applicable to Body and Actors that use a visual representation of the NxActor.
+ - Description: Name of the SceneNode, or name of an existing SceneNode to use (Body only).
+ - Example: "node: myNodeName"
+ - See: ActorParams::mNodeName
+
+ */
+
+
+ /** ActorParams
+
+ @see \ref actorparams for the full string argument documentation.
+ */
+ class NxExport ActorParams : public Params {
+
+ public:
+
+ /** @brief Class based params.
+ @note Faster, less readable and reusable.
+ @see \ref actorparams
+ @example
+ <code>
+ ActorParams ap;
+ ap.mMass = 10;
+ ap.mGroup = "myGroup";
+ ..., ap, ...
+ </code>
+
+ */
+ ActorParams() {
+ setToDefault();
+ }
+
+ /** @brief String based params. "mass: 10, group: myGroup"
+ @note Slower but readable.
+ @params String of params.
+ @see \ref actorparams
+ @example
+ <code>
+ ..., "mass: 10, group: myGroup", ...
+ </code>
+ */
+ ActorParams(const char* p) {
+ process(p);
+ }
+
+ /** @brief String based params. "mass: 10, group: myGroup"
+ @note Slower but readable.
+ @params
+ @see \ref actorparams
+ @example
+ <code>
+ ..., "mass: 10, group: myGroup", ...
+ </code>
+ */
+ ActorParams(NxString p) {
+ process(p);
+ }
+
+ /** @brief Set's the Params to default based on NxActorDesc and NxBodyDesc defaults.
+ */
+ void setToDefault();
+
+ /** @brief Set's the Params based from an NxActorDesc
+ */
+ void fromNxActorDesc(NxActorDesc&...
[truncated message content] |