Show
Ignore:
Timestamp:
01/19/10 21:44:59 (8 months ago)
Author:
Azaezel
Message:

sent all instances of NewtonWorldUnfreezeBody? through setActivationState(bool) for simplicity of maintenance/portability and implemented the same for bullet

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZNewton/src/PhysicsActor.cpp

    r3294 r3301  
    208208{ 
    209209    NewtonBodySetAutoFreeze(m_pActor, _bFreeze ? 1 : 0); 
    210     NewtonWorldUnfreezeBody(dynamic_cast<PhysicsZone*>(m_pZone.get())->getZonePtr(), m_pActor); 
     210    setActivationState(true); 
    211211    m_activationState = 1; 
    212212} 
     
    292292    getOrientation(mat); 
    293293    mat.setPosition(_pos); 
    294     NewtonWorldUnfreezeBody(dynamic_cast<PhysicsZone*>(m_pZone.get())->getZonePtr(), m_pActor); 
     294    setActivationState(true); 
    295295    m_activationState = 1; 
    296296 
     
    359359    matrix.setPosition(pos); 
    360360 
    361     NewtonWorldUnfreezeBody(dynamic_cast<PhysicsZone*>(m_pZone.get())->getZonePtr(), m_pActor); 
     361    setActivationState(true); 
    362362    m_activationState = 1; 
    363363 
     
    369369PhysicsActor::setLinearVelocity(const Math::Vector3& _velocity) 
    370370{ 
    371     NewtonWorldUnfreezeBody(dynamic_cast<PhysicsZone*>(m_pZone.get())->getZonePtr(), m_pActor); 
     371    setActivationState(true); 
    372372    m_activationState = 1; 
    373373 
     
    405405PhysicsActor::setAngularVelocity(const Math::Vector3& _omega) 
    406406{ 
    407     NewtonWorldUnfreezeBody(dynamic_cast<PhysicsZone*>(m_pZone.get())->getZonePtr(), m_pActor); 
     407    setActivationState(true); 
    408408    m_activationState = 1; 
    409409 
     
    620620{ 
    621621    m_activationState = _state; 
     622    if (m_activationState) 
     623        NewtonWorldUnfreezeBody(dynamic_cast<PhysicsZone*>(m_pZone.get())->getZonePtr(), m_pActor); 
     624    else 
     625        NewtonWorldFreezeBody(dynamic_cast<PhysicsZone*>(m_pZone.get())->getZonePtr(), m_pActor); 
    622626} 
    623627