From 744484e06438b8c1f0788c19edf70ff30794f212 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Tue, 22 Mar 2016 07:29:20 +0100 Subject: [PATCH] Use float height data for HeightField in HeightField scenes in testbed --- testbed/common/HeightField.cpp | 2 +- testbed/common/HeightField.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testbed/common/HeightField.cpp b/testbed/common/HeightField.cpp index 5240c05f..fc72babf 100644 --- a/testbed/common/HeightField.cpp +++ b/testbed/common/HeightField.cpp @@ -92,7 +92,7 @@ HeightField::HeightField(const openglframework::Vector3 &position, float mass, // Create the collision shape for the rigid body (convex mesh shape) and // do not forget to delete it at the end mHeightFieldShape = new rp3d::HeightFieldShape(NB_POINTS_WIDTH, NB_POINTS_LENGTH, mMinHeight, mMaxHeight, - mHeightData, rp3d::HeightFieldShape::HEIGHT_INT_TYPE); + mHeightData, rp3d::HeightFieldShape::HEIGHT_FLOAT_TYPE); // Initial position and orientation of the rigid body rp3d::Vector3 initPosition(position.x, position.y, position.z); diff --git a/testbed/common/HeightField.h b/testbed/common/HeightField.h index bc08b4a4..dc7b87b2 100644 --- a/testbed/common/HeightField.h +++ b/testbed/common/HeightField.h @@ -43,7 +43,7 @@ class HeightField : public openglframework::Mesh, public PhysicsObject { // -------------------- Attributes -------------------- // /// Height field data - int mHeightData[NB_POINTS_WIDTH * NB_POINTS_LENGTH]; + float mHeightData[NB_POINTS_WIDTH * NB_POINTS_LENGTH]; /// Previous transform (for interpolation) rp3d::Transform mPreviousTransform;