Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2009, 12:58:47 AM (16 years ago)
Author:
dafrick
Message:

Reverted to revision 2906 (because I'm too stupid to merge correctly, 2nd try will follow shortly. ;))

Location:
code/branches/questsystem5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem5

  • code/branches/questsystem5/src/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h

    r2907 r2908  
    2929
    3030class btRigidBody;
    31 
    32 
    3331
    3432
     
    9593    bool isLimited()
    9694    {
    97         if(m_loLimit > m_hiLimit) return false;
     95        if(m_loLimit>=m_hiLimit) return false;
    9896        return true;
    9997    }
     
    113111
    114112        //! apply the correction impulses for two bodies
    115     btScalar solveAngularLimits(btScalar timeStep,btVector3& axis, btScalar jacDiagABInv,btRigidBody * body0, btSolverBody& bodyA,btRigidBody * body1,btSolverBody& bodyB);
     113    btScalar solveAngularLimits(btScalar timeStep,btVector3& axis, btScalar jacDiagABInv,btRigidBody * body0, btRigidBody * body1);
     114
    116115
    117116};
     
    131130    btScalar    m_restitution;//! Bounce parameter for linear limit
    132131    //!@}
    133         bool            m_enableMotor[3];
    134     btVector3   m_targetVelocity;//!< target motor velocity
    135     btVector3   m_maxMotorForce;//!< max force on motor
    136     btVector3   m_currentLimitError;//!  How much is violated this limit
    137     int                 m_currentLimit[3];//!< 0=free, 1=at lower limit, 2=at upper limit
    138132
    139133    btTranslationalLimitMotor()
     
    146140        m_damping = btScalar(1.0f);
    147141        m_restitution = btScalar(0.5f);
    148                 for(int i=0; i < 3; i++)
    149                 {
    150                         m_enableMotor[i] = false;
    151                         m_targetVelocity[i] = btScalar(0.f);
    152                         m_maxMotorForce[i] = btScalar(0.f);
    153                 }
    154142    }
    155143
     
    163151        m_damping = other.m_damping;
    164152        m_restitution = other.m_restitution;
    165                 for(int i=0; i < 3; i++)
    166                 {
    167                         m_enableMotor[i] = other.m_enableMotor[i];
    168                         m_targetVelocity[i] = other.m_targetVelocity[i];
    169                         m_maxMotorForce[i] = other.m_maxMotorForce[i];
    170                 }
    171153    }
    172154
     
    182164       return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]);
    183165    }
    184     inline bool needApplyForce(int limitIndex)
    185     {
    186         if(m_currentLimit[limitIndex] == 0 && m_enableMotor[limitIndex] == false) return false;
    187         return true;
    188     }
    189         int testLimitValue(int limitIndex, btScalar test_value);
    190166
    191167
     
    193169        btScalar timeStep,
    194170        btScalar jacDiagABInv,
    195         btRigidBody& body1,btSolverBody& bodyA,const btVector3 &pointInA,
    196         btRigidBody& body2,btSolverBody& bodyB,const btVector3 &pointInB,
     171        btRigidBody& body1,const btVector3 &pointInA,
     172        btRigidBody& body2,const btVector3 &pointInB,
    197173        int limit_index,
    198174        const btVector3 & axis_normal_on_a,
     
    272248    btVector3 m_calculatedAxisAngleDiff;
    273249    btVector3 m_calculatedAxis[3];
    274     btVector3 m_calculatedLinearDiff;
    275250   
    276251        btVector3 m_AnchorPos; // point betwen pivots of bodies A and B to solve linear axes
     
    288263
    289264
    290         int setAngularLimits(btConstraintInfo2 *info, int row_offset);
    291 
    292         int setLinearLimits(btConstraintInfo2 *info);
    293265
    294266    void buildLinearJacobian(
     
    298270    void buildAngularJacobian(btJacobianEntry & jacAngular,const btVector3 & jointAxisW);
    299271
    300         // tests linear limits
    301         void calculateLinearInfo();
    302272
    303273        //! calcs the euler angles between the two bodies.
     
    307277
    308278public:
    309 
    310         ///for backwards compatibility during the transition to 'getInfo/getInfo2'
    311         bool            m_useSolveConstraintObsolete;
    312 
    313279    btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
    314280
     
    365331    virtual void        buildJacobian();
    366332
    367         virtual void getInfo1 (btConstraintInfo1* info);
    368 
    369         virtual void getInfo2 (btConstraintInfo2* info);
    370 
    371     virtual     void    solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar        timeStep);
     333    virtual     void    solveConstraint(btScalar        timeStep);
    372334
    373335    void        updateRHS(btScalar      timeStep);
     
    471433        virtual void calcAnchorPos(void); // overridable
    472434
    473         int get_limit_motor_info2(      btRotationalLimitMotor * limot,
    474                                                                 btRigidBody * body0, btRigidBody * body1,
    475                                                                 btConstraintInfo2 *info, int row, btVector3& ax1, int rotational);
    476 
    477 
    478435};
    479436
Note: See TracChangeset for help on using the changeset viewer.