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/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp

    r8351 r8393  
    8989                                         break;
    9090                                 }
     91                        case PHY_UCHAR:
     92                                 {
     93                                         for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
     94                                         {
     95                                                 unsigned char* tri_indices= (unsigned char*)(indexbase+gfxindex*indexstride);
     96                                                 graphicsbase = (float*)(vertexbase+tri_indices[0]*stride);
     97                                                 triangle[0].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ());
     98                                                 graphicsbase = (float*)(vertexbase+tri_indices[1]*stride);
     99                                                 triangle[1].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),    graphicsbase[2]*meshScaling.getZ());
     100                                                 graphicsbase = (float*)(vertexbase+tri_indices[2]*stride);
     101                                                 triangle[2].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),    graphicsbase[2]*meshScaling.getZ());
     102                                                 callback->internalProcessTriangleIndex(triangle,part,gfxindex);
     103                                         }
     104                                         break;
     105                                 }
    91106                         default:
    92107                                 btAssert((gfxindextype == PHY_INTEGER) || (gfxindextype == PHY_SHORT));
     
    121136                                                {
    122137                                                        unsigned short int* tri_indices= (unsigned short int*)(indexbase+gfxindex*indexstride);
     138                                                        graphicsbase = (double*)(vertexbase+tri_indices[0]*stride);
     139                                                        triangle[0].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),(btScalar)graphicsbase[2]*meshScaling.getZ());
     140                                                        graphicsbase = (double*)(vertexbase+tri_indices[1]*stride);
     141                                                        triangle[1].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),  (btScalar)graphicsbase[2]*meshScaling.getZ());
     142                                                        graphicsbase = (double*)(vertexbase+tri_indices[2]*stride);
     143                                                        triangle[2].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),  (btScalar)graphicsbase[2]*meshScaling.getZ());
     144                                                        callback->internalProcessTriangleIndex(triangle,part,gfxindex);
     145                                                }
     146                                                break;
     147                                        }
     148                                case PHY_UCHAR:
     149                                        {
     150                                                for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
     151                                                {
     152                                                        unsigned char* tri_indices= (unsigned char*)(indexbase+gfxindex*indexstride);
    123153                                                        graphicsbase = (double*)(vertexbase+tri_indices[0]*stride);
    124154                                                        triangle[0].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),(btScalar)graphicsbase[2]*meshScaling.getZ());
     
    267297                                        break;
    268298                                }
     299                                case PHY_UCHAR:
     300                                {
     301                                        if (numtriangles)
     302                                        {
     303                                                btChunk* chunk = serializer->allocate(sizeof(btCharIndexTripletData),numtriangles);
     304                                                btCharIndexTripletData* tmpIndices = (btCharIndexTripletData*)chunk->m_oldPtr;
     305                                                memPtr->m_3indices8 = (btCharIndexTripletData*) serializer->getUniquePointer(tmpIndices);
     306                                                for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
     307                                                {
     308                                                        unsigned char* tri_indices= (unsigned char*)(indexbase+gfxindex*indexstride);
     309                                                        tmpIndices[gfxindex].m_values[0] = tri_indices[0];
     310                                                        tmpIndices[gfxindex].m_values[1] = tri_indices[1];
     311                                                        tmpIndices[gfxindex].m_values[2] = tri_indices[2];
     312                                                }
     313                                                serializer->finalizeChunk(chunk,"btCharIndexTripletData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
     314                                        }
     315                                        break;
     316                                }
    269317                        default:
    270318                                {
Note: See TracChangeset for help on using the changeset viewer.