Changeset 2882 for code/trunk/src/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
- Timestamp:
- Mar 31, 2009, 8:05:51 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
r2662 r2882 30 30 center (as determined by width and length and height, with each 31 31 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. 32 43 33 44 Most (but not all) rendering and heightfield libraries assume upAxis = 1 … … 89 100 btVector3 m_localScaling; 90 101 91 virtual btScalar get HeightFieldValue(int x,int y) const;102 virtual btScalar getRawHeightFieldValue(int x,int y) const; 92 103 void quantizeWithClamp(int* out, const btVector3& point,int isMax) const; 93 104 void getVertex(int x,int y,btVector3& vertex) const;
Note: See TracChangeset
for help on using the changeset viewer.