git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@270 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
83345270f1
commit
4a2a45eb72
|
@ -18,7 +18,8 @@
|
|||
***************************************************************************/
|
||||
|
||||
// Libraries
|
||||
#include "mathematics.h"
|
||||
#include "Quaternion.h"
|
||||
#include "Vector3D.h"
|
||||
#include <cassert>
|
||||
|
||||
// Namespace
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
// Libraries
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include "exceptions.h"
|
||||
#include "mathematics_functions.h"
|
||||
|
||||
|
@ -130,7 +131,7 @@ inline Vector3D Vector3D::crossProduct(const Vector3D& vector) const {
|
|||
|
||||
// Return true if two vectors are parallel
|
||||
inline bool Vector3D::isParallelWith(const Vector3D& vector) const {
|
||||
return (approxEqual(this->scalarProduct(vector), length() * vector.length()));
|
||||
return (approxEqual(abs(this->scalarProduct(vector)), length() * vector.length()));
|
||||
}
|
||||
|
||||
// Overloaded operator for multiplication between a number and a Vector3D (inline)
|
||||
|
|
|
@ -25,14 +25,13 @@
|
|||
// Libraries
|
||||
#include "Matrix.h"
|
||||
#include "Matrix3x3.h"
|
||||
#include "Polygon3D.h"
|
||||
#include "Quaternion.h"
|
||||
#include "Segment3D.h"
|
||||
#include "Vector.h"
|
||||
#include "Vector3D.h"
|
||||
#include "constants.h"
|
||||
#include "exceptions.h"
|
||||
#include "mathematics_functions.h"
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
@ -172,6 +171,7 @@ inline std::vector<reactphysics3d::Vector3D> movePoints(const std::vector<reactp
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
// TODO : Test this method
|
||||
// Compute the projection of a set of 3D points onto a 3D plane. The set of points is given by "points" and the plane is given by
|
||||
// a point "A" and a normal vector "normal". This method returns the initial set of points projected onto the plane.
|
||||
|
@ -311,7 +311,6 @@ inline std::vector<reactphysics3d::Vector3D> clipSegmentWithRectangleInPlane(con
|
|||
return outputSegment;
|
||||
}
|
||||
|
||||
|
||||
// TODO : Test this method
|
||||
// This method uses the Sutherland-Hodgman clipping algorithm to clip a subject polygon (given by the ordered 3D vertices in "subjectPolygon") using
|
||||
// a rectangle polygon (given by the ordered 3D vertices in "clipRectangle"). The subject polygon and the clip rectangle are in 3D but we assumed that
|
||||
|
@ -368,4 +367,5 @@ inline std::vector<reactphysics3d::Vector3D> clipPolygonWithRectangleInPlane(con
|
|||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user