40 #include <SketchUpAPI/geometry.h> 41 #include <SketchUpAPI/model/edge.h> 42 #include <SketchUpAPI/model/face.h> 60 static constexpr
double PI = 3.141592653589793;
61 static constexpr
double PI2 = PI * 2;
63 constexpr
static double EPSILON = 0.0000000000005;
76 operator double()
const;
87 Radians operator-(
const double value)
const;
88 Radians operator*(
const double multiplier)
const;
89 Radians operator/(
const double divider)
const;
91 bool operator==(
const Radians& rhs)
const;
92 bool operator==(
const double rhs)
const;
100 bool closest(
const Radians& value);
117 bool is_null =
false;
123 constexpr
static double EPSILON = 0.0005;
130 Vector3D(
double x,
double y,
double z);
150 operator SUVector3D()
const;
155 operator const SUVector3D*()
const;
182 Vector3D operator-(
const SUVector3D &vector)
const {
return *
this -
Vector3D(vector);}
183 Vector3D operator*(
const double &scalar)
const;
184 Vector3D operator/(
const double &scalar)
const;
201 bool operator!()
const;
207 double length()
const;
217 double angle(
const Vector3D& vector_b)
const;
222 double dot(
const Vector3D& vector2)
const;
223 double dot(
const Point3D& point)
const;
230 enum class Colinearity {
239 Colinearity colinear(
const Vector3D& vector_b)
const;
267 bool is_null =
false;
271 constexpr
static double EPSILON = 0.0005;
305 Point3D(
double x,
double y,
double z);
325 operator SUPoint3D()
const;
326 operator const SUPoint3D*()
const;
339 Vector3D operator-(
const Point3D &point)
const;
340 Point3D operator-(
const Vector3D &vector)
const;
341 Point3D operator-(
const SUPoint3D &point)
const;
342 Point3D operator*(
const double &scalar)
const;
343 Point3D operator/(
const double &scalar)
const;
348 bool operator!()
const;
359 static Point3D intersection_between_lines(
const Point3D& point_a,
const Vector3D& vector_a,
const Point3D& point_b,
const Vector3D& vector_b,
bool return_colinear =
false);
370 static Point3D ray_line_intersection(
const Point3D& point_a,
const Vector3D& vector_a,
const Point3D& point_b,
const Vector3D& ray_b,
bool return_colinear =
false);
385 bool is_null =
false;
386 constexpr
static double EPSILON = 0.0005;
395 Plane3D(
const SUPlane3D plane);
396 Plane3D(
double a,
double b,
double c,
double d);
419 operator SUPlane3D()
const;
424 bool operator!()
const;
432 bool coplanar(
const Plane3D& test_plane)
const;
465 double angle_with(
const Plane3D& plane2)
const;
466 double angle(
const Plane3D& plane2)
const {
return angle_with(plane2);};
471 double distance(
const Point3D& point)
const;
476 bool on_plane(
const Point3D& point)
const;
481 Plane3D offset(
double offset_by)
const;
486 bool parallel(
const Plane3D& plane2)
const;
499 static Plane3D plane_from_loop(
const std::vector<Point3D>& loop_points);
504 SUBoundingBox3D m_bounding_box;
505 bool is_null =
false;
517 operator SUBoundingBox3D()
const;
522 bool operator!()
const;
532 void min_point(
const Point3D& point);
542 void max_point(
const Point3D& point);
553 bool is_null =
false;
554 constexpr
static double EPSILON = 0.0005;
581 bool operator!()
const;
600 std::pair<Point3D, Point3D> closest_points(
const Line3D &line)
const;
614 double distance(
const Point3D& point)
const;
619 bool on_line(
const Point3D& point)
const;
628 static bool on_line_segment(
const Point3D& point_a,
const Point3D& point_b,
const Point3D& test_point);
633 bool parallel(
const Line3D &line)
const;
634 bool parallel(
const Vector3D &vector)
const;
639 friend bool operator==(
const Line3D& lhs,
const Line3D& rhs);
Radians operator+(const double value) const
double difference(const Radians &other) const
Radians & operator=(const Radians &radians)