Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 31, 2009, 8:05:51 PM (15 years ago)
Author:
rgrieder
Message:

Update from Bullet 2.73 to 2.74.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h

    r2662 r2882  
    3030  center (as determined by width and length and height, with each
    3131  axis multiplied by the localScaling).
     32
     33  \b NOTE: be careful with coordinates.  If you have a heightfield with a local
     34  min height of -100m, and a max height of +500m, you may be tempted to place it
     35  at the origin (0,0) and expect the heights in world coordinates to be
     36  -100 to +500 meters.
     37  Actually, the heights will be -300 to +300m, because bullet will re-center
     38  the heightfield based on its AABB (which is determined by the min/max
     39  heights).  So keep in mind that once you create a btHeightfieldTerrainShape
     40  object, the heights will be adjusted relative to the center of the AABB.  This
     41  is different to the behavior of many rendering engines, but is useful for
     42  physics engines.
    3243
    3344  Most (but not all) rendering and heightfield libraries assume upAxis = 1
     
    89100        btVector3       m_localScaling;
    90101
    91         virtual btScalar        getHeightFieldValue(int x,int y) const;
     102        virtual btScalar        getRawHeightFieldValue(int x,int y) const;
    92103        void            quantizeWithClamp(int* out, const btVector3& point,int isMax) const;
    93104        void            getVertex(int x,int y,btVector3& vertex) const;
Note: See TracChangeset for help on using the changeset viewer.