git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@336 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
282c004599
commit
085740e765
|
@ -261,6 +261,17 @@ inline void computeParallelSegmentsIntersection(const reactphysics3d::Vector3D&
|
||||||
// The segment is given by the two vertices in "segment" and the rectangle is given by the ordered vertices in "clipRectangle".
|
// The segment is given by the two vertices in "segment" and the rectangle is given by the ordered vertices in "clipRectangle".
|
||||||
// This method returns the clipped segment.
|
// This method returns the clipped segment.
|
||||||
inline std::vector<reactphysics3d::Vector3D> clipSegmentWithRectangleInPlane(const std::vector<reactphysics3d::Vector3D>& segment, const std::vector<reactphysics3d::Vector3D> clipRectangle) {
|
inline std::vector<reactphysics3d::Vector3D> clipSegmentWithRectangleInPlane(const std::vector<reactphysics3d::Vector3D>& segment, const std::vector<reactphysics3d::Vector3D> clipRectangle) {
|
||||||
|
for (int i=0; i<segment.size(); i++) {
|
||||||
|
std::cout << "Segment " << i << " X = " << segment.at(i).getX() << std::endl;
|
||||||
|
std::cout << "Segment " << i << " Y = " << segment.at(i).getY() << std::endl;
|
||||||
|
std::cout << "Segment " << i << " Z = " << segment.at(i).getZ() << std::endl;
|
||||||
|
}
|
||||||
|
for (int i=0; i<clipRectangle.size(); i++) {
|
||||||
|
std::cout << "Rectangle " << i << " X = " << clipRectangle.at(i).getX() << std::endl;
|
||||||
|
std::cout << "Rectangle " << i << " Y = " << clipRectangle.at(i).getY() << std::endl;
|
||||||
|
std::cout << "Rectangle " << i << " Z = " << clipRectangle.at(i).getZ() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
assert(segment.size() == 2);
|
assert(segment.size() == 2);
|
||||||
assert(clipRectangle.size() == 4);
|
assert(clipRectangle.size() == 4);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user