diff --git a/sources/reactphysics3d/collision/ProjectionInterval.cpp b/sources/reactphysics3d/collision/ProjectionInterval.cpp deleted file mode 100644 index 2b96dafb..00000000 --- a/sources/reactphysics3d/collision/ProjectionInterval.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -* Copyright (C) 2009 Daniel Chappuis * -**************************************************************************** -* This file is part of ReactPhysics3D. * -* * -* ReactPhysics3D is free software: you can redistribute it and/or modify * -* it under the terms of the GNU Lesser General Public License as published * -* by the Free Software Foundation, either version 3 of the License, or * -* (at your option) any later version. * -* * -* ReactPhysics3D is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with ReactPhysics3D. If not, see . * -***************************************************************************/ - -// Libraries -#include "ProjectionInterval.h" -#include - -// We want to use the ReactPhysics3D namespace -using namespace reactphysics3d; - -// Constructor -ProjectionInterval::ProjectionInterval() - :minType(VERTEX), maxType(VERTEX) { - boundingVolume = 0; - min = 0; - max = 0; -} - -// Constructor -ProjectionInterval::ProjectionInterval(const BoundingVolume* const boudingVolume, double min, double max, ExtremeType minType, ExtremeType maxType, std::vector minProjectedPoints, std::vector maxProjectedPoints) - :min(min), max(max), minType(minType), maxType(maxType), minProjectedPoints(minProjectedPoints), maxProjectedPoints(maxProjectedPoints) { - this->boundingVolume = boundingVolume; -} - -// Destructor -ProjectionInterval::~ProjectionInterval() { - -} diff --git a/sources/reactphysics3d/collision/ProjectionInterval.h b/sources/reactphysics3d/collision/ProjectionInterval.h deleted file mode 100644 index 0e5aca4c..00000000 --- a/sources/reactphysics3d/collision/ProjectionInterval.h +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -* Copyright (C) 2009 Daniel Chappuis * -**************************************************************************** -* This file is part of ReactPhysics3D. * -* * -* ReactPhysics3D is free software: you can redistribute it and/or modify * -* it under the terms of the GNU Lesser General Public License as published * -* by the Free Software Foundation, either version 3 of the License, or * -* (at your option) any later version. * -* * -* ReactPhysics3D is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with ReactPhysics3D. If not, see . * -***************************************************************************/ - -#ifndef PROJECTIONINTERVAL_H -#define PROJECTIONINTERVAL_H - -// Libraries -#include -#include "../body/BoundingVolume.h" -#include "../mathematics/mathematics.h" - -// ReactPhysics3D namespace -namespace reactphysics3d { - -// Type of the extreme of an interval. For instance if a extreme of an -// interval is the result of the projection of an edge, the type will be -// EDGE. -enum ExtremeType {VERTEX, EDGE, FACE}; - -/* ------------------------------------------------------------------- - Class ProjectionInterval : - This class represents an projection interval of an bounding - volume onto a separation axis. - ------------------------------------------------------------------- -*/ -class ProjectionInterval { - private : - BoundingVolume* boundingVolume; // Pointer on the bounding volume corresponding to this projection interval - double min; // Minimum of the interval - double max; // Maximum of the interval - ExtremeType minType; // Type of the extreme of the projection interval - ExtremeType maxType; // Type of the extreme of the projection interval - std::vector minProjectedPoints; // Projected points onto the minimum of the interval - std::vector maxProjectedPoints; // Projected points onto the maximum of the interval - - public : - ProjectionInterval(); // Constructor - ProjectionInterval(const BoundingVolume* const boudingVolume, double min, double max, ExtremeType minType, ExtremeType maxType, std::vector minProjectedPoints, std::vector maxProjectedPoints); // Constructor - ~ProjectionInterval(); // Destructor - - BoundingVolume* getBoundingVolumePointer() const; // Return the pointer on the bounding volume - double getMin() const; // Return the minimum of the interval - double getMax() const; // Return the maximum of the interval - ExtremeType getMinType() const; // Return the type of the minimum extreme - ExtremeType getMaxType() const; // Return the type of the maximum extreme - std::vector getMinProjectedPoints() const; // Return the projected points onto the minimum extreme - std::vector getMaxProjectedPoints() const; // Return the projected points onto the maximum extreme -}; - -// Return the pointer on the bounding volume -inline BoundingVolume* ProjectionInterval::getBoundingVolumePointer() const { - return boundingVolume; -} - -// Return the minimum of the interval -inline double ProjectionInterval::getMin() const { - return min; -} - -// Return the maximum of the interval -inline double ProjectionInterval::getMax() const { - return max; -} - -// Return the type of the minimum extreme -inline ExtremeType ProjectionInterval::getMinType() const { - return minType; -} - -// Return the type of the maximum extreme -inline ExtremeType ProjectionInterval::getMaxType() const { - return maxType; -} - -// Return the projected points onto the minimum extreme -inline std::vector ProjectionInterval::getMinProjectedPoints() const { - return minProjectedPoints; -} - -// Return the projected points onto the maximum extreme -inline std::vector ProjectionInterval::getMaxProjectedPoints() const { - return maxProjectedPoints; -} - -} // End of the ReactPhysics3D namespace - -#endif