Changeset 3322

Show
Ignore:
Timestamp:
01/28/10 13:58:06 (7 weeks ago)
Author:
Azaezel
Message:

several todos to revisit as applications require them...

Location:
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src
Files:
3 modified

Legend:

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

    r3321 r3322  
    4848class ZBulletMaterial; 
    4949class PhysicsZone; 
     50 
    5051class PhysicsActor 
    5152:   public Engine::Physics::I_PhysicsActor 
     
    266267        virtual void setContactRestitution(Math::Real _restitution) 
    267268        { 
    268             /* 
    269             remove after we unbreak intellisense for m_pActor 
    270             btRigidBody* temp; 
    271             temp->setRestitution(_restitution); 
    272             */ 
    273             m_pActor->setRestitution(_restitution); 
     269            //TODO: resolve - illegal call of non-static member function 
     270            //getActorPtr()->setRestitution(_restitution); 
    274271        } 
    275272 
     
    278275            //for clearing modifications made to actor restitutions at collision-time 
    279276            //mebbey we should auto-run this after the callbacks fired? 
    280             m_pActor->setRestitution(getActor().getMaterial()->getRestitution()); 
     277            //TODO: resolve - illegal call of non-static member function 
     278            //getActorPtr()->setRestitution(getActor().getMaterial()->getRestitution());  
    281279        } 
    282280 
    283281        virtual void setContactFrictionState(int _state, bool _primary = true) 
    284282        { 
    285             NewtonMaterialSetContactFrictionState(m_pMaterial, _state, _primary ? 0 : 1); 
     283            //TODO: resolve - 
     284            //if getActor().getMaterial()->getStaticFriction() > 0; 
     285            //getActorPtr()->setFriction(getActor().getMaterial()->getStaticFriction()); 
    286286        } 
    287287 
    288288        virtual void setStaticFrictionCoefficient(Math::Real _coefficent, bool _primary = true) 
    289289        { 
    290             NewtonMaterialSetContactStaticFrictionCoef(m_pMaterial, _coefficent, _primary ? 0 : 1); 
     290            //TODO: resolve - 
     291            //if getActor().getMaterial()->getStaticFriction() > 0; 
     292            //getActorPtr()->setFriction(getActor().getMaterial()->getStaticFriction()); 
    291293        } 
    292294 
    293295        virtual void setKineticFrictionCoefficient(Math::Real _coefficent, bool _primary = true) 
    294296        { 
    295             NewtonMaterialSetContactKineticFrictionCoef(m_pMaterial, _coefficent, _primary ? 0 : 1); 
     297            //TODO: resolve - 
     298            //if getActor().getMaterial()->getStaticFriction() > 0; 
     299            //getActorPtr()->setFriction(getActor().getMaterial()->getDynamicFriction()); 
    296300        } 
    297301 
  • plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsZone.cpp

    r3317 r3322  
    577577//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
    578578void 
     579PhysicsZone::destroyPhysicsActor(wpPhysicsActor_type _wpPhysicsActor) 
     580{ 
     581    // TODO - remove appropriate entry from m_zoneSet 
     582    //m_zoneSet.erase(iter); 
     583 
     584    /// Fire the PhysicsZone's onDestroyEvent 
     585    _wpPhysicsActor->onDestroyEvent(_wpPhysicsActor); 
     586     
     587    /// delete the PhysicsZone pointer 
     588    PhysicsActor* pPhysicsActor = dynamic_cast<PhysicsActor*>(_wpPhysicsActor.get()); 
     589 
     590    if (pPhysicsActor) 
     591    { 
     592        delete pPhysicsActor; 
     593    } 
     594    else 
     595    { 
     596        throw Zen::Utility::runtime_exception("Zen::ZBullet::PhysicsZone::destroyPhysicsActor() : _wpPhysicsActor is an invalid PhysicsActor."); 
     597    } 
     598} 
     599//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 
     600void 
    579601PhysicsZone::stepSimulation(double _elapsedTime) 
    580602{ 
  • plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsZone.hpp

    r3317 r3322  
    9797 
    9898    void destroyCollisionShape(wpCollisionShape_type _wpCollisionShape); 
     99    void destroyPhysicsActor(wpPhysicsActor_type _wpPhysicsActor); 
    99100 
    100101    void stepSimulation(double _elapsedTime);