Revision: 547
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=547&view=rev
Author: andy_miller
Date: 2008-01-15 18:53:00 -0800 (Tue, 15 Jan 2008)
Log Message:
-----------
Adding the 0.9 version of NxOgre
Added Paths:
-----------
trunk/python-ogre/ThirdParty/nxogre_0.9/
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgre.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActor.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActor.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActorBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActorBlueprint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreBlueprint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreBody.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreBody.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCharacter.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCharacter.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCharacterController.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCharacterController.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCharacterHitReport.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCharacterHitReport.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCloth.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCloth.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreClothRaycaster.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreClothRaycaster.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCollisionModel.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCompound.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCompound.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreContainer.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreContainer.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCooking.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreCooking.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreDebugRenderer.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreDebugRenderer.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreDominanceGroup.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreDominanceGroup.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreEnumsBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreEnumsBlueprint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreError.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreError.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreFluid.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreFluid.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreFluidMesh.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreFluidMesh.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreForceField.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreForceField.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreGlobalFunctions.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreGroup.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreGroup.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreHelper.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreHelper.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreHelpers.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreHelpers.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreIntersection.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreIntersection.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJSON.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJSON.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJSONCollection.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJSONRead.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJSONSchema.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJSONWrite.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJoint.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJoint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJointSet1.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJointSet1.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJointSet2.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreJointSet2.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreLog.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreLog.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreMaterial.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreMaterial.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreMeshManager.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreMeshManager.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreMotor.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreMotor.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreNxSerialiser.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreNxSerialiser.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreNxuStreamSerialiser.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreParametersBlueprint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreParams.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreParams.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgrePhysXDriver.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgrePhysXDriver.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgrePose.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgrePose.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgrePrerequisites.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreRaycaster.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreRaycaster.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreRemoteDebuggerConnection.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreRemoteDebuggerConnection.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreScene.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreScene.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneBlueprint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneContactController.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneContactController.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneController.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneController.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneTriggerController.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSceneTriggerController.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSerialiser.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSerialiser.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShape.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShape.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintConvex.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintConvex.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintMesh.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintMesh.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintPrimitives.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintPrimitives.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintTerrain.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintTerrain.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintWheel.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeBlueprintWheel.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeConvex.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeConvex.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeDescription.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeDescriptionConvex.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeDescriptionMesh.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeDescriptionPrimitives.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeDescriptionTerrain.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeDescriptionWheel.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeMesh.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeMesh.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapePrimitives.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapePrimitives.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeTerrain.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeTerrain.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeWheel.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreShapeWheel.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSimpleShape.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSimpleShape.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSkeleton.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSkeleton.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSoftBody.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSoftBody.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreStable.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreStable.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreState.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreStateMachine.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSummary.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreSummary.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreTesting.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreTesting.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreTrigger.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreTrigger.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreUserAllocator.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreUserAllocator.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreUserData.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreUserStream.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreUserStream.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreWorld.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreWorld.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreWorldBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreWorldBlueprint.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Asc2Bin.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Asc2Bin.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_ColladaExport.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_ColladaExport.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_ColladaImport.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_ColladaImport.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_File.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_File.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Geometry.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Geometry.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_GraphicsMesh.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_GraphicsMesh.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_PhysicsExport.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_PhysicsExport.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_PhysicsInstantiator.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_PhysicsInstantiator.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Schema.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Schema.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_SchemaStream.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_SchemaStream.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_SchemaTypes.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Streaming.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_Streaming.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_cooking.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_cooking.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_customcopy.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_customcopy.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_helper.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_helper.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_hull.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_hull.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_string.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_string.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_tinystr.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_tinystr.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_tinyxml.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_tinyxml.h
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_tinyxmlerror.cpp
trunk/python-ogre/ThirdParty/nxogre_0.9/NxuStream2/NXU_tinyxmlparser.cpp
Removed Paths:
-------------
trunk/python-ogre/ThirdParty/nxogreOld/
Added: trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgre.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgre.h (rev 0)
+++ trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgre.h 2008-01-16 02:53:00 UTC (rev 547)
@@ -0,0 +1,90 @@
+//
+// 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_H__
+#define __NXOGRE_H__
+
+///////////////////////////////////////////
+
+#include "NxOgreStable.h"
+#include "NxOgrePrerequisites.h"
+#include "NxOgrePhysXDriver.h"
+#include "NxOgreError.h"
+#include "NxOgreLog.h"
+
+///////////////////////////////////////////
+
+#include "NxOgreActor.h"
+#include "NxOgreActorBlueprint.h"
+#include "NxOgreBody.h"
+#include "NxOgreContainer.h"
+#include "NxOgreCooking.h"
+#include "NxOgreCharacter.h"
+#include "NxOgreCharacterController.h"
+#include "NxOgreCharacterHitReport.h"
+#include "NxOgreCloth.h"
+#include "NxOgreClothRaycaster.h"
+#include "NxOgreCompound.h"
+#include "NxOgreDebugRenderer.h"
+#include "NxOgreDominanceGroup.h"
+#include "NxOgreEnumsBlueprint.h"
+#include "NxOgreFluid.h"
+#include "NxOgreFluidMesh.h"
+#include "NxOgreForceField.h"
+#include "NxOgreGroup.h"
+#include "NxOgreHelpers.h"
+#include "NxOgreJointSet1.h"
+#include "NxOgreJointSet2.h"
+#include "NxOgreHelper.h"
+#include "NxOgreIntersection.h"
+#include "NxOgreMaterial.h"
+#include "NxOgreMotor.h"
+#include "NxOgreParams.h"
+#include "NxOgrePose.h"
+#include "NxOgreRaycaster.h"
+#include "NxOgreRemoteDebuggerConnection.h"
+#include "NxOgreSerialiser.h"
+#include "NxOgreScene.h"
+#include "NxOgreSceneBlueprint.h"
+#include "NxOgreSceneController.h"
+#include "NxOgreSceneContactController.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 "NxOgreUserStream.h"
+#include "NxOgreUserAllocator.h"
+#include "NxOgreWorld.h"
+#include "NxOgreWorldBlueprint.h"
+
+#endif
Added: trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActor.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActor.cpp (rev 0)
+++ trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActor.cpp 2008-01-16 02:53:00 UTC (rev 547)
@@ -0,0 +1,1117 @@
+//
+// 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.
+
+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;
+ mSleepLinearVelocity = -1.0f;
+ mSleepAngularVelocity = -1.0f;
+ mCCDMotionThreshold = 0.0f;
+ mSolverIterationCount = 4;
+ mBodyFlags = NX_BF_ENERGY_SLEEP_TEST;
+ mSleepEnergyThreshold = -1.0f;
+ mSleepDamping = 0.0f;
+
+ mNodeScale = Ogre::Vector3(1,1,1);
+ mNodeName = "";
+ mNodeShadows = true;
+
+}
+
+//////////////////////////////////////////////////////////
+
+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;
+
+ }
+
+}
+
+//////////////////////////////////////////////////////////
+
+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");
+ mVisualIdentifier = NxString();
+ }
+ else {
+
+ std::vector<NxString> splitID = Ogre::StringUtil::split(name, ";", 2);
+
+ NxString identifier;
+
+ if (splitID.size() == 1) {
+ identifier = name;
+ mVisualIdentifier = name;
+ }
+ else {
+ identifier = splitID[0];
+ mVisualIdentifier = splitID[1];
+ Ogre::StringUtil::trim(mVisualIdentifier);
+ }
+
+ 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_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::simulate(float dT) {
+ shapeSimulate(dT);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::render(float) {
+ // No.
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::shapeSimulate(float t) {
+ for(Shape* shape = mDynamicCollisionModel.begin();shape = mDynamicCollisionModel.next();)
+ shape->simulate(t);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::shapeRender(float t) {
+ for(Shape* shape = mDynamicCollisionModel.begin();shape = mDynamicCollisionModel.next();)
+ shape->render(t);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setName(NxString name) {
+ mOwner->mActors.rename(mName, name);
+ mName = name;
+}
+
+//////////////////////////////////////////////////////////
+
+NxString Actor::getName() {
+ 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 toQuaternion(mActor->getGlobalOrientationQuat());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGlobalOrientation(const Ogre::Quaternion& quat) {
+ mActor->setGlobalOrientation(toNxQuat(quat));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getGlobalPosition() {
+ return toVector3(mActor->getGlobalPosition());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setGlobalPosition(const Ogre::Vector3& vec) {
+ mActor->setGlobalPosition(toNxVec3(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::moveGlobalPose(const Pose& pose) {
+ mActor->moveGlobalPose(pose.toMat34());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::moveGlobalPosition(const Ogre::Vector3& vec) {
+ mActor->moveGlobalPosition(toNxVec3(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::moveGlobalOrientation(const Ogre::Quaternion& quat) {
+ mActor->moveGlobalOrientationQuat(toNxQuat(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(toNxVec3(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(toNxVec3(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(toNxVec3(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 toVector3(mActor->getCMassLocalPosition());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Quaternion Actor::getCMassLocalOrientation() const {
+ return toQuaternion(mActor->getCMassLocalOrientation());
+}
+
+//////////////////////////////////////////////////////////
+
+Pose Actor::getCMassGlobalPose() const {
+ Pose pose;
+ pose.fromMat34(mActor->getCMassGlobalPose());
+ return pose;
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getCMassGlobalPosition() const {
+ return toVector3(mActor->getCMassGlobalPosition());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Quaternion Actor::getCMassGlobalOrientation() const {
+ NxQuat quat;
+ mActor->getCMassGlobalOrientation().toQuat(quat);
+ return toQuaternion(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(toNxVec3(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getMassSpaceInertiaTensor() const {
+ return toVector3(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(toNxVec3(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setAngularVelocity(const Ogre::Vector3& vec) {
+ mActor->setAngularVelocity(toNxVec3(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+
+Ogre::Vector3 Actor::getLinearVelocity() const {
+ return toVector3(mActor->getLinearVelocity());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getAngularVelocity() const {
+ return toVector3(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(toNxVec3(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::setAngularMomentum(const Ogre::Vector3& vec) {
+ mActor->setAngularMomentum(toNxVec3(vec));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getLinearMomentum() const {
+ return toVector3(mActor->getLinearMomentum());
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getAngularMomentum() const {
+ return toVector3(mActor->getAngularMomentum());
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForceAtPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addForceAtPos(toNxVec3(force), toNxVec3(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForceAtLocalPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addForceAtLocalPos(toNxVec3(force), toNxVec3(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalForceAtPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addLocalForceAtPos(toNxVec3(force), toNxVec3(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalForceAtLocalPos(const Ogre::Vector3& force, const Ogre::Vector3& pos, NxForceMode mode, bool wakeup) {
+ mActor->addLocalForceAtLocalPos(toNxVec3(force), toNxVec3(pos), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addForce(const Ogre::Vector3& force, NxForceMode mode, bool wakeup) {
+ mActor->addForce(toNxVec3(force), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalForce(const Ogre::Vector3& force, NxForceMode mode, bool wakeup) {
+ mActor->addLocalForce(toNxVec3(force), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addTorque(const Ogre::Vector3& torque, NxForceMode mode, bool wakeup) {
+ mActor->addTorque(toNxVec3(torque), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+void Actor::addLocalTorque(const Ogre::Vector3& torque, NxForceMode mode, bool wakeup) {
+ mActor->addLocalTorque(toNxVec3(torque), mode, wakeup);
+}
+
+//////////////////////////////////////////////////////////
+
+NxReal Actor::computeKineticEnergy() const {
+ return mActor->computeKineticEnergy();
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getPointVelocity(const Ogre::Vector3& vec) const {
+ return toVector3(mActor->getPointVelocity(toNxVec3(vec)));
+}
+
+//////////////////////////////////////////////////////////
+
+Ogre::Vector3 Actor::getLocalPointVelocity(const Ogre::Vector3& vec) const {
+ return toVector3(mActor->getLocalPointVelocity(toNxVec3(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(toNxVec3(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;
+}
+
+//////////////////////////////////////////////////////////
+
+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_0.9/NxOgreActor.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActor.h (rev 0)
+++ trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreActor.h 2008-01-16 02:53:00 UTC (rev 547)
@@ -0,0 +1,734 @@
+//
+// 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"
+
+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:
+
+
+ ActorParams(){setToDefault();}
+ ActorParams(const char* p) {process(p);}
+ ActorParams(NxString p) {process(p);}
+
+ void setToDefault();
+ void parse(Parameters);
+ void fromNxActorDesc(NxActorDesc&);
+ void fromNxBodyDesc(NxBodyDesc&);
+
+ ////////////////////////////////////////////////////////////////
+
+#if NX_SDK_VERSION_NUMBER >= 260
+ /// NxCompartment of the Actor to sit in.
+ /// @todo NxOgre-ify
+ /// @default NULL
+ NxCompartment* mCompartment;
+#endif
+
+ /// Density, mass must be 0 when density is used.
+ NxReal mDensity;
+
+#if NX_SDK_VERSION_NUMBER >= 272
+
+ /// DominanceGroup (as Name).
+ /// @default ""
+ NxString mDominanceGroupAsName;
+
+ /// DominanceGroup (as Index)
+ /// @default 0
+ NxDominanceGroup mDominanceGroupAsIndex;
+#endif
+
+ /// Flags for the NxActor
+ /// @see NxActorFlags
+ /// @default 0
+ NxU32 mActorFlags;
+
+
+ /// Group to use as index. GroupAsName must be blank.
+ /// @default 0
+ NxActorGroup mGroupAsIndex;
+
+
+ /// Group to use from name. GroupAsIndex must be 0.
+ /// @default Blank String
+ NxString mGroupAsName;
+
+
+ ////////////////////////////////////////////////////////////////
+
+
+ /// Angular Damping
+ NxReal mAngularDamping;
+
+
+ /// Angular Velocity
+ NxVec3 mAngularVelocity;
+
+
+ ///
+ NxReal mCCDMotionThreshold;
+
+
+ ///
+ NxU32 mBodyFlags;
+
+
+ ///
+ NxReal mLinearDamping;
+
+
+ ///
+ NxVec3 mLinearVelocity;
+
+
+ /// Mass of the Actor. When used, make sure density is zero.
+ NxReal mMass;
+
+
+ ///
+ NxMat34 mMassLocalPose;
+
+ ///
+ NxVec3 mMassSpaceInertia;
+
+
+ ///
+ NxReal mMaxAngularVelocity;
+
+ ///
+ NxReal mSleepAngularVelocity;
+
+
+ ///
+ NxReal mSleepDamping;
+
+
+ ///
+ NxReal mSleepEnergyThreshold;
+
+
+ ///
+ NxReal mSleepLinearVelocity;
+
+
+ ///
+ NxU32 mSolverIterationCount;
+
+
+ ///
+ NxReal mWakeUpCounter;
+
+
+ ////////////////////////////////////////////////////////////////
+
+
+ /// SceneNode for Visual based Actors. If the node already exists then it will use it.
+ NxString mNodeName;
+
+ /// Scale the SceneNode for Visual based Actors
+ Ogre::Vector3 mNodeScale;
+
+ /// Set the first Entity of the Visual based Actors to have shadows or not.
+ bool mNodeShadows;
+
+
+
+ }; // End of ActorParams class
+
+ class NxExport Actor {
+
+ public:
+
+ Actor(const NxString& Identifier, Scene*, bool isActorBased = true);
+ Actor(const NxString& Identifier, Scene*, ShapeBlueprint*, const Pose&, ActorParams = ActorParams());
+ virtual ~Actor();
+
+ //////////////////////////////////////////////////////////
+
+ Scene* getScene() {
+ return mOwner;
+ }
+
+ NxScene* getNxScene();
+
+ //////////////////////////////////////////////////////////
+
+ virtual bool hasVisualisation() const {return false;}
+ virtual void simulate(float);
+ virtual void render(float);
+ virtual void shapeSimulate(float);
+ virtual void shapeRender(float);
+ bool isDead() { return (mActor == NULL); }
+
+
+ /** Duplicate this actor
+
+ @param name Name of the new Actor
+ @param pose Position/Orientation of the new actor.
+
+ @note
+ This function is rather slow and inefficent when used repeatedly. Use a ActorBlueprint instead to
+ keep a single blueprint of the actor and create as many as you want from that.
+
+ */
+ Actor* duplicate(const NxString& name, const Pose& p);
+
+ //////////////////////////////////////////////////////////
+
+ void _createActor(ShapeBlueprint*,const Pose&,ActorParams params);
+ void _destroyActor();
+
+ NxActor* getNxActor(){return mActor;}
+
+ //////////////////////////////////////////////////////////
+
+ void setName(NxString);
+ NxString getName();
+
+ ////////////////////////////////////////////////////////
+
+ void setGlobalPose(const Pose&);
+ Pose getGlobalPose();
+
+ Ogre::Quaternion getGlobalOrientation();
+ void setGlobalOrientation(const Ogre::Quaternion&);
+
+ Ogre::Vector3 getGlobalPosition();
+ void setGlobalPosition(const Ogre::Vector3&);
+
+ void moveGlobalPose(const Pose&);
+ void moveGlobalPosition(const Ogre::Vector3&);
+ void moveGlobalOrientation(const Ogre::Quaternion&);
+
+ void moveTowards(const Pose&, float force = 10.0f);
+
+ //////////////////////////////////////////////////////////
+
+ Shape* addShape(ShapeBlueprint*);
+ void removeShape(Shape*);
+ void removeShape(NxShapeIndex);
+ NxU32 getNbShapes() const;
+ CollisionModel* getCollisionModel();
+ CollisionModel* getDynamicCollisionModel();
+
+ //////////////////////////////////////////////////////////
+
+ void setGroup(ActorGroup*);
+ void setGroup(const NxString& GroupIdentifier);
+ void setGroup(NxActorGroup);
+ ActorGroup* getGroup() const;
+
+ //////////////////////////////////////////////////////////
+
+ void raiseActorFlag(NxActorFlag);
+ void clearActorFlag(NxActorFlag);
+ bool hasActorFlag(NxActorFlag) const;
+ bool isDynamic() const;
+
+ //////////////////////////////////////////////////////////
+
+ void setCMassOffsetLocalPose(const Pose&);
+ void setCMassOffsetLocalPosition(const Ogre::Vector3&);
+ void setCMassOffsetLocalOrientation(const NxMat33&);
+ void setCMassOffsetLocalOrientation(const Ogre::Matrix3&);
+ void setCMassOffsetGlobalPose(const Pose&);
+ void setCMassOffsetGlobalPosition(const Ogre::Vector3&);
+ void setCMassOffsetGlobalOrientation(const NxMat33&);
+ void setCMassOffsetGlobal...
[truncated message content] |