[Orxonox-commit 5540] r10203 - in code/branches/presentationFS14/src: external/bullet/BulletCollision/CollisionDispatch orxonox orxonox/collisionshapes orxonox/worldentities orxonox/worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Sun Jan 25 23:15:24 CET 2015
Author: landauf
Date: 2015-01-25 23:15:24 +0100 (Sun, 25 Jan 2015)
New Revision: 10203
Modified:
code/branches/presentationFS14/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
code/branches/presentationFS14/src/orxonox/Scene.h
code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.h
code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.cc
code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.h
code/branches/presentationFS14/src/orxonox/worldentities/StaticEntity.cc
code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.cc
code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.h
code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.cc
code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.h
Log:
removed unused code and debug output
Modified: code/branches/presentationFS14/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
===================================================================
--- code/branches/presentationFS14/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp 2015-01-25 22:15:24 UTC (rev 10203)
@@ -20,7 +20,6 @@
#include "LinearMath/btIDebugDraw.h"
#include "LinearMath/btAabbUtil2.h"
#include "btManifoldResult.h"
-#include <iostream>
btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped)
:btActivatingCollisionAlgorithm(ci,body0,body1),
@@ -115,8 +114,7 @@
void ProcessChildShape(btCollisionShape* childShape,int index)
{
- // std::cout << "PCS: " << childShape << std::endl; // FIXME: (noep) remove DEBUG
- btAssert(index>=0);
+ btAssert(index>=0);
btCompoundShape* compoundShape = static_cast<btCompoundShape*>(m_compoundColObj->getCollisionShape());
btAssert(index<compoundShape->getNumChildShapes());
Modified: code/branches/presentationFS14/src/orxonox/Scene.h
===================================================================
--- code/branches/presentationFS14/src/orxonox/Scene.h 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/Scene.h 2015-01-25 22:15:24 UTC (rev 10203)
@@ -142,9 +142,6 @@
static bool collisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
int index0, const btCollisionObject* colObj1, int partId1, int index1);
- static bool customCollisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
- int index0, const btCollisionObject* colObj1, int partId1, int index1);
-
// Bullet objects
btDiscreteDynamicsWorld* physicalWorld_;
bt32BitAxisSweep3* broadphase_;
Modified: code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.h
===================================================================
--- code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.h 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.h 2015-01-25 22:15:24 UTC (rev 10203)
@@ -169,12 +169,6 @@
bool notifyBeingAttached(CompoundCollisionShape* newParent); // Notifies the CollisionShape of being attached to a CompoundCollisionShape.
void notifyDetached(); // Notifies the CollisionShape of being detached from a CompoundCollisionShape.
- inline unsigned int getParentID()
- { return this->parentID_; }
-
- inline CompoundCollisionShape* getParent()
- { return this->parent_; }
-
protected:
virtual void updateParent(); // Updates the CompoundCollisionShape the CollisionShape belongs to, after the CollisionShape has changed.
virtual void parentChanged(); // Is called when the parentID of the CollisionShape has changed.
Modified: code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.cc 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.cc 2015-01-25 22:15:24 UTC (rev 10203)
@@ -303,9 +303,4 @@
this->updatePublicShape();*/
}
-
- int CompoundCollisionShape::getNumChildShapes()
- {
- return this->compoundShape_->getNumChildShapes();
- }
}
Modified: code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.h
===================================================================
--- code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.h 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.h 2015-01-25 22:15:24 UTC (rev 10203)
@@ -70,13 +70,7 @@
void updateAttachedShape(CollisionShape* shape);
virtual void changedScale();
- int getNumChildShapes();
- inline std::map<CollisionShape*, btCollisionShape*> getShapesMap()
- {
- return attachedShapes_;
- }
-
private:
void updatePublicShape();
inline virtual btCollisionShape* createNewShape() const
Modified: code/branches/presentationFS14/src/orxonox/worldentities/StaticEntity.cc
===================================================================
--- code/branches/presentationFS14/src/orxonox/worldentities/StaticEntity.cc 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/worldentities/StaticEntity.cc 2015-01-25 22:15:24 UTC (rev 10203)
@@ -33,7 +33,6 @@
#include <BulletDynamics/Dynamics/btRigidBody.h>
#include "util/OrxAssert.h"
#include "core/CoreIncludes.h"
-#include "worldentities/BigExplosion.h"
namespace orxonox
{
@@ -115,5 +114,4 @@
worldTrans.setOrigin(btVector3(node_->getPosition().x, node_->getPosition().y, node_->getPosition().z));
worldTrans.setRotation(btQuaternion(node_->getOrientation().x, node_->getOrientation().y, node_->getOrientation().z, node_->getOrientation().w));
}
-
}
Modified: code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.cc 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.cc 2015-01-25 22:15:24 UTC (rev 10203)
@@ -45,7 +45,6 @@
#include "core/XMLPort.h"
#include "Scene.h"
#include "collisionshapes/WorldEntityCollisionShape.h"
-#include <BulletCollision/CollisionShapes/btCollisionShape.h>
namespace orxonox
{
Modified: code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.h
===================================================================
--- code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.h 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.h 2015-01-25 22:15:24 UTC (rev 10203)
@@ -409,9 +409,6 @@
*/
virtual bool isCollisionTypeLegal(CollisionType type) const = 0;
- inline virtual WorldEntityCollisionShape* getWorldEntityCollisionShape()
- { return this->collisionShape_; }
-
btRigidBody* physicalBody_; //!< Bullet rigid body. Everything physical is applied to this instance.
private:
Modified: code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.cc 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.cc 2015-01-25 22:15:24 UTC (rev 10203)
@@ -49,12 +49,6 @@
#include "controllers/FormationController.h"
-#include "collisionshapes/WorldEntityCollisionShape.h"
-#include <BulletCollision/CollisionShapes/btCollisionShape.h>
-#include <BulletCollision/CollisionShapes/btCompoundShape.h>
-#include "graphics/Model.h"
-
-
namespace orxonox
{
RegisterClass(Pawn);
@@ -251,12 +245,6 @@
void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
{
- //FIXME: (noep) remove debug
- //orxout() << "damage(): Collision detected on " << this->getName() << ", btCS*: " << cs << endl;
-
- //int collisionShapeIndex = this->isMyCollisionShape(cs);
- //orxout() << collisionShapeIndex << endl;
-
// Applies multiplier given by the DamageBoost Pickup.
if (originator)
damage *= originator->getDamageMultiplier();
@@ -569,84 +557,4 @@
assert(0);
return BLANKSTRING;
}
-
-
- int Pawn::isMyCollisionShape(const btCollisionShape* cs)
- {
- // This entities WECS
- WorldEntityCollisionShape* ownWECS = this->getWorldEntityCollisionShape();
-
- // e.g. "Box 4: Searching for CS 0x1ad49200"
- orxout() << this->getName() << ": Searching for btCS* " << cs << endl;
- // e.g. "Box 4 is WorldEntityCollisionShape 0x126dd060"
- orxout() << " " << this->getName() << " is WorldEntityCollisionShape* " << ownWECS << endl;
- // e.g. "Box 4 is WorldEntity 0x126dd060"
- orxout() << " " << this->getName() << " is WorldEntity* " << this << endl;
- // e.g. "Box 4 is objectID 943"
- orxout() << " " << this->getName() << " is objectID " << this->getObjectID() << endl;
-
- // List all attached Objects
- orxout() << " " << this->getName() << " has the following Objects attached:" << endl;
- for (int i=0; i<50; i++)
- {
- if (this->getAttachedObject(i)==NULL)
- break;
- orxout() << " " << i << ": " << this->getAttachedObject(i) << " (" << this->getAttachedObject(i)->getName() << ")";
- if(!orxonox_cast<Model*>(this->getAttachedObject(i)))
- orxout() << " (SE)";
- orxout() << endl;
- }
-
-
- // print child shapes of this WECS
- printBtChildShapes((btCompoundShape*)(ownWECS->getCollisionShape()), 2, 0);
-
- int temp = entityOfCollisionShape(cs);
- if (temp==0)
- orxout() << this->getName() << " has been hit on it's main body." << endl;
- else
- orxout() << this->getName() << " has been hit on the attached entity no. " << temp << endl;
-
- // end
- return -1;
- }
-
- void Pawn::printBtChildShapes(btCompoundShape* cs, int indent, int subshape)
- {
- // e.g. " Childshape 1 (WECS 0x126dc8c0) has 2 childshapes:"
- printSpaces(indent); orxout() << "Childshape " << subshape << " (btCS* " << cs << ") has " << cs->getNumChildShapes() << " childshapes:" << endl;
-
- for (int i=0; i < cs->getNumChildShapes(); i++)
- {
- printSpaces(indent+2); orxout() << "- " << i << " - - -" << endl;
-
- // For each childshape, print: (as long as it's not another CompoundCollisionShape)
- if (!orxonox_cast<btCompoundShape*>(cs->getChildShape(i)))
- {
- // pointer to the btCollisionShape
- printSpaces(indent+2); orxout() << "btCollisionShape*: " << cs->getChildShape(i) << endl;
-
- // pointer to the btCollisionShape
- printSpaces(indent+2); orxout() << "m_userPointer*: " << cs->getChildShape(i)->getUserPointer() << " (name_: " << ((BaseObject*)(cs->getChildShape(i)->getUserPointer()))->getName() << ")" << endl;
- }
-
- // if the childshape is a CompoundCollisionShape, print its children.
- if (cs->getChildShape(i)->isCompound())
- printBtChildShapes((btCompoundShape*)(cs->getChildShape(i)), indent+2, i);
-
- }
- }
-
- int Pawn::entityOfCollisionShape(const btCollisionShape* cs)
- {
- btCompoundShape* ownBtCS = (btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape());
-
- return -1;
- }
-
- void Pawn::printSpaces(int num)
- {
- for(int i=0; i<num; i++)
- orxout() << " ";
- }
}
Modified: code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.h 2015-01-25 20:18:15 UTC (rev 10202)
+++ code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.h 2015-01-25 22:15:24 UTC (rev 10203)
@@ -228,11 +228,6 @@
float spawnparticleduration_;
unsigned int numexplosionchunks_;
- virtual int isMyCollisionShape(const btCollisionShape* cs); // FIXME: (noep) remove debug
- void printBtChildShapes(btCompoundShape* cs, int indent, int subshape); // FIXME: (noep) remove debug
- void printSpaces(int num); // FIXME: (noep) remove debug
- int entityOfCollisionShape(const btCollisionShape* cs);
-
private:
void registerVariables();
inline void setWeaponSystem(WeaponSystem* weaponsystem)
More information about the Orxonox-commit
mailing list