SUAPI-CppWrapper
C++WrapperforSketchUpCAPI
|
Public Member Functions | |
Point3D () | |
Point3D (bool valid) | |
Point3D (SUPoint3D su_point) | |
Point3D (SUVector3D su_vector) | |
Point3D (double x, double y, double z) | |
Point3D (const Point3D &other) | |
Point3D (const Vector3D &vector) | |
Point3D & | operator= (const Point3D &point) |
operator SUPoint3D () const | |
operator const SUPoint3D * () const | |
operator Vector3D () const | |
Point3D | operator+ (const Point3D &point) const |
Point3D | operator+ (const Vector3D &vector) const |
Point3D | operator+ (const SUPoint3D &point) const |
Vector3D | operator- (const Point3D &point) const |
Point3D | operator- (const Vector3D &vector) const |
Point3D | operator- (const SUPoint3D &point) const |
Point3D | operator* (const double &scalar) const |
Point3D | operator/ (const double &scalar) const |
bool | operator! () const |
Static Public Member Functions | |
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) |
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) |
Data Fields | |
double & | x |
double & | y |
double & | z |
Static Public Attributes | |
static constexpr double | EPSILON = 0.0005 |
Friends | |
bool | operator== (const Point3D &lhs, const Point3D &rhs) |
bool | operator!= (const Point3D &lhs, const Point3D &rhs) |
Definition at line 264 of file Geometry.hpp.
CW::Point3D::Point3D | ( | ) |
Invaid, or NULL Point3D objects can be simulated with this constructor.
Definition at line 356 of file Geometry.cpp.
CW::Point3D::Point3D | ( | bool | valid | ) |
Constructs a NULL object, or a point with zero values as coordinates.
valid | - true for an object with zero values, or false for a null object. |
Definition at line 360 of file Geometry.cpp.
CW::Point3D::Point3D | ( | SUPoint3D | su_point | ) |
Constructs a Point3D object from a SUPoint3D object.
su_point | - SUPoint3D object to be wrapped in this object. |
Definition at line 368 of file Geometry.cpp.
CW::Point3D::Point3D | ( | SUVector3D | su_vector | ) |
Constructs a Point3D object from a SUVector3D object.
su_vector | - SUVector3D object to be converted to this object. |
Definition at line 375 of file Geometry.cpp.
CW::Point3D::Point3D | ( | double | x, |
double | y, | ||
double | z | ||
) |
Constructs a Point3D object from given x y z coordinates.
x | - the X coordinate of the point. |
y | - the Y coordinate of the point. |
z | - the Z coordinate of the point. |
Definition at line 379 of file Geometry.cpp.
CW::Point3D::Point3D | ( | const Point3D & | other | ) |
Copy Constructor
Definition at line 383 of file Geometry.cpp.
|
explicit |
Allows conversion from Vector3D
Definition at line 390 of file Geometry.cpp.
|
static |
Returns intersection between two line segments. Each line segment is represented by a point and a vector.
return_colinear | - if line segments overlap, return the point at which line A first interacts. with line B. If set to false, a null point will be returned for overlapping lines. |
Static method
Definition at line 495 of file Geometry.cpp.
bool CW::Point3D::operator! | ( | ) | const |
Comparative operators
Definition at line 463 of file Geometry.cpp.
Arithmetic operator overloads
Definition at line 417 of file Geometry.cpp.
Copy assignment operator
Definition at line 394 of file Geometry.cpp.
|
static |
Returns the point of intersection between a line segment and a ray drawn from a point.
point_a | - start point of the line segment to intersect |
vector_a | - vector to the end point of the line segment to intersect |
point_b | - start point of the ray that will be intersected with the line. |
ray_b | - the vector of the direction of the ray to intersect with the line. |
return_colinear | - (optional) if the line and ray is collinear, setting this flag to false will mean no intersection will be returned. Otherwise, the first point at which the ray and line becomes colinear is returned. |
Definition at line 575 of file Geometry.cpp.