Revision: 601
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=601&view=rev
Author: andy_miller
Date: 2008-06-21 23:20:23 -0700 (Sat, 21 Jun 2008)
Log Message:
-----------
Tyring (again) to get my nxogre source cleaned up..
Removed Paths:
-------------
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/NxOgreCollisionModel.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsDefinesTypedefs.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreGlobalFunctions.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreInflatable.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/NxOgreKinematicCharacter.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacterSweep.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/NxOgreMemoryStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreNXM.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreNXM.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/NxOgreOBJStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreOBJStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceStream.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Cloth.cpp
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/NxOgreSerialiser.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreSerialiser.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/NxOgreState.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreStateMachine.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreTestIdea.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreTransitionalMesh.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreTransitionalMesh.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserData.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserStream.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreUserStream.h
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,186 +0,0 @@
-/** \file NxOgreCharacter.cpp
- * \see NxOgreCharacter.h
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-
-#include "NxOgreCharacter.h"
-#include "NxOgreScene.h"
-#include "NxOgreNxActorController.h"
-#include "NxOgreKinematicCharacter.h"
-
-#include "NxOgreCharacterModel.h"
-#include "NxOgreCharacterMovementModel.h"
-
-#include "NxOgreVoidPointer.h"
-#include "NxOgreTimeStep.h"
-
-namespace NxOgre {
-namespace CharacterSystem {
-
-/////////////////////////////////////////////////////////////
-
-void CharacterParams::setToDefault() {
-
-#if (NX_USE_CHARACTER_API == 1)
- mControllerType = CT_KINEMATIC;
-#else
- mControllerType = CT_NXACTOR;
-#endif
-
- mControllerPtr = 0;
- mStepOffset = 0.0f;
- mSlopeLimit = 0.0f;
- mUpDirection = NX_AXIS_PLUS_Y;
- //mGroupMask;
- mControllerCollisionShape = 0;
-
-}
-
-/////////////////////////////////////////////////////////////
-
-Character::Character(const NxString& identifier, Pose pose, CharacterModel* model, CharacterParams params, Scene* scene)
-: mName(identifier), mModel(model), mOwner(scene), mVoidPointer(0)
-{
-
- if (model == 0) {
- NxThrow("Character Model pointer is null!");
- mDead = true;
- return;
- }
-
- if (params.mControllerType == params.CT_PTR && params.mControllerPtr == 0) {
- NxThrow("ControllerType is custom but given pointer is null!");
- mDead = true;
- return;
- }
-
- mVoidPointer = new VoidPointer(this, NxOgreClass_Character);
-
- // (TODO) Pass on voidpointer to controllers here.
- if (params.mControllerType == CharacterParams::CT_NXACTOR) {
- mController = NxNew(NxActorController)(pose, params.mControllerCollisionShape, scene, mVoidPointer);
- }
-#if (NX_USE_CHARACTER_API == 1)
- else if (params.mControllerType == CharacterParams::CT_KINEMATIC) {
- mController = NxNew(KinematicCharacter)(pose, params.mControllerCollisionShape, scene, mVoidPointer);
- }
-#endif
- else {
- mController = params.mControllerPtr;
- NxWatch(CharacterController, mController);
- }
-
- // Watch Model and set the garbage collection mode.
- NxWatch(CharacterModel, mModel);
- mModel->setGC();
-
- // Current movement model to default.
- mCurrentMovement = mModel->mDefaultMovementModel;
-
- // Reset all movemenet models to this.
- for (CharacterMovementModel* model = mModel->mMovementModels.begin(); model = mModel->mMovementModels.next();) {
- model->reset(this);
- }
-
- mCurrentMovement->enter(0, mController->getPose());
-
- mOwner->_registerCharacter(mName, this);
-}
-
-/////////////////////////////////////////////////////////////
-
-Character::~Character() {
-
- mOwner->_unregisterCharacter(mName);
-
- mCurrentMovement->exit();
-
- // Delete bleh bleh here.
- if (mModel->mDeletionPolicy == GC_Delete)
- NxDelete(mModel);
-
-
- delete mController;
- delete mVoidPointer;
-
-}
-
-/////////////////////////////////////////////////////////////
-
-void Character::simulate(const TimeStep& ts) {
-
- mCurrentMovement->simulate(ts.Delta);
-
- // get new movement vector
- const NxVec3 movementVector = mCurrentMovement->getGlobalMovementVector(ts.Delta);
-
- // get controller to move that vector.
- mController->move(movementVector);
-
- mCurrentMovement->setPose(mController->getPose());
- mCurrentMovement->simulateAfter(ts.Delta);
-
-}
-
-/////////////////////////////////////////////////////////////
-
-void Character::forward() {
- mCurrentMovement->forward();
-}
-
-/////////////////////////////////////////////////////////////
-
-void Character::backward() {
- mCurrentMovement->backward();
-}
-
-/////////////////////////////////////////////////////////////
-
-void Character::left() {
- mCurrentMovement->left();
-}
-
-/////////////////////////////////////////////////////////////
-
-void Character::right() {
- mCurrentMovement->right();
-}
-
-/////////////////////////////////////////////////////////////
-
-void Character::up() {
- mCurrentMovement->up();
-}
-
-/////////////////////////////////////////////////////////////
-
-void Character::down() {
- mCurrentMovement->down();
-}
-
-/////////////////////////////////////////////////////////////
-
-}; // End of Character namespace.
-}; // End of NxOgre namespace.
-
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,199 +0,0 @@
-/** \file NxOgreCharacter.h
- * \brief Header for the CharacterParams and Character classes.
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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_CHARACTER_H__
-#define __NXOGRE_CHARACTER_H__
-
-#include "NxOgrePrerequisites.h"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-
-#include "NxOgreParams.h"
-#include "NxOgrePose.h"
-
-namespace NxOgre {
-namespace CharacterSystem {
-
-
- class NxPublicClass CharacterParams : public Params {
-
- public:
-
- CharacterParams() {
- setToDefault();
- }
-
- CharacterParams(const char* p) {
- process(p);
- }
-
- CharacterParams(NxString p) {
- process(p);
- }
-
- void setToDefault();
-
- enum ControllerType {
-#if (NX_USE_CHARACTER_API == 1)
- CT_KINEMATIC,
-#endif
- CT_NXACTOR,
- CT_PTR
- };
-
- ControllerType mControllerType;
- CharacterController* mControllerPtr;
-
- NxReal mStepOffset;
- NxRadian mSlopeLimit;
- NxAxisType mUpDirection;
- NxGroupsMask mGroupMask;
-
- /** \brief Collision shape for NxActor and NxCharacter controllers.
- \note The function "setToDefault" sets the pointer to zero. You
- have to assign one after setting the basic params using
- the new operator or the SimpleShape::createShapeFromString method
-
- \see Controllers for what shapes they can and cannot use
- \see SimpleShape::createShapeFromString
-
-
- */
-
- SimpleShape* mControllerCollisionShape;
-
-
- };
-
- /////////////////////////////////////////////////////////
-
- /** Character
-
- */
- class NxPublicClass Character {
-
- public:
-
- enum LocalMovementDirection {
- LMD_FORWARD = 0,
- LMD_BACKWARD = 1,
- LMD_LEFT = 2,
- LMD_RIGHT = 3,
- LMB_UP = 4,
- LMB_DOWN = 5
- };
-
- Character(const NxString& identifier, Pose, CharacterModel*, CharacterParams, Scene*);
- virtual ~Character();
-
- NxString getName() const {return mName;}
-
- virtual void simulate(const TimeStep&);
-
- CharacterController* getController() const {
- return mController;
- }
-
- CharacterModel* getModel() const {
- return mModel;
- }
-
- CharacterMovementModel* getCurrentMovementModel() const {
- return mCurrentMovement;
- }
-
- void setModel(CharacterModel* newModel) {
- mModel = newModel;
- resetMovement();
- }
-
- void resetMovement() {}
- void setMovement(NxString movement);
- void setMovement(Ogre::Vector3 movementVector);
- void setLocalMovement(Ogre::Vector3 movementVector);
-
- inline void forward();
- inline void backward();
- inline void left();
- inline void right();
- inline void up();
- inline void down();
-
- void injectMovement(LocalMovementDirection);
- void setDirection(const NxQuat& orientation);
- void setDirection(const Ogre::Quaternion& orientation);
- void moveTowards(Ogre::Vector3 globalPosition, NxReal force);
- void setYaw(NxRadian Yaw);
- void setYaw(Ogre::Radian Yaw);
- void setPitch(NxRadian Pitch);
- void setPitch(Ogre::Radian Pitch);
- void setRoll(NxRadian Roll);
- void setRoll(Ogre::Radian Roll);
-
-
- /** \brief Forces height to a new one, without a transitional movement period.
- Forces the local height of the character shape to a new one whilst moving
- the character to half-height below.
-
- \param height Height of the character
- */
- void setHeight(NxReal height);
-
-
- /** \brief Forces height to a new one, with a transitional movement period.
- Forces the local height of the character shape to a new one whilst leaving it
- at the existing position. Naturaly gravity or a custom vector will kick in and
- move the character into the correct new position over the upcoming frames.
-
- \param height Height of the character
- */
- void changeHeight(NxReal height);
-
- void setSize(const NxVec3& size);
- void setSize(const float2& size);
-
- void setGravityEnabled(bool);
- bool isGravityEnabled();
-
- bool isDead() const {return mDead;}
-
- protected:
-
- CharacterController* mController;
- CharacterModel* mModel;
- CharacterMovementModel* mCurrentMovement;
-
- NxString mName;
- Scene* mOwner;
- VoidPointer* mVoidPointer;
-
- private:
-
- bool mDead;
-
- };
-
- ////////////////////////////////////////////
-};// End of CharacterSystem
-};// End of namespace
-
-#endif
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,45 +0,0 @@
-/** \file NxOgreCharacterController.cpp
- * \see NxOgreCharacterController.h
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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 "NxOgreCharacterController.h"
-
-namespace NxOgre {
-namespace CharacterSystem {
-
-////////////////////////////////////////////////////
-
-CharacterController::CharacterController(Scene* scene, VoidPointer*)
-: mScene(scene) {
-
-}
-
-////////////////////////////////////////////////////
-
-CharacterController::~CharacterController() {
-
-}
-
-////////////////////////////////////////////////////
-
-}; // End of CharacterSystem namespace.
-}; // End of NxOgre namespace.
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,96 +0,0 @@
-/** \file NxOgreCharacterController.h
- * \brief Header for the CharacterController class.
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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_CHARACTER_CONTROLLER_H__
-#define __NXOGRE_CHARACTER_CONTROLLER_H__
-
-#include "NxOgrePrerequisites.h"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-
-namespace NxOgre {
-namespace CharacterSystem {
-
- class NxPublicClass CharacterController {
-
- friend class Character;
-
- public:
-
- CharacterController(Scene*, VoidPointer*);
- virtual ~CharacterController();
-
- virtual NxActorGroup getActorGroup() {return 0;}
- virtual NxCollisionGroup getCollisionGroup() {return 0;}
-
- virtual void setActorGroup(NxActorGroup) {}
- virtual void setCollisionGroup(NxCollisionGroup) {}
-
- virtual void init(NxMat34 pose) {}
-
- virtual void move(const NxVec3& direction) {}
-
- virtual void setPosition(const NxVec3& position) {}
- virtual NxVec3 getPosition() const {return NxVec3(0,0,0);}
-
- virtual void setOrientation(const NxQuat& orientation) {}
- virtual NxQuat getOrientation() const {NxQuat quat;quat.id();return quat;}
-
- virtual NxMat34 getPose() const {NxMat34 m;m.id();return m;}
-
- virtual void setSize(const NxVec3& size) {}
- virtual void getSize(NxVec3& size) {}
-
- virtual void setSize(const float2& size) {}
- virtual void getSize(float2& size) {}
-
- virtual void setStepSize(NxReal stepSize) {}
- virtual NxReal getStepSize() const {return 0;}
-
- virtual void setSlopeLimit(NxRadian slopeLimit) {}
- virtual NxRadian getSlopeLimit() const {return 0;}
-
- virtual void setGravityEnabled(bool gravity) {}
- virtual bool getGravityEnabled() const {return false;}
-
- virtual void setUpDirection(NxVec3 upDirection) {}
- virtual NxVec3 getUpDirection() const {return NxVec3(0,0,0);}
-
-
- virtual NxString getType() { return NxString("CharacterController"); };
-
- /////////////////////////////////////////////////
-
- Scene* mScene;
-
- private:
-
-
- };
-
- ////////////////////////////////////////////
-
-};// End of CharacterSystem namespace.
-};// End of NxOgre namespace.
-
-#endif
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,26 +0,0 @@
-/** \file NxOgreCharacterModel.cpp
- * \see NxOgreCharacterModel.h
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-# include "NxOgreCharacterModel.h"
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,63 +0,0 @@
-/** \file NxOgreCharacterModel.h
- * \brief Header for the CharacterModel class.
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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_CHARACTER_MODEL_H__
-#define __NXOGRE_CHARACTER_MODEL_H__
-
-#include "NxOgrePrerequisites.h"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-
-#include "NxOgreContainer.h"
-
-namespace NxOgre {
-namespace CharacterSystem {
-
- class NxPublicClass CharacterModel {
-
- friend class Character;
-
- public:
-
- virtual ~CharacterModel() {}
-
- CharacterMovementModel* mDefaultMovementModel;
- CharacterMovementModels mMovementModels;
-
- protected:
-
- virtual void setGC() {
- mDeletionPolicy = GC_Delete;
- }
-
- GarbageCollectionPolicy mDeletionPolicy;
-
- private:
-
- };
-
- ////////////////////////////////////////////
-
-}; // End of CharacterSystem namespace.
-}; // End of NxOgre namespace.
-
-#endif
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,28 +0,0 @@
-/** \file NxOgreCharacterMovementModel.cpp
- * \see NxOgreCharacterMovementModel.h
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-
-#include "NxOgreCharacterMovementModel.h"
-
-
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,95 +0,0 @@
-/** \file NxOgreCharacterMovementModel.h
- * \brief Header for the CharacterMovementModel class.
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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_CHARACTER_MOVEMENT_MODEL_H__
-#define __NXOGRE_CHARACTER_MOVEMENT_MODEL_H__
-
-#include "NxOgrePrerequisites.h"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-
-#include "NxOgreHelpers.h"
-
-namespace NxOgre {
-namespace CharacterSystem {
-
- class NxPublicClass CharacterMovementModel {
-
- public:
-
- virtual void enter(CharacterMovementModel* from, NxMat34 pose) {mPose = pose;mMovement.zero();mOrientation.id();}
- virtual NxMat34 exit() {return mPose;}
-
- virtual void simulate(NxReal dTime) {}
- virtual void simulateAfter(NxReal dTime) {}
- virtual void reset(Character* c) {mCharacter = c;}// mPose = c->getPose();}
- virtual void forward() {}
- virtual void backward() {}
- virtual void left() {}
- virtual void right() {}
- virtual void up() {}
- virtual void down() {}
-
- virtual void setYaw(NxRadian yaw) {
- // mOrientation
- }
-
- void setPose(NxMat34 pose) {mPose = pose;}
- virtual void setPitch(NxRadian pitch) {}
- virtual void setRoll(NxRadian roll) {}
-
- virtual void setOrientation(NxQuat orientation) {}
- virtual NxQuat getOrientation() { NxQuat quat;
- mPose.M.toQuat(quat);
- return quat;}
-
- virtual NxString getType() {return NxString("Default");}
-
- virtual NxVec3 getGlobalMovementVector(NxReal dT) {
- return (mOrientation * mMovement) * dT;
- }
-
- virtual NxVec3 getMovementVector() {
- return mMovement;
- }
-
- virtual NxQuat getGlobalOrientation() {
- return mOrientation;
- }
-
- protected:
-
- Character* mCharacter;
- NxMat34 mPose;
- NxVec3 mMovement;
- NxQuat mOrientation;
-
- private:
-
- };
-
- ////////////////////////////////////////////
-
-}; // End of CharacterSystem namespace.
-}; // End of NxOgre namespace.
-
-#endif
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,70 +0,0 @@
-/** \file NxOgreCharacterSystem.cpp
- * \see NxOgreCharacterSystem.h
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0 && NX_USE_CHARACTER_API == 1)
-
-#include "NxOgreCharacterSystem.h"
-
-namespace NxOgre {
-
-/////////////////////////////////////////////////////////////
-
-CharacterSystem::CharacterSystem(World* world) : mWorld(world) {
-
-}
-
-/////////////////////////////////////////////////////////////
-
-CharacterSystem::~CharacterSystem() {
- mCharacters.destroyAllOwned();
-}
-
-/////////////////////////////////////////////////////////////
-
-void CharacterSystem::createCharacter(NxString identifier, Pose, CharacterModel*, CharacterParams params) {
-
-}
-
-/////////////////////////////////////////////////////////////
-
-void CharacterSystem::createPerformer(NxString visualIdentifier, Pose, CharacterModel*, CharacterParams params) {
-
-}
-
-/////////////////////////////////////////////////////////////
-
-void CharacterSystem::destroyCharacter(NxString identifier) {
-
-}
-
-/////////////////////////////////////////////////////////////
-
-Character* CharacterSystem::getCharacter(NxString identifier) {
- return mCharacters.get(identifier);
-}
-
-/////////////////////////////////////////////////////////////
-
-};
-
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,81 +0,0 @@
-/** \file NxOgreCharacterSystem.h
- * \brief Header for the CharacterSystem class.
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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_CHARACTER_SYSTEM_H__
-#define __NXOGRE_CHARACTER_SYSTEM_H__
-
-#include "NxOgrePrerequisites.h"
-
-#if (NX_USE_LEGACY_NXCONTROLLER == 0)
-
-#include "NxOgreContainer.h"
-#include "NxOgreCharacter.h"
-
-#if (NX_USE_CHARACTER_API == 1)
-# include "NxControllerManager.h"
-#endif
-
-namespace NxOgre {
-
- ////////////////////////////////////////////////////////////////////////
-
- class NxPublicClass CharacterSystem {
-
- public:
-
- CharacterSystem(World*);
- ~CharacterSystem();
-
-#if (NX_USE_CHARACTER_API == 1)
- /** Return's a copy of the instance of the Controller Manager
- \return NxControllerManager
- */
- NxControllerManager* getControllerManager() {
- return mControllerManager;
- }
-#endif
-
- void createCharacter(NxString identifier, Pose, CharacterModel*, CharacterParams = CharacterParams());
- void createPerformer(NxString visualIdentifier, Pose, CharacterModel*, CharacterParams = CharacterParams());
-
- void destroyCharacter(NxString identifier);
- Character* getCharacter(NxString identifier);
-
- protected:
-
- Characters mCharacters;
-
- private:
-
-#if (NX_USE_CHARACTER_API == 1)
- NxControllerManager* mControllerManager;
-#endif
-
- World* mWorld;
-
- };
-
- ////////////////////////////////////////////////////////////////////////
-
-};// End of namespace
-
-#endif
-#endif
\ No newline at end of file
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCollisionModel.h
===================================================================
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,20 +0,0 @@
-//
-// 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"
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,24 +0,0 @@
-//
-// 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
-//
-
-
-
-//
-// Reserved for Compound Actors.
-//
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,270 +0,0 @@
-/** \file NxOgreCooking.cpp
- * \see NxOgreCooking.h
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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 "NxOgreCooking.h"
-#include "NxOgreMemoryStream.h"
-#include "NxCooking.h"
-#include "NxOgreHelpers.h"
-
-#include "OgreImage.h"
-#include "OgreResourceGroupManager.h"
-#include "OgreRoot.h"
-#include "OgreSingleton.h"
-#include "OgreMesh.h"
-#include "OgreSubMesh.h"
-#include "OgreVector3.h"
-
-namespace NxOgre {
-
-
-#if 0
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-NxHeightField* NxGenerateHeightFieldFromImage(const NxString& imageFilename, unsigned int nbRows,NxScene *scene) {
-
- Ogre::Image img;
- img.load(imageFilename, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
-
- unsigned int imageSize = img.getWidth();
-
- NxHeightFieldDesc heightFieldDesc;
- heightFieldDesc.nbColumns = nbRows;
- heightFieldDesc.nbRows = nbRows;
- heightFieldDesc.verticalExtent = -1000;
- heightFieldDesc.convexEdgeThreshold = 0;
-
- // Allocate storage for heightfield samples
- heightFieldDesc.samples = new NxU32[imageSize * imageSize];
- heightFieldDesc.sampleStride = sizeof(NxU32);
-
- char* currentByte = (char*) heightFieldDesc.samples;
- int gMatrixSize = 3;
- NxReal sixtyFourKb = 65536.0;
- NxReal thirtyTwoKb = 32768.0;
-
- NxMaterialIndex gMatrix[9][3] = {
- // {tesselation, material0, material1}
- {0,1,1}, {0,1,1}, {0,1,1},
- {0,1,1}, {0,1,1}, {0,1,1},
- {0,1,1}, {0,1,1}, {0,1,1}
- };
- const Ogre::uchar* pSrc = img.getData();
-
- for (NxU32 row = 0; row < nbRows; row++) {
- for (NxU32 column = 0; column < nbRows; column++) {
-
- NxU32 matrixOffset = (row % gMatrixSize) * gMatrixSize + (column % gMatrixSize);
-
- NxReal s = NxReal(row) / NxReal(nbRows);
- NxReal t = NxReal(column) / NxReal(nbRows);
-
- NxHeightFieldSample* currentSample = (NxHeightFieldSample*)currentByte;
- float colorValue = img.getColourAt (row, column,0).r;
-
- currentSample->height = img.getColourAt (row, column,0).r * 32768.0f;
-
- currentSample->materialIndex0 = gMatrix[matrixOffset][1];
- currentSample->materialIndex1 = gMatrix[matrixOffset][2];
- currentSample->tessFlag = gMatrix[matrixOffset][0];
-
- currentByte += heightFieldDesc.sampleStride;
- }
- }
-
- NxHeightField *hf = scene->getPhysicsSDK().createHeightField(heightFieldDesc);
-
- delete [] heightFieldDesc.samples;
-
- return hf;
-
-}
-#endif
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-NxHeightField* NxGenerateHeightFieldFromImage(const NxString& imageFilename, NxScene* scene) {
-
- Ogre::Image img;
- img.load(imageFilename, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
-
- NxU32 imageWidth = img.getWidth();
- NxU32 imageHeight = img.getHeight();
-
- NxHeightFieldDesc heightFieldDesc;
-
- heightFieldDesc.nbRows = imageWidth;
- heightFieldDesc.nbColumns = imageHeight;
- heightFieldDesc.verticalExtent = -1000;
- heightFieldDesc.convexEdgeThreshold = 0;
-
- // Allocate storage for heightfield samples
- heightFieldDesc.samples = new NxU32[imageWidth * imageHeight];
- heightFieldDesc.sampleStride = sizeof(NxU32);
-
- char* currentByte = (char*) heightFieldDesc.samples;
- int gMatrixSize = 3;
-
- NxMaterialIndex gMatrix[9][3] = {
- // {tesselation, material0, material1}
- {0,1,1}, {0,1,1}, {0,1,1},
- {0,1,1}, {0,1,1}, {0,1,1},
- {0,1,1}, {0,1,1}, {0,1,1}
- };
- const Ogre::uchar* pSrc = img.getData();
- NxReal colourValue = 0;
-
- for (NxU32 row = 0; row < imageWidth; row++) {
- for (NxU32 column = 0; column < imageHeight; column++) {
-
- NxU32 matrixOffset = (row % gMatrixSize) * gMatrixSize + (column % gMatrixSize);
-
- NxReal s = NxReal(row) / NxReal(imageWidth);
- NxReal t = NxReal(column) / NxReal(imageHeight);
-
- NxHeightFieldSample* currentSample = (NxHeightFieldSample*) currentByte;
- colourValue = img.getColourAt (row, column,0).r;
-
- currentSample->height = colourValue * 32768.0f;
-
- currentSample->materialIndex0 = gMatrix[matrixOffset][1];
- currentSample->materialIndex1 = gMatrix[matrixOffset][2];
- currentSample->tessFlag = gMatrix[matrixOffset][0];
-
- currentByte += heightFieldDesc.sampleStride;
- }
- }
-
- NxHeightField *hf = scene->getPhysicsSDK().createHeightField(heightFieldDesc);
-
-#ifdef NX_PLATFORM_LINUX
- delete [] (NxU32*) heightFieldDesc.samples;
-#else
- delete [] heightFieldDesc.samples;
-#endif
-
- return hf;
-
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-NxHeightField* NxGenerateHeightFieldFromRaw(const NxString& imageFilename, NxScene* scene) {
-
- Ogre::MemoryDataStreamPtr mRawData;
- mRawData.setNull();
-
- Ogre::DataStreamPtr stream = Ogre::ResourceGroupManager::getSingleton().openResource(imageFilename);
- mRawData = Ogre::MemoryDataStreamPtr(new Ogre::MemoryDataStream(imageFilename, stream));
-
- // Work out the Image size by the size of the file. This algorithm only works if the texture is square. But since
- // Ogre terrain works this way as well, it isn't much of a problem.
- NxU32 fileLength = mRawData->size();
- NxReal width = NxMath::sqrt(NxReal(fileLength));
- bool is8bit = true;
-
- // Check to see if the image is 16-bit. The square root of all image filesizes which are 16-bit, produce a non-integer
- // number. To get the real imageWidth, the fileLength is halfed and square-rooted again, which produces an integer.
- if (NxU32(NxMath::floor(width)) != width) {
- width = NxMath::sqrt(NxReal(fileLength * 0.5f));
- is8bit = false;
- }
-
- /// And here we go.
-
- NxHeightFieldDesc heightFieldDesc;
- heightFieldDesc.nbColumns = width;
- heightFieldDesc.nbRows = width;
- heightFieldDesc.verticalExtent = -1000;
- heightFieldDesc.convexEdgeThreshold = 0;
-
- // Allocate storage for heightfield samples
- heightFieldDesc.samples = new NxU32[heightFieldDesc.nbRows * heightFieldDesc.nbColumns];
- heightFieldDesc.sampleStride = sizeof(NxU32);
-
- char* currentByte = (char*) heightFieldDesc.samples;
- NxU32 gMatrixSize = 3;
-
- NxMaterialIndex gMatrix[9][3] = {
- // {tesselation, material0, material1}
-
- {0,1,1}, {0,1,1}, {0,1,1},
-
- {0,1,1}, {0,1,1}, {0,1,1},
-
- {0,1,1}, {0,1,1}, {0,1,1}
-
- };
-
- const Ogre::uchar* pSrc = mRawData->getPtr();
-
- NxU32 i = 0;
- NxReal height = 0;
- NxI16 short_height = 0;
-
- for (NxU32 row = 0; row < width; row++) {
- for (NxU32 column = 0; column < width; column++) {
-
- NxU32 matrixOffset = (row % gMatrixSize) * gMatrixSize + (column % gMatrixSize);
-
- NxReal s = NxReal(row) / NxReal(width);
- NxReal t = NxReal(column) / NxReal(width);
-
- NxHeightFieldSample* currentSample = (NxHeightFieldSample*)currentByte;
-
- i = row + (column * width);
-
- if (is8bit) {
- height = pSrc[i];
- height *= 257.0f;
- short_height = height;
- short_height -= 32768;
- }
- else {
- i*=2;
- short_height = pSrc[i];
- short_height += pSrc[i + 1] << 8;
- short_height -= 32768;
- }
-
- currentSample->height = short_height;
- currentSample->materialIndex0 = gMatrix[matrixOffset][1];
- currentSample->materialIndex1 = gMatrix[matrixOffset][2];
- currentSample->tessFlag = gMatrix[matrixOffset][0];
-
- currentByte += heightFieldDesc.sampleStride;
- }
- }
-
- NxHeightField *hf = scene->getPhysicsSDK().createHeightField(heightFieldDesc);
-
-#ifdef NX_PLATFORM_LINUX
- delete [] (NxU32*) heightFieldDesc.samples;
-#else
- delete [] heightFieldDesc.samples;
-#endif
-
- return hf;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-}; //End of NxOgre namespace.
-
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,36 +0,0 @@
-/** \file NxOgreCooking.h
- * \brief Header for the NxGenerateHeightField functions.
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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_COOKING_H__
-#define __NXOGRE_COOKING_H__
-
-#include "NxOgrePrerequisites.h"
-
-namespace NxOgre {
-
- // Heightfields
- NxPublicClass NxHeightField* NxGenerateHeightFieldFromImage(const NxString& imageFilename, NxScene*);
- NxPublicClass NxHeightField* NxGenerateHeightFieldFromRaw(const NxString& imageFilename, NxScene*);
-
-};
-
-#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,208 +0,0 @@
-/** \file NxOgreDynamicMesh.cpp
- * \see NxOgreDynamicMesh.h
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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 "NxOgreDynamicMesh.h"
-#include "NxOgreResourceMesh.h"
-
-namespace NxOgre {
-
-/////////////////////////////////////////////////////////////////////
-
-DynamicMesh::DynamicMesh()
-: mNbVertices(0), mVertices(0), mNbNormals(0),
- mNormals(0), mNbIndices(0), mIndices(0),
- mNbTextureCoordinates(0), mTextureCoordinates(0)
-{
- // Empty Constructor
-}
-
-/////////////////////////////////////////////////////////////////////
-
-DynamicMesh::~DynamicMesh() {
- if (mNbTextureCoordinates)
- free(mTextureCoordinates);
-
- if (mNbNormals)
- free(mNormals);
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::replaceVertices(NxVec3* vertices, NxU32 nbVertices) {
-
- if (mVertices == 0) {
- mVertices = (NxVec3*) malloc(nbVertices * sizeof(NxVec3));
- mNbVertices = nbVertices;
- }
- else if (nbVertices != mNbVertices) {
- free(mVertices);
- mVertices = (NxVec3*) malloc(nbVertices * sizeof(NxVec3));
- mNbVertices = nbVertices;
- }
-
- memcpy(mVertices, vertices, sizeof(NxVec3) * nbVertices);
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::replaceNormals(NxVec3* normals, NxU32 nbNormals) {
-
- if (mNormals == 0) {
- mNormals = (NxVec3*) malloc(nbNormals * sizeof(NxVec3));
- mNbNormals = nbNormals;
- }
- else if (nbNormals != mNbNormals) {
- free(mNormals);
- mNormals = (NxVec3*) malloc(nbNormals * sizeof(NxVec3));
- mNbNormals = nbNormals;
- }
-
- memcpy(mNormals, normals, sizeof(NxVec3) * nbNormals);
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::replaceIndices(NxU32* indices, NxU32 nbIndices) {
-
- if (mIndices == 0) {
- mIndices = (NxU32*) malloc(nbIndices * sizeof(NxU32));
- mNbIndices = nbIndices;
- }
- else if (nbIndices != mNbIndices) {
- free(mIndices);
- mIndices = (NxU32*) malloc(nbIndices * sizeof(NxU32));
- mNbIndices = nbIndices;
- }
-
- memcpy(mIndices, indices, sizeof(NxU32) * nbIndices);
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::replaceTextureCoordinates(float2* coords, NxU32 nbCoords) {
-
- if (mTextureCoordinates == 0) {
- mTextureCoordinates = (float2*) malloc(nbCoords * sizeof(float2));
- mNbTextureCoordinates = nbCoords;
- }
- else if (nbCoords != mNbTextureCoordinates) {
- free(mTextureCoordinates);
- mTextureCoordinates = (float2*) malloc(nbCoords * sizeof(float2));
- mNbTextureCoordinates = nbCoords;
- }
-
- memcpy(mTextureCoordinates, coords, sizeof(float2) * nbCoords);
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::referenceVertices(NxVec3* vertices, NxU32 nbVertices, bool gc) {
-
- if (gc && mVertices)
- free(mVertices);
-
- mVertices = vertices;
- mNbVertices = nbVertices;
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::referenceNormals(NxVec3* normals, NxU32 nbNormals, bool gc) {
-
- if (gc && mNormals)
- free(mNormals);
-
- mNormals = normals;
- mNbNormals = nbNormals;
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::referenceIndices(NxU32* indices, NxU32 nbIndices, bool gc) {
-
- if (gc && mIndices)
- free(mIndices);
-
- mIndices = indices;
- mNbIndices = nbIndices;
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicMesh::referenceTextureCoordinates(float2* coords, NxU32 nbCoords, bool gc) {
-
- if (gc && mTextureCoordinates)
- free(mTextureCoordinates);
-
- mTextureCoordinates = coords;
- mNbTextureCoordinates = nbCoords;
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-
-DynamicClothMesh::DynamicClothMesh(NxClothMesh* meshPtr)
-: DynamicMesh() {
- mMeshPtr = meshPtr;
-}
-
-/////////////////////////////////////////////////////////////////////
-
-DynamicClothMesh::~DynamicClothMesh() {
- // Empty. Parent constructor will do the clean up.
-}
-
-/////////////////////////////////////////////////////////////////////
-
-NxClothMesh* DynamicClothMesh::getMeshPtr() {
- return mMeshPtr;
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicClothMesh::fromClothMeshIntermediary(ClothMeshIntermediary* cmi) {
- std::cout << "Vertices '" << cmi->mVertices << "' , size " << cmi->mNbVertices << std::endl;
- replaceVertices(cmi->mVertices, cmi->mNbVertices);
- std::cout << mVertices << std::endl;
- std::cout << "Indices '" << cmi->mIndices << "' , size " << cmi->mNbIndices << std::endl;
- replaceIndices(cmi->mIndices, cmi->mNbIndices);
-}
-
-/////////////////////////////////////////////////////////////////////
-
-void DynamicClothMesh::toClothMeshIntermediary(ClothMeshIntermediary* cmi) {
-
-}
-
-/////////////////////////////////////////////////////////////////////
-
-} //End of NxOgre namespace.
-
-////#endif
Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h
===================================================================
--- trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h 2008-06-22 02:07:48 UTC (rev 600)
+++ trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h 2008-06-22 06:20:23 UTC (rev 601)
@@ -1,90 +0,0 @@
-/** \file NxOgreDynamicMesh.h
- * \brief Header for the DynamicMesh, DynamicClothMesh class.
- * \version 1.0-20
- *
- * \licence NxOgre a wrapper for the PhysX physics library.
- * Copyright (C) 2005-8 Robin Southern of 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_DYNAMIC_MESH_H__
-#define __NXOGRE_DYNAMIC_MESH_H__
-
-#include "NxOgrePrerequisites.h"
-#include "NxOgreResourceManager.h"
-
-namespace NxOgre {
-
- ////////////////////////////////////////////////////////////////////
-
- /** \brief They live up to their namesake. A mesh which changes quite a lot.
- */
- class NxPublicClass DynamicMesh {
-
- public:
-
- DynamicMesh();
- virtual ~DynamicMesh();
-
- void fromNxMeshData(NxMeshData*) {} // TEMP
- void toNxMeshData(NxMeshData*) {} // TEMP
-
- NxU32 mNbVertices;
- NxVec3* mVertices;
-
- NxU32 mNbNormals;
- NxVec3* mNormals;
-
- NxU32 mNbIndices;
- NxU32* mIndices;
-
- NxU32 mNbTextureCoordinates;
- float2* mTextureCoordinates;
-
- void replaceVertices(NxVec3* vertices, NxU32 nbVertices);
- void replaceNormals(NxVec3* normals, NxU32 nbNormals);
- void replaceIndices(NxU32* indices, NxU32 nbIndices);
- void replaceTextureCoordinates(float2* coords, NxU32 nbCoords);
-
- void referenceVertices(NxVec3* vertices, NxU32 nbVertices, bool gc = true);
- void referenceNormals(NxVec3* normals, NxU32 nbNormals, bool gc = true);
- void referenceIndices(NxU32* indices, NxU32 nbIndices, bool gc = true);
- void referenceTextureCoordinates(float2* coords, NxU32 nbCoords, bool gc = true);
-
- };
-
- ////////////////////////////////////////////////////////////////////
-
- class NxPublicClass DynamicClothMesh : public DynamicMesh {
-
- public:
-
- DynamicClothMesh(NxClothMesh*);
- DynamicClothMesh() {}
- ~DynamicClothMesh();
-
- NxClothMesh* getMeshPtr();
- void fromClothMeshIntermediary(ClothMeshIntermediary*);
- void toClothMeshIntermediary(ClothMeshIntermediary*);
-
- NxClothMesh* mMeshPtr;
-
- };
-
- ////////////////////////////////////////////////////////////...
[truncated message content] |