Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2011, 5:07:42 AM (13 years ago)
Author:
rgrieder
Message:

Updated Bullet from v2.77 to v2.78.
(I'm not going to make a branch for that since the update from 2.74 to 2.77 hasn't been tested that much either).

You will HAVE to do a complete RECOMPILE! I tested with MSVC and MinGW and they both threw linker errors at me.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/external/bullet/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp

    r8351 r8393  
    2222        : btGeneric6DofConstraint(rbA, rbB, frameInA, frameInB, useLinearReferenceFrameA)
    2323{
     24        m_objectType = D6_SPRING_CONSTRAINT_TYPE;
     25
    2426        for(int i = 0; i < 6; i++)
    2527        {
     
    148150
    149151
     152void btGeneric6DofSpringConstraint::setAxis(const btVector3& axis1,const btVector3& axis2)
     153{
     154        btVector3 zAxis = axis1.normalized();
     155        btVector3 yAxis = axis2.normalized();
     156        btVector3 xAxis = yAxis.cross(zAxis); // we want right coordinate system
     157
     158        btTransform frameInW;
     159        frameInW.setIdentity();
     160        frameInW.getBasis().setValue(   xAxis[0], yAxis[0], zAxis[0],   
     161                                xAxis[1], yAxis[1], zAxis[1],
     162                                xAxis[2], yAxis[2], zAxis[2]);
     163
     164        // now get constraint frame in local coordinate systems
     165        m_frameInA = m_rbA.getCenterOfMassTransform().inverse() * frameInW;
     166        m_frameInB = m_rbB.getCenterOfMassTransform().inverse() * frameInW;
     167
     168  calculateTransforms();
     169}
    150170
    151171
     172
Note: See TracChangeset for help on using the changeset viewer.