diff --git a/testbed/common/Box.cpp b/testbed/common/Box.cpp index 6c8f052d..0720799e 100644 --- a/testbed/common/Box.cpp +++ b/testbed/common/Box.cpp @@ -39,8 +39,7 @@ int Box::totalNbBoxes = 0; // Constructor Box::Box(const openglframework::Vector3& size, const openglframework::Vector3 &position, - reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh() { + reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "cube.obj", *this); @@ -94,8 +93,7 @@ Box::Box(const openglframework::Vector3& size, const openglframework::Vector3 &p // Constructor Box::Box(const openglframework::Vector3& size, const openglframework::Vector3& position, - float mass, reactphysics3d::DynamicsWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh() { + float mass, reactphysics3d::DynamicsWorld* world, const std::string& meshFolderPath) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "cube.obj", *this); diff --git a/testbed/common/Box.h b/testbed/common/Box.h index 53da204e..0c21be36 100644 --- a/testbed/common/Box.h +++ b/testbed/common/Box.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class Box -class Box : public openglframework::Mesh, public PhysicsObject { +class Box : public PhysicsObject { private : diff --git a/testbed/common/Capsule.cpp b/testbed/common/Capsule.cpp index ba6a45b4..e9ae2b40 100644 --- a/testbed/common/Capsule.cpp +++ b/testbed/common/Capsule.cpp @@ -37,7 +37,7 @@ int Capsule::totalNbCapsules = 0; Capsule::Capsule(float radius, float height, const openglframework::Vector3& position, reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius), mHeight(height) { + : mRadius(radius), mHeight(height) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "capsule.obj", *this); @@ -86,7 +86,7 @@ Capsule::Capsule(float radius, float height, const openglframework::Vector3& pos Capsule::Capsule(float radius, float height, const openglframework::Vector3& position, float mass, reactphysics3d::DynamicsWorld* dynamicsWorld, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius), mHeight(height) { + : mRadius(radius), mHeight(height) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "capsule.obj", *this); diff --git a/testbed/common/Capsule.h b/testbed/common/Capsule.h index 748fa46b..2a97b14b 100644 --- a/testbed/common/Capsule.h +++ b/testbed/common/Capsule.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class Sphere -class Capsule : public openglframework::Mesh, public PhysicsObject { +class Capsule : public PhysicsObject { private : diff --git a/testbed/common/ConcaveMesh.cpp b/testbed/common/ConcaveMesh.cpp index c21732f8..2f0360ba 100644 --- a/testbed/common/ConcaveMesh.cpp +++ b/testbed/common/ConcaveMesh.cpp @@ -30,7 +30,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position, reactphysics3d::CollisionWorld* world, const std::string& meshPath) - : openglframework::Mesh(), mVBOVertices(GL_ARRAY_BUFFER), + : mVBOVertices(GL_ARRAY_BUFFER), mVBONormals(GL_ARRAY_BUFFER), mVBOTextureCoords(GL_ARRAY_BUFFER), mVBOIndices(GL_ELEMENT_ARRAY_BUFFER) { @@ -87,7 +87,7 @@ ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position, ConcaveMesh::ConcaveMesh(const openglframework::Vector3 &position, float mass, reactphysics3d::DynamicsWorld* dynamicsWorld, const std::string& meshPath) - : openglframework::Mesh(), mVBOVertices(GL_ARRAY_BUFFER), + : mVBOVertices(GL_ARRAY_BUFFER), mVBONormals(GL_ARRAY_BUFFER), mVBOTextureCoords(GL_ARRAY_BUFFER), mVBOIndices(GL_ELEMENT_ARRAY_BUFFER) { diff --git a/testbed/common/ConcaveMesh.h b/testbed/common/ConcaveMesh.h index 3c645ec8..e4b33308 100644 --- a/testbed/common/ConcaveMesh.h +++ b/testbed/common/ConcaveMesh.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class ConcaveMesh -class ConcaveMesh : public openglframework::Mesh, public PhysicsObject { +class ConcaveMesh : public PhysicsObject { private : diff --git a/testbed/common/Cone.cpp b/testbed/common/Cone.cpp index 07a825a8..96f52c54 100644 --- a/testbed/common/Cone.cpp +++ b/testbed/common/Cone.cpp @@ -37,7 +37,7 @@ int Cone::totalNbCones = 0; Cone::Cone(float radius, float height, const openglframework::Vector3 &position, reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius), mHeight(height) { + : mRadius(radius), mHeight(height) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "cone.obj", *this); @@ -85,7 +85,7 @@ Cone::Cone(float radius, float height, const openglframework::Vector3 &position, Cone::Cone(float radius, float height, const openglframework::Vector3 &position, float mass, reactphysics3d::DynamicsWorld* dynamicsWorld, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius), mHeight(height) { + : mRadius(radius), mHeight(height) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "cone.obj", *this); diff --git a/testbed/common/Cone.h b/testbed/common/Cone.h index e4f7face..6fc35182 100644 --- a/testbed/common/Cone.h +++ b/testbed/common/Cone.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class Cone -class Cone : public openglframework::Mesh, public PhysicsObject { +class Cone : public PhysicsObject { private : diff --git a/testbed/common/ConvexMesh.cpp b/testbed/common/ConvexMesh.cpp index ca372a1f..c107724f 100644 --- a/testbed/common/ConvexMesh.cpp +++ b/testbed/common/ConvexMesh.cpp @@ -30,7 +30,7 @@ ConvexMesh::ConvexMesh(const openglframework::Vector3 &position, reactphysics3d::CollisionWorld* world, const std::string& meshPath) - : openglframework::Mesh(), mVBOVertices(GL_ARRAY_BUFFER), + : mVBOVertices(GL_ARRAY_BUFFER), mVBONormals(GL_ARRAY_BUFFER), mVBOTextureCoords(GL_ARRAY_BUFFER), mVBOIndices(GL_ELEMENT_ARRAY_BUFFER) { @@ -81,7 +81,7 @@ ConvexMesh::ConvexMesh(const openglframework::Vector3 &position, ConvexMesh::ConvexMesh(const openglframework::Vector3 &position, float mass, reactphysics3d::DynamicsWorld* dynamicsWorld, const std::string& meshPath) - : openglframework::Mesh(), mVBOVertices(GL_ARRAY_BUFFER), + : mVBOVertices(GL_ARRAY_BUFFER), mVBONormals(GL_ARRAY_BUFFER), mVBOTextureCoords(GL_ARRAY_BUFFER), mVBOIndices(GL_ELEMENT_ARRAY_BUFFER) { diff --git a/testbed/common/ConvexMesh.h b/testbed/common/ConvexMesh.h index a4a2ffab..19b39220 100644 --- a/testbed/common/ConvexMesh.h +++ b/testbed/common/ConvexMesh.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class ConvexMesh -class ConvexMesh : public openglframework::Mesh, public PhysicsObject { +class ConvexMesh : public PhysicsObject { private : diff --git a/testbed/common/Cylinder.cpp b/testbed/common/Cylinder.cpp index d5ec1964..9b520d5c 100644 --- a/testbed/common/Cylinder.cpp +++ b/testbed/common/Cylinder.cpp @@ -37,7 +37,7 @@ int Cylinder::totalNbCylinders = 0; Cylinder::Cylinder(float radius, float height, const openglframework::Vector3& position, reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius), mHeight(height) { + : mRadius(radius), mHeight(height) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "cylinder.obj", *this); @@ -85,7 +85,7 @@ Cylinder::Cylinder(float radius, float height, const openglframework::Vector3& p Cylinder::Cylinder(float radius, float height, const openglframework::Vector3& position, float mass, reactphysics3d::DynamicsWorld* dynamicsWorld, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius), mHeight(height) { + : mRadius(radius), mHeight(height) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "cylinder.obj", *this); diff --git a/testbed/common/Cylinder.h b/testbed/common/Cylinder.h index eb7ba72d..4aab2dc9 100644 --- a/testbed/common/Cylinder.h +++ b/testbed/common/Cylinder.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class Cylinder -class Cylinder : public openglframework::Mesh, public PhysicsObject { +class Cylinder : public PhysicsObject { private : diff --git a/testbed/common/Dumbbell.cpp b/testbed/common/Dumbbell.cpp index e590d033..770f8ec1 100644 --- a/testbed/common/Dumbbell.cpp +++ b/testbed/common/Dumbbell.cpp @@ -35,8 +35,7 @@ int Dumbbell::totalNbDumbbells = 0; // Constructor Dumbbell::Dumbbell(const openglframework::Vector3 &position, - reactphysics3d::DynamicsWorld* dynamicsWorld, const std::string& meshFolderPath) - : openglframework::Mesh() { + reactphysics3d::DynamicsWorld* dynamicsWorld, const std::string& meshFolderPath) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "dumbbell.obj", *this); @@ -106,8 +105,7 @@ Dumbbell::Dumbbell(const openglframework::Vector3 &position, // Constructor Dumbbell::Dumbbell(const openglframework::Vector3 &position, - reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh() { + reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "dumbbell.obj", *this); diff --git a/testbed/common/Dumbbell.h b/testbed/common/Dumbbell.h index 4d44a38b..5ce3ec95 100644 --- a/testbed/common/Dumbbell.h +++ b/testbed/common/Dumbbell.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class Sphere -class Dumbbell : public openglframework::Mesh, public PhysicsObject { +class Dumbbell : public PhysicsObject { private : diff --git a/testbed/common/HeightField.cpp b/testbed/common/HeightField.cpp index 38eda261..55da4e1d 100644 --- a/testbed/common/HeightField.cpp +++ b/testbed/common/HeightField.cpp @@ -30,7 +30,7 @@ // Constructor HeightField::HeightField(const openglframework::Vector3 &position, reactphysics3d::CollisionWorld* world) - : openglframework::Mesh(), mVBOVertices(GL_ARRAY_BUFFER), + : mVBOVertices(GL_ARRAY_BUFFER), mVBONormals(GL_ARRAY_BUFFER), mVBOTextureCoords(GL_ARRAY_BUFFER), mVBOIndices(GL_ELEMENT_ARRAY_BUFFER) { @@ -73,7 +73,7 @@ HeightField::HeightField(const openglframework::Vector3 &position, // Constructor HeightField::HeightField(const openglframework::Vector3 &position, float mass, reactphysics3d::DynamicsWorld* dynamicsWorld) - : openglframework::Mesh(), mVBOVertices(GL_ARRAY_BUFFER), + : mVBOVertices(GL_ARRAY_BUFFER), mVBONormals(GL_ARRAY_BUFFER), mVBOTextureCoords(GL_ARRAY_BUFFER), mVBOIndices(GL_ELEMENT_ARRAY_BUFFER) { diff --git a/testbed/common/HeightField.h b/testbed/common/HeightField.h index d4a4895d..d9851992 100644 --- a/testbed/common/HeightField.h +++ b/testbed/common/HeightField.h @@ -33,7 +33,7 @@ // Class HeightField -class HeightField : public openglframework::Mesh, public PhysicsObject { +class HeightField : public PhysicsObject { private : diff --git a/testbed/common/PhysicsObject.cpp b/testbed/common/PhysicsObject.cpp index c176bb5d..c69f9485 100644 --- a/testbed/common/PhysicsObject.cpp +++ b/testbed/common/PhysicsObject.cpp @@ -27,7 +27,7 @@ #include "PhysicsObject.h" /// Constructor -PhysicsObject::PhysicsObject() { +PhysicsObject::PhysicsObject() : openglframework::Mesh() { mColor = openglframework::Color(1, 1, 1, 1); mSleepingColor = openglframework::Color(1, 0, 0, 1); diff --git a/testbed/common/PhysicsObject.h b/testbed/common/PhysicsObject.h index 5a54d6d0..bc470091 100644 --- a/testbed/common/PhysicsObject.h +++ b/testbed/common/PhysicsObject.h @@ -31,7 +31,7 @@ #include "reactphysics3d.h" // Class PhysicsObject -class PhysicsObject { +class PhysicsObject : public openglframework::Mesh { protected: diff --git a/testbed/common/Sphere.cpp b/testbed/common/Sphere.cpp index 236a81ad..93c48af2 100644 --- a/testbed/common/Sphere.cpp +++ b/testbed/common/Sphere.cpp @@ -37,7 +37,7 @@ int Sphere::totalNbSpheres = 0; Sphere::Sphere(float radius, const openglframework::Vector3 &position, reactphysics3d::CollisionWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius) { + : mRadius(radius) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "sphere.obj", *this); @@ -86,7 +86,7 @@ Sphere::Sphere(float radius, const openglframework::Vector3 &position, Sphere::Sphere(float radius, const openglframework::Vector3 &position, float mass, reactphysics3d::DynamicsWorld* world, const std::string& meshFolderPath) - : openglframework::Mesh(), mRadius(radius) { + : mRadius(radius) { // Load the mesh from a file openglframework::MeshReaderWriter::loadMeshFromFile(meshFolderPath + "sphere.obj", *this); diff --git a/testbed/common/Sphere.h b/testbed/common/Sphere.h index 5fdfcfe9..d941d984 100644 --- a/testbed/common/Sphere.h +++ b/testbed/common/Sphere.h @@ -32,7 +32,7 @@ #include "PhysicsObject.h" // Class Sphere -class Sphere : public openglframework::Mesh, public PhysicsObject { +class Sphere : public PhysicsObject { private : diff --git a/testbed/scenes/cubes/CubesScene.cpp b/testbed/scenes/cubes/CubesScene.cpp index 17af45c1..81929e58 100644 --- a/testbed/scenes/cubes/CubesScene.cpp +++ b/testbed/scenes/cubes/CubesScene.cpp @@ -195,19 +195,19 @@ void CubesScene::reset() { float radius = 2.0f; - for (int i=0; iresetTransform(transform); - } +// mBoxes[i]->resetTransform(transform); +// } }