Changeset 2908 for code/branches/questsystem5/src/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
- Timestamp:
- Apr 8, 2009, 12:58:47 AM (16 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
r2907 r2908 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 local34 min height of -100m, and a max height of +500m, you may be tempted to place it35 at the origin (0,0) and expect the heights in world coordinates to be36 -100 to +500 meters.37 Actually, the heights will be -300 to +300m, because bullet will re-center38 the heightfield based on its AABB (which is determined by the min/max39 heights). So keep in mind that once you create a btHeightfieldTerrainShape40 object, the heights will be adjusted relative to the center of the AABB. This41 is different to the behavior of many rendering engines, but is useful for42 physics engines.43 32 44 33 Most (but not all) rendering and heightfield libraries assume upAxis = 1 … … 100 89 btVector3 m_localScaling; 101 90 102 virtual btScalar get RawHeightFieldValue(int x,int y) const;91 virtual btScalar getHeightFieldValue(int x,int y) const; 103 92 void quantizeWithClamp(int* out, const btVector3& point,int isMax) const; 104 93 void getVertex(int x,int y,btVector3& vertex) const;
Note: See TracChangeset
for help on using the changeset viewer.