-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIntersection.h
More file actions
52 lines (41 loc) · 1.99 KB
/
Copy pathIntersection.h
File metadata and controls
52 lines (41 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Created by Ryan.Zurrin001 on 12/16/2021.
//
#ifndef PHYSICSFORMULA_INTERSECTION_H
#define PHYSICSFORMULA_INTERSECTION_H
#pragma once
// Include functions to calculate intersection between different geometric promitives
#include "Point.h"
#include "Line.h"
#include "Plane.h"
#include "Segment.h"
#include "Polygon.h"
#include "Polyhedron.h"
namespace rez {
bool intersect(rez::Line&, rez::Line&, rez::Point3d&);
// Return true if two 2d lines are intersecting and store the intersection point in final argument
// 1 - First line
// 2 - Second line
bool intersect(rez::Line2d&, rez::Line2d&, rez::Point2d&);
bool intersect(rez::Line2d&, rez::Segment2d&);
bool intersect(rez::Line2d&, rez::Segment2d&, rez::Point2d&);
//bool intersect(rez::Segment2d&, rez::Segment2d&, rez::Point2d&);
// Return true if 2d segments represeted by points are intersecting
// 1 - start point of first segment
// 2 - end point of first segmenet
// 3 - start point of second segment
// 4 - end point of second segment
bool intersect(const rez::Point2d&, const rez::Point2d&, const rez::Point2d&, const rez::Point2d&);
//// Return true if 2d segments represeted by points are intersecting. Store the intersecting point in final argument
//// 1 - start point of first segment
//// 2 - end point of first segmenet
//// 3 - start point of second segment
//// 4 - end point of second segment
//// 5 - intersection point
bool intersect(rez::Point2d&, rez::Point2d&, rez::Point2d&, rez::Point2d&, rez::Point2d&);
// Return true if Plane and Line are intersecting. Intersection point will be stored point pass as 3rd argument
bool intersect(rez::Planef&, rez::Line&, rez::Point3d&);
// Return true if the given two planes are intersecting. Store the line of intersect in the line pass as 3rd argument
bool intersect(rez::Planef&, rez::Planef&, rez::Line&);
}
#endif //PHYSICSFORMULA_INTERSECTION_H