Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2008, 10:53:44 PM (16 years ago)
Author:
rgrieder
Message:

Minor changes and added localInertia_ to worldentity for faster access.

Location:
code/branches/physics_merge/src/orxonox/objects/collisionshapes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.cc

    r2445 r2452  
    108108    }
    109109
    110     btVector3 CollisionShape::getLocalInertia(btScalar mass) const
     110    void CollisionShape::calculateLocalInertia(btScalar mass, btVector3& inertia) const
    111111    {
    112         btVector3 inertia(0, 0, 0);
    113112        if (this->collisionShape_)
    114113            this->collisionShape_->calculateLocalInertia(mass, inertia);
    115         return inertia;
     114        else
     115            inertia.setValue(0, 0, 0);
    116116    }
    117117}
  • code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.h

    r2445 r2452  
    6666                { return this->scale_; }
    6767
    68             btVector3 getLocalInertia(float mass) const;
     68            void calculateLocalInertia(float mass, btVector3& inertia) const;
    6969
    7070            inline btCollisionShape* getCollisionShape() const
Note: See TracChangeset for help on using the changeset viewer.