From dfe70b3ac7ac5c0907fb0ef74c931d4e0ad2a7ef Mon Sep 17 00:00:00 2001 From: "chappuis.daniel" Date: Fri, 5 Feb 2010 14:39:15 +0000 Subject: [PATCH] git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@255 92aac97c-a6ce-11dd-a772-7fcde58d38e6 --- sources/reactphysics3d/body/BoundingVolume.h | 16 ++++++++-------- sources/reactphysics3d/body/OBB.cpp | 17 ----------------- sources/reactphysics3d/body/OBB.h | 1 - sources/reactphysics3d/body/RigidBody.cpp | 2 +- 4 files changed, 9 insertions(+), 27 deletions(-) diff --git a/sources/reactphysics3d/body/BoundingVolume.h b/sources/reactphysics3d/body/BoundingVolume.h index f504475d..89b0705a 100644 --- a/sources/reactphysics3d/body/BoundingVolume.h +++ b/sources/reactphysics3d/body/BoundingVolume.h @@ -40,15 +40,15 @@ class BoundingVolume { Body* body; // Pointer to the body public : - BoundingVolume(); // Constructor - virtual ~BoundingVolume(); // Destructor + BoundingVolume(); // Constructor + virtual ~BoundingVolume(); // Destructor - Body* getBodyPointer() const; // Return the body pointer - void setBodyPointer(Body* body); // Set the body pointer + Body* getBodyPointer() const; // Return the body pointer + void setBodyPointer(Body* body); // Set the body pointer virtual void updateOrientation(const Vector3D& newCenter, const Quaternion& rotationQuaternion)=0; // Update the orientation of the bounding volume according to the new orientation of the body - virtual std::vector getExtremeVertices(const Vector3D& axis) const=0; // Return all the vertices that are projected at the extreme of the projection of the bouding volume on the axis - virtual void draw() const=0; // Display the bounding volume (only for testing purpose) + virtual std::vector getExtremeVertices(const Vector3D& axis) const=0; // Return all the vertices that are projected at the extreme of the projection of the bouding volume on the axis + virtual void draw() const=0; // Display the bounding volume (only for testing purpose) }; // Return the body pointer @@ -58,8 +58,8 @@ inline Body* BoundingVolume::getBodyPointer() const { } // Set the body pointer -inline void BoundingVolume::setBodyPointer(Body* body) { - this->body = body; +inline void BoundingVolume::setBodyPointer(Body* bodyPointer) { + this->body = bodyPointer; } diff --git a/sources/reactphysics3d/body/OBB.cpp b/sources/reactphysics3d/body/OBB.cpp index a014ae57..e9df6dec 100644 --- a/sources/reactphysics3d/body/OBB.cpp +++ b/sources/reactphysics3d/body/OBB.cpp @@ -47,23 +47,6 @@ OBB::OBB(const Vector3D& center, const Vector3D& axis1, const Vector3D& axis2, this->extent[2] = extent3; } -// Copy-Constructor -OBB::OBB(const OBB& obb) { - this->center = obb.center; - - oldAxis[0] = obb.oldAxis[0]; - oldAxis[1] = obb.oldAxis[1]; - oldAxis[2] = obb.oldAxis[2]; - - this->axis[0] = obb.axis[0]; - this->axis[1] = obb.axis[1]; - this->axis[2] = obb.axis[2]; - - this->extent[0] = obb.extent[0]; - this->extent[1] = obb.extent[1]; - this->extent[2] = obb.extent[2]; -} - // Destructor OBB::~OBB() { diff --git a/sources/reactphysics3d/body/OBB.h b/sources/reactphysics3d/body/OBB.h index bfe064eb..34eb3b64 100644 --- a/sources/reactphysics3d/body/OBB.h +++ b/sources/reactphysics3d/body/OBB.h @@ -47,7 +47,6 @@ class OBB : public BoundingVolume { public : OBB(const Vector3D& center, const Vector3D& axis1, const Vector3D& axis2, const Vector3D& axis3, double extent1, double extent2, double extent3); // Constructor - OBB(const OBB& obb); // Copy-Constructor virtual ~OBB(); // Destructor Vector3D getCenter() const; // Return the center point of the OBB diff --git a/sources/reactphysics3d/body/RigidBody.cpp b/sources/reactphysics3d/body/RigidBody.cpp index 4ad160d5..01db1ee4 100644 --- a/sources/reactphysics3d/body/RigidBody.cpp +++ b/sources/reactphysics3d/body/RigidBody.cpp @@ -37,7 +37,7 @@ // Set the body pointer to the OBB this->obb.setBodyPointer(this); - } +} // Copy-constructor RigidBody::RigidBody(const RigidBody& rigidBody) : Body(rigidBody), inertiaTensor(rigidBody.inertiaTensor),