Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
16 #ifndef BT_HEIGHTFIELD_TERRAIN_SHAPE_H
17 #define BT_HEIGHTFIELD_TERRAIN_SHAPE_H
122 virtual btScalar getRawHeightFieldValue(
int x,
int y)
const;
123 void quantizeWithClamp(
int* out,
const btVector3& point,
int isMax)
const;
130 void initialize(
int heightStickWidth,
int heightStickLength,
131 const void* heightfieldData,
btScalar heightScale,
145 const void* heightfieldData,
btScalar heightScale,
157 btHeightfieldTerrainShape(
int heightStickWidth,
int heightStickLength,
const void* heightfieldData,
btScalar maxHeight,
int upAxis,
bool useFloatData,
bool flipQuadEdges);
168 m_flipTriangleWinding = flipTriangleWinding;
176 virtual void setLocalScaling(
const btVector3& scaling);
178 virtual const btVector3& getLocalScaling()
const;
180 void getVertex(
int x,
int y,
btVector3& vertex)
const;
184 void buildAccelerator(
int chunkSize = 16);
185 void clearAccelerator();
192 virtual const char*
getName()
const {
return "HEIGHTFIELD"; }
197 m_userIndex2 = index;
205 m_userValue3 = value;
213 return m_triangleInfoMap;
217 return m_triangleInfoMap;
221 m_triangleInfoMap = map;
225 return m_heightfieldDataUnsignedChar;
229 #endif //BT_HEIGHTFIELD_TERRAIN_SHAPE_H
void setUseZigzagSubdivision(bool useZigzagSubdivision=true)
could help compatibility with Ogre heightfields. See https://code.google.com/p/bullet/issues/detail?...
PHY_ScalarType m_heightDataType
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
struct btTriangleInfoMap * getTriangleInfoMap()
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
int getUserIndex2() const
void setTriangleInfoMap(btTriangleInfoMap *map)
btHeightfieldTerrainShape simulates a 2D heightfield terrain
bool m_useDiamondSubdivision
const btScalar * m_heightfieldDataFloat
struct btTriangleInfoMap * m_triangleInfoMap
void setUseDiamondSubdivision(bool useDiamondSubdivision=true)
const void * m_heightfieldDataUnknown
const unsigned char * getHeightfieldRawData() const
The btTriangleInfoMap stores edge angle information for some triangles. You can compute this informat...
PHY_ScalarType
PHY_ScalarType enumerates possible scalar types.
btScalar getUserValue3() const
void setFlipTriangleWinding(bool flipTriangleWinding)
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 can be used to represent 3D points and vectors.
bool m_useZigzagSubdivision
const unsigned char * m_heightfieldDataUnsignedChar
#define ATTRIBUTE_ALIGNED16(a)
int m_heightStickWidth
terrain data
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
void setUserValue3(btScalar value)
btAlignedObjectArray< Range > m_vboundsGrid
const short * m_heightfieldDataShort
bool m_flipTriangleWinding
const struct btTriangleInfoMap * getTriangleInfoMap() const
void setUserIndex2(int index)
virtual const char * getName() const