make some methods/data const for btHeightfieldTerrainShape
See Issue 569 Thanks to Camilla Berglund
This commit is contained in:
@@ -21,7 +21,7 @@ subject to the following restrictions:
|
|||||||
|
|
||||||
btHeightfieldTerrainShape::btHeightfieldTerrainShape
|
btHeightfieldTerrainShape::btHeightfieldTerrainShape
|
||||||
(
|
(
|
||||||
int heightStickWidth, int heightStickLength, void* heightfieldData,
|
int heightStickWidth, int heightStickLength, const void* heightfieldData,
|
||||||
btScalar heightScale, btScalar minHeight, btScalar maxHeight,int upAxis,
|
btScalar heightScale, btScalar minHeight, btScalar maxHeight,int upAxis,
|
||||||
PHY_ScalarType hdt, bool flipQuadEdges
|
PHY_ScalarType hdt, bool flipQuadEdges
|
||||||
)
|
)
|
||||||
@@ -33,7 +33,7 @@ PHY_ScalarType hdt, bool flipQuadEdges
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
btHeightfieldTerrainShape::btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength,void* heightfieldData,btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges)
|
btHeightfieldTerrainShape::btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength,const void* heightfieldData,btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges)
|
||||||
{
|
{
|
||||||
// legacy constructor: support only float or unsigned char,
|
// legacy constructor: support only float or unsigned char,
|
||||||
// and min height is zero
|
// and min height is zero
|
||||||
@@ -53,7 +53,7 @@ btHeightfieldTerrainShape::btHeightfieldTerrainShape(int heightStickWidth, int h
|
|||||||
|
|
||||||
void btHeightfieldTerrainShape::initialize
|
void btHeightfieldTerrainShape::initialize
|
||||||
(
|
(
|
||||||
int heightStickWidth, int heightStickLength, void* heightfieldData,
|
int heightStickWidth, int heightStickLength, const void* heightfieldData,
|
||||||
btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis,
|
btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis,
|
||||||
PHY_ScalarType hdt, bool flipQuadEdges
|
PHY_ScalarType hdt, bool flipQuadEdges
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -85,10 +85,10 @@ protected:
|
|||||||
btScalar m_heightScale;
|
btScalar m_heightScale;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned char* m_heightfieldDataUnsignedChar;
|
const unsigned char* m_heightfieldDataUnsignedChar;
|
||||||
short* m_heightfieldDataShort;
|
const short* m_heightfieldDataShort;
|
||||||
btScalar* m_heightfieldDataFloat;
|
const btScalar* m_heightfieldDataFloat;
|
||||||
void* m_heightfieldDataUnknown;
|
const void* m_heightfieldDataUnknown;
|
||||||
};
|
};
|
||||||
|
|
||||||
PHY_ScalarType m_heightDataType;
|
PHY_ScalarType m_heightDataType;
|
||||||
@@ -111,7 +111,7 @@ protected:
|
|||||||
backwards-compatible without a lot of copy/paste.
|
backwards-compatible without a lot of copy/paste.
|
||||||
*/
|
*/
|
||||||
void initialize(int heightStickWidth, int heightStickLength,
|
void initialize(int heightStickWidth, int heightStickLength,
|
||||||
void* heightfieldData, btScalar heightScale,
|
const void* heightfieldData, btScalar heightScale,
|
||||||
btScalar minHeight, btScalar maxHeight, int upAxis,
|
btScalar minHeight, btScalar maxHeight, int upAxis,
|
||||||
PHY_ScalarType heightDataType, bool flipQuadEdges);
|
PHY_ScalarType heightDataType, bool flipQuadEdges);
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ public:
|
|||||||
heightScale is needed for any integer-based heightfield data types.
|
heightScale is needed for any integer-based heightfield data types.
|
||||||
*/
|
*/
|
||||||
btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,
|
btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,
|
||||||
void* heightfieldData, btScalar heightScale,
|
const void* heightfieldData, btScalar heightScale,
|
||||||
btScalar minHeight, btScalar maxHeight,
|
btScalar minHeight, btScalar maxHeight,
|
||||||
int upAxis, PHY_ScalarType heightDataType,
|
int upAxis, PHY_ScalarType heightDataType,
|
||||||
bool flipQuadEdges);
|
bool flipQuadEdges);
|
||||||
@@ -135,7 +135,7 @@ public:
|
|||||||
compatibility reasons, heightScale is calculated as maxHeight / 65535
|
compatibility reasons, heightScale is calculated as maxHeight / 65535
|
||||||
(and is only used when useFloatData = false).
|
(and is only used when useFloatData = false).
|
||||||
*/
|
*/
|
||||||
btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,void* heightfieldData, btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges);
|
btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,const void* heightfieldData, btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges);
|
||||||
|
|
||||||
virtual ~btHeightfieldTerrainShape();
|
virtual ~btHeightfieldTerrainShape();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user