Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2011, 7:15:14 AM (13 years ago)
Author:
rgrieder
Message:

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/external/bullet/BulletCollision/CollisionShapes/btConvexHullShape.cpp

    r5781 r8351  
    11/*
    22Bullet Continuous Collision Detection and Physics Library
    3 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
     3Copyright (c) 2003-2009 Erwin Coumans  http://bulletphysics.org
    44
    55This software is provided 'as-is', without any express or implied warranty.
     
    13133. This notice may not be removed or altered from any source distribution.
    1414*/
     15
    1516#include "btConvexHullShape.h"
    1617#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
    1718
    1819#include "LinearMath/btQuaternion.h"
    19 
    20 
    21 
    22 btConvexHullShape ::btConvexHullShape (const btScalar* points,int numPoints,int stride) : btPolyhedralConvexShape ()
     20#include "LinearMath/btSerializer.h"
     21
     22btConvexHullShape ::btConvexHullShape (const btScalar* points,int numPoints,int stride) : btPolyhedralConvexAabbCachingShape ()
    2323{
    2424        m_shapeType = CONVEX_HULL_SHAPE_PROXYTYPE;
    2525        m_unscaledPoints.resize(numPoints);
    2626
    27         unsigned char* pointsBaseAddress = (unsigned char*)points;
     27        unsigned char* pointsAddress = (unsigned char*)points;
    2828
    2929        for (int i=0;i<numPoints;i++)
    3030        {
    31                 btVector3* point = (btVector3*)(pointsBaseAddress + i*stride);
    32                 m_unscaledPoints[i] = point[0];
     31                btScalar* point = (btScalar*)pointsAddress;
     32                m_unscaledPoints[i] = btVector3(point[0], point[1], point[2]);
     33                pointsAddress += stride;
    3334        }
    3435
     
    5253}
    5354
    54 btVector3       btConvexHullShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
     55btVector3       btConvexHullShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
    5556{
    5657        btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.));
    57         btScalar newDot,maxDot = btScalar(-1e30);
    58 
    59         btVector3 vec = vec0;
    60         btScalar lenSqr = vec.length2();
    61         if (lenSqr < btScalar(0.0001))
    62         {
    63                 vec.setValue(1,0,0);
    64         } else
    65         {
    66                 btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
    67                 vec *= rlen;
    68         }
    69 
     58        btScalar newDot,maxDot = btScalar(-BT_LARGE_FLOAT);
    7059
    7160        for (int i=0;i<m_unscaledPoints.size();i++)
     
    9079                for (int i=0;i<numVectors;i++)
    9180                {
    92                         supportVerticesOut[i][3] = btScalar(-1e30);
     81                        supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
    9382                }
    9483        }
     
    186175}
    187176
     177///fills the dataBuffer and returns the struct name (and 0 on failure)
     178const char*     btConvexHullShape::serialize(void* dataBuffer, btSerializer* serializer) const
     179{
     180        //int szc = sizeof(btConvexHullShapeData);
     181        btConvexHullShapeData* shapeData = (btConvexHullShapeData*) dataBuffer;
     182        btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData, serializer);
     183
     184        int numElem = m_unscaledPoints.size();
     185        shapeData->m_numUnscaledPoints = numElem;
     186#ifdef BT_USE_DOUBLE_PRECISION
     187        shapeData->m_unscaledPointsFloatPtr = 0;
     188        shapeData->m_unscaledPointsDoublePtr = numElem ? (btVector3Data*)serializer->getUniquePointer((void*)&m_unscaledPoints[0]):  0;
     189#else
     190        shapeData->m_unscaledPointsFloatPtr = numElem ? (btVector3Data*)serializer->getUniquePointer((void*)&m_unscaledPoints[0]):  0;
     191        shapeData->m_unscaledPointsDoublePtr = 0;
     192#endif
     193       
     194        if (numElem)
     195        {
     196                int sz = sizeof(btVector3Data);
     197        //      int sz2 = sizeof(btVector3DoubleData);
     198        //      int sz3 = sizeof(btVector3FloatData);
     199                btChunk* chunk = serializer->allocate(sz,numElem);
     200                btVector3Data* memPtr = (btVector3Data*)chunk->m_oldPtr;
     201                for (int i=0;i<numElem;i++,memPtr++)
     202                {
     203                        m_unscaledPoints[i].serialize(*memPtr);
     204                }
     205                serializer->finalizeChunk(chunk,btVector3DataName,BT_ARRAY_CODE,(void*)&m_unscaledPoints[0]);
     206        }
     207       
     208        return "btConvexHullShapeData";
     209}
     210
     211
Note: See TracChangeset for help on using the changeset viewer.