Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10203


Ignore:
Timestamp:
Jan 25, 2015, 11:15:24 PM (5 years ago)
Author:
landauf
Message:

removed unused code and debug output

Location:
code/branches/presentationFS14/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationFS14/src/external/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp

    r10073 r10203  
    2121#include "LinearMath/btAabbUtil2.h"
    2222#include "btManifoldResult.h"
    23 #include <iostream>
    2423
    2524btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped)
     
    116115        void    ProcessChildShape(btCollisionShape* childShape,int index)
    117116        {
    118                 // std::cout << "PCS: " << childShape << std::endl; // FIXME: (noep) remove DEBUG
    119             btAssert(index>=0);
     117                btAssert(index>=0);
    120118                btCompoundShape* compoundShape = static_cast<btCompoundShape*>(m_compoundColObj->getCollisionShape());
    121119                btAssert(index<compoundShape->getNumChildShapes());
  • code/branches/presentationFS14/src/orxonox/Scene.h

    r10073 r10203  
    143143                                          int index0, const btCollisionObject* colObj1, int partId1, int index1);
    144144
    145             static bool customCollisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
    146                                                       int index0, const btCollisionObject* colObj1, int partId1, int index1);
    147 
    148145            // Bullet objects
    149146            btDiscreteDynamicsWorld*             physicalWorld_;
  • code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.h

    r10073 r10203  
    170170            void notifyDetached(); // Notifies the CollisionShape of being detached from a CompoundCollisionShape.
    171171
    172             inline unsigned int getParentID()
    173                 { return this->parentID_; }
    174 
    175             inline CompoundCollisionShape* getParent()
    176                 { return this->parent_; }
    177 
    178172        protected:
    179173            virtual void updateParent(); // Updates the CompoundCollisionShape the CollisionShape belongs to, after the CollisionShape has changed.
  • code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.cc

    r10073 r10203  
    304304        this->updatePublicShape();*/
    305305    }
    306 
    307     int CompoundCollisionShape::getNumChildShapes()
    308     {
    309         return this->compoundShape_->getNumChildShapes();
    310     }
    311306}
  • code/branches/presentationFS14/src/orxonox/collisionshapes/CompoundCollisionShape.h

    r10073 r10203  
    7171
    7272            virtual void changedScale();
    73             int getNumChildShapes();
    74 
    75             inline std::map<CollisionShape*, btCollisionShape*> getShapesMap()
    76             {
    77                 return attachedShapes_;
    78             }
    7973
    8074        private:
  • code/branches/presentationFS14/src/orxonox/worldentities/StaticEntity.cc

    r10073 r10203  
    3434#include "util/OrxAssert.h"
    3535#include "core/CoreIncludes.h"
    36 #include "worldentities/BigExplosion.h"
    3736
    3837namespace orxonox
     
    116115        worldTrans.setRotation(btQuaternion(node_->getOrientation().x, node_->getOrientation().y, node_->getOrientation().z, node_->getOrientation().w));
    117116    }
    118 
    119117}
  • code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.cc

    r10198 r10203  
    4646#include "Scene.h"
    4747#include "collisionshapes/WorldEntityCollisionShape.h"
    48 #include <BulletCollision/CollisionShapes/btCollisionShape.h>
    4948
    5049namespace orxonox
  • code/branches/presentationFS14/src/orxonox/worldentities/WorldEntity.h

    r10073 r10203  
    409409            */
    410410            virtual bool isCollisionTypeLegal(CollisionType type) const = 0;
    411 
    412             inline virtual WorldEntityCollisionShape* getWorldEntityCollisionShape()
    413                 { return this->collisionShape_; }
    414411
    415412            btRigidBody*  physicalBody_; //!< Bullet rigid body. Everything physical is applied to this instance.
  • code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.cc

    r10073 r10203  
    5050#include "controllers/FormationController.h"
    5151
    52 #include "collisionshapes/WorldEntityCollisionShape.h"
    53 #include <BulletCollision/CollisionShapes/btCollisionShape.h>
    54 #include <BulletCollision/CollisionShapes/btCompoundShape.h>
    55 #include "graphics/Model.h"
    56 
    57 
    5852namespace orxonox
    5953{
     
    252246    void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
    253247    {
    254         //FIXME: (noep) remove debug
    255         //orxout() << "damage(): Collision detected on " << this->getName() << ", btCS*: " << cs << endl;
    256 
    257         //int collisionShapeIndex = this->isMyCollisionShape(cs);
    258         //orxout() << collisionShapeIndex << endl;
    259 
    260248        // Applies multiplier given by the DamageBoost Pickup.
    261249        if (originator)
     
    570558        return BLANKSTRING;
    571559    }
    572 
    573 
    574     int Pawn::isMyCollisionShape(const btCollisionShape* cs)
    575     {
    576         // This entities WECS
    577         WorldEntityCollisionShape* ownWECS = this->getWorldEntityCollisionShape();
    578 
    579         // e.g. "Box 4: Searching for CS 0x1ad49200"
    580         orxout() << this->getName() << ": Searching for btCS* " << cs << endl;
    581         // e.g. "Box 4 is WorldEntityCollisionShape 0x126dd060"
    582         orxout() << "  " << this->getName() << " is WorldEntityCollisionShape* " << ownWECS << endl;
    583         // e.g. "Box 4 is WorldEntity 0x126dd060"
    584         orxout() << "  " << this->getName() << " is WorldEntity* " << this << endl;
    585         // e.g. "Box 4 is objectID 943"
    586         orxout() << "  " << this->getName() << " is objectID " << this->getObjectID() << endl;
    587 
    588         // List all attached Objects
    589         orxout() << "  " << this->getName() << " has the following Objects attached:" << endl;
    590         for (int i=0; i<50; i++)
    591         {
    592             if (this->getAttachedObject(i)==NULL)
    593                 break;
    594             orxout() << " " << i << ": " << this->getAttachedObject(i) << " (" << this->getAttachedObject(i)->getName() << ")";
    595             if(!orxonox_cast<Model*>(this->getAttachedObject(i)))
    596                 orxout() << " (SE)";
    597             orxout() << endl;
    598         }
    599 
    600 
    601         // print child shapes of this WECS
    602         printBtChildShapes((btCompoundShape*)(ownWECS->getCollisionShape()), 2, 0);
    603 
    604         int temp = entityOfCollisionShape(cs);
    605         if (temp==0)
    606             orxout() << this->getName() << " has been hit on it's main body." << endl;
    607         else
    608             orxout() << this->getName() << " has been hit on the attached entity no. " << temp << endl;
    609 
    610         // end
    611         return -1;
    612     }
    613 
    614     void Pawn::printBtChildShapes(btCompoundShape* cs, int indent, int subshape)
    615     {
    616         // e.g. "  Childshape 1 (WECS 0x126dc8c0) has 2 childshapes:"
    617         printSpaces(indent);  orxout() << "Childshape " << subshape << " (btCS* " << cs << ") has " << cs->getNumChildShapes() << " childshapes:" << endl;
    618 
    619         for (int i=0; i < cs->getNumChildShapes(); i++)
    620         {
    621             printSpaces(indent+2);  orxout() << "- " << i << " - - -" << endl;
    622 
    623             // For each childshape, print: (as long as it's not another CompoundCollisionShape)
    624             if (!orxonox_cast<btCompoundShape*>(cs->getChildShape(i)))
    625             {
    626                 // pointer to the btCollisionShape
    627                 printSpaces(indent+2);  orxout() << "btCollisionShape*: " << cs->getChildShape(i) << endl;
    628 
    629                 // pointer to the btCollisionShape
    630                 printSpaces(indent+2);  orxout() << "m_userPointer*: " << cs->getChildShape(i)->getUserPointer() << " (name_: " << ((BaseObject*)(cs->getChildShape(i)->getUserPointer()))->getName() << ")" << endl;
    631             }
    632 
    633             // if the childshape is a CompoundCollisionShape, print its children.
    634             if (cs->getChildShape(i)->isCompound())
    635                 printBtChildShapes((btCompoundShape*)(cs->getChildShape(i)), indent+2, i);
    636 
    637         }
    638     }
    639 
    640     int Pawn::entityOfCollisionShape(const btCollisionShape* cs)
    641     {
    642         btCompoundShape* ownBtCS = (btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape());
    643 
    644         return -1;
    645     }
    646 
    647     void Pawn::printSpaces(int num)
    648     {
    649         for(int i=0; i<num; i++)
    650             orxout() << " ";
    651     }
    652560}
  • code/branches/presentationFS14/src/orxonox/worldentities/pawns/Pawn.h

    r10073 r10203  
    229229            unsigned int numexplosionchunks_;
    230230
    231             virtual int isMyCollisionShape(const btCollisionShape* cs); // FIXME: (noep) remove debug
    232             void printBtChildShapes(btCompoundShape* cs, int indent, int subshape); // FIXME: (noep) remove debug
    233             void printSpaces(int num);   // FIXME: (noep) remove debug
    234             int entityOfCollisionShape(const btCollisionShape* cs);
    235 
    236231        private:
    237232            void registerVariables();
Note: See TracChangeset for help on using the changeset viewer.