export btHeightfieldTerrainShape to PyBullet. Note that tinyrenderer doesn't support rendering it (it would be too slow on CPU)
fix rare getKeyboardEvents threading issue change texture color to default plane.urdf blue
This commit is contained in:
@@ -21,7 +21,8 @@ btHeightfieldTerrainShape::btHeightfieldTerrainShape(
|
||||
int heightStickWidth, int heightStickLength, const void* heightfieldData,
|
||||
btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis,
|
||||
PHY_ScalarType hdt, bool flipQuadEdges)
|
||||
:m_userIndex2(-1)
|
||||
:m_userIndex2(-1),
|
||||
m_userValue3(0)
|
||||
{
|
||||
initialize(heightStickWidth, heightStickLength, heightfieldData,
|
||||
heightScale, minHeight, maxHeight, upAxis, hdt,
|
||||
@@ -29,7 +30,8 @@ btHeightfieldTerrainShape::btHeightfieldTerrainShape(
|
||||
}
|
||||
|
||||
btHeightfieldTerrainShape::btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, const void* heightfieldData, btScalar maxHeight, int upAxis, bool useFloatData, bool flipQuadEdges)
|
||||
:m_userIndex2(-1)
|
||||
:m_userIndex2(-1),
|
||||
m_userValue3(0)
|
||||
{
|
||||
// legacy constructor: support only float or unsigned char,
|
||||
// and min height is zero
|
||||
|
||||
@@ -115,6 +115,7 @@ protected:
|
||||
int m_vboundsChunkSize;
|
||||
|
||||
int m_userIndex2;
|
||||
btScalar m_userValue3;
|
||||
|
||||
virtual btScalar getRawHeightFieldValue(int x, int y) const;
|
||||
void quantizeWithClamp(int* out, const btVector3& point, int isMax) const;
|
||||
@@ -197,6 +198,14 @@ public:
|
||||
{
|
||||
return m_userIndex2;
|
||||
}
|
||||
void setUserValue3(btScalar value)
|
||||
{
|
||||
m_userValue3 = value;
|
||||
}
|
||||
btScalar getUserValue3() const
|
||||
{
|
||||
return m_userValue3;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //BT_HEIGHTFIELD_TERRAIN_SHAPE_H
|
||||
Reference in New Issue
Block a user