SUAPI-CppWrapper
C++WrapperforSketchUpCAPI
|
#include <Geometry.hpp>
Public Member Functions | |
Line3D () | |
Line3D (const Point3D point, const Vector3D direction) | |
Line3D (const Vector3D direction, const Point3D point) | |
Line3D (bool valid) | |
Line3D (const Line3D &other) | |
Line3D & | operator= (const Line3D &line) |
bool | operator! () const |
Point3D | intersection (const Line3D &line) const |
Point3D | intersection (const Plane3D &plane) const |
Point3D | intersection (const Point3D &point, const Vector3D &vector) const |
std::pair< Point3D, Point3D > | closest_points (const Line3D &line) const |
Point3D | closest_point (const Point3D &point) const |
double | distance (const Point3D &point) const |
bool | on_line (const Point3D &point) const |
bool | parallel (const Line3D &line) const |
bool | parallel (const Vector3D &vector) const |
Static Public Member Functions | |
static bool | on_line_segment (const Point3D &point_a, const Point3D &point_b, const Point3D &test_point) |
Data Fields | |
Point3D & | point |
Vector3D & | direction |
Friends | |
bool | operator== (const Line3D &lhs, const Line3D &rhs) |
A Line3D represents a point and a vector, which carries on into infinity in two directions. There is no equivalent native object in the Sketchup C API.
Definition at line 549 of file Geometry.hpp.
CW::Line3D::Line3D | ( | ) |
Definition at line 1001 of file Geometry.cpp.
CW::Line3D::Line3D | ( | bool | valid | ) |
Invaid, or NULL Line3D objects can be simulated with this constructor.
valid | - if true, a valid line will be created with a point and no direction. |
Definition at line 1019 of file Geometry.cpp.
CW::Line3D::Line3D | ( | const Line3D & | other | ) |
Copy constructor
Definition at line 1028 of file Geometry.cpp.
Return the closest point on the line to the point.
point | - the point for which to find the shortest point on the line |
Definition at line 1142 of file Geometry.cpp.
Return the closest points on two lines.
other_line | the line with which to find the shortest. |
Definition at line 1098 of file Geometry.cpp.
double CW::Line3D::distance | ( | const Point3D & | point | ) | const |
Return the closest distance between the line and the given point.
point | - the point for which to find the shortest distance to the line |
Definition at line 1157 of file Geometry.cpp.
Returns the intersection between this line and a line segment drawn between two points, given by a point and a vector from that point.
point | - point representing the start of the line segment. |
vector | - vector representing the direction and length of the line segment from the start point. |
bool CW::Line3D::on_line | ( | const Point3D & | point | ) | const |
Check if point is on line.
Definition at line 1163 of file Geometry.cpp.
|
static |
Check if a point lies on a line segment.
point_a | - the start point of the line segment. |
point_b | - the end point of the line segment. |
test_point | - the point to test. |
Definition at line 1213 of file Geometry.cpp.
bool CW::Line3D::operator! | ( | ) | const |
Comparative operators
Definition at line 1048 of file Geometry.cpp.
bool CW::Line3D::parallel | ( | const Line3D & | line | ) | const |
Returns true if the Line or vector given is parallel to this line.
Definition at line 1248 of file Geometry.cpp.
Compares two lines if they represent the same line.
Definition at line 1284 of file Geometry.cpp.