git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@255 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
dec5438d7e
commit
dfe70b3ac7
|
@ -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<Vector3D> 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<Vector3D> 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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue
Block a user