Show
Ignore:
Timestamp:
02/01/10 14:17:05 (6 months ago)
Author:
Azaezel
Message:

removed bullets TransformCallback? method for the CollisionShape?, instead using an overloaded btMotionState for the PhysicsActor?. as these are callbacks which call behaviors referencing instances, the net effect is the same, though admittedly somewhat hairy to read over. perhaps there's a cleaner method available we can implement later

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsActor.hpp

    r3347 r3349  
    9595    virtual void setSleepingThresholds(float _minLinearMotion, float _minAngularMotion); 
    9696    virtual void setActivationState(unsigned _state); 
     97    virtual int getActivationState(); 
    9798 
    9899    virtual void setAdvancedCollisionPrediction(bool _mode); 
     
    114115    /// @{ 
    115116private: 
    116     static void TransformCallback(const btRigidBody* _body, const Zen::Math::Real* _matrix); 
    117117    void applyForce(const Math::Vector3& _force); 
    118118    void applyImpulse(const Math::Vector3& _force, const Math::Vector3& _worldPos); 
     
    360360        { 
    361361        public: 
    362             ZenMotionState(); 
     362            ZenMotionState(void* _userData); 
    363363            virtual ~ZenMotionState(); 
    364364            virtual void getWorldTransform(btTransform& _worldTrans) const; 
    365365            //Bullet only calls the update of worldtransform for active objects 
    366366            virtual void setWorldTransform(const btTransform& _worldTrans); 
     367            void*               m_userPointer; 
    367368        }; 
    368369    /// @name Extended Member Variables 
     
    382383//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    383384inline 
    384 PhysicsActor::ZenMotionState::ZenMotionState() 
     385PhysicsActor::ZenMotionState::ZenMotionState(void* _userData) 
     386: m_userPointer(_userData) 
    385387{ 
    386388 
     
    392394 
    393395} 
     396 
    394397//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    395398inline