SUAPI-CppWrapper
C++WrapperforSketchUpCAPI
|
Public Types | |
enum | Colinearity { UNDEFINED, COLINEAR_PRO, COLINEAR_ANTI, NO } |
Public Member Functions | |
Vector3D (SUVector3D su_vector) | |
Vector3D (double x, double y, double z) | |
Vector3D (bool valid) | |
Vector3D (const Edge &edge) | |
Vector3D (const Point3D &point) | |
operator SUVector3D () const | |
operator const SUVector3D * () const | |
operator Point3D () const | |
Vector3D (const Vector3D &vector) | |
Vector3D & | operator= (const Vector3D &vector) |
Vector3D & | operator= (const SUVector3D &vector) |
Vector3D | operator+ (const Vector3D &vector) const |
Vector3D | operator+ (const SUVector3D &vector) const |
Vector3D | operator- () const |
Vector3D | operator- (const Vector3D &vector) const |
Vector3D | operator- (const SUVector3D &vector) const |
Vector3D | operator* (const double &scalar) const |
Vector3D | operator/ (const double &scalar) const |
bool | operator! () const |
double | length () const |
Vector3D | unit () const |
double | angle (const Vector3D &vector_b) const |
double | dot (const Vector3D &vector2) const |
double | dot (const Point3D &point) const |
Vector3D | cross (const Vector3D &vector2) const |
Colinearity | colinear (const Vector3D &vector_b) const |
Vector3D | rotate_about (double angle, const Vector3D &axis) const |
Static Public Member Functions | |
static Vector3D | zero_vector () |
Data Fields | |
double & | x |
double & | y |
double & | z |
Static Public Attributes | |
static constexpr double | EPSILON = 0.0005 |
Protected Attributes | |
SUVector3D | m_vector |
bool | is_null = false |
Friends | |
Point3D | operator+ (const Vector3D &lhs, const Point3D &rhs) |
Vector3D | operator* (const double &lhs, const Vector3D &rhs) |
bool | operator== (const Vector3D &lhs, const Vector3D &rhs) |
bool | operator!= (const Vector3D &lhs, const Vector3D &rhs) |
Definition at line 113 of file Geometry.hpp.
CW::Vector3D::Vector3D | ( | SUVector3D | su_vector | ) |
SUVector3D objects are easily converted to Vector3D without data loss
Definition at line 136 of file Geometry.cpp.
CW::Vector3D::Vector3D | ( | bool | valid | ) |
Invaid, or NULL Vector3D objects can be simulated with this constructor.
Definition at line 150 of file Geometry.cpp.
CW::Vector3D::Vector3D | ( | const Edge & | edge | ) |
Returns the vector between start and end points of an edge.
Definition at line 159 of file Geometry.cpp.
|
explicit |
Allow conversion from Point3D.
Definition at line 172 of file Geometry.cpp.
Vector3D::Colinearity CW::Vector3D::colinear | ( | const Vector3D & | vector_b | ) | const |
Returns whether the vector is colinear.
Definition at line 318 of file Geometry.cpp.
Returns cross product with another vector
Definition at line 311 of file Geometry.cpp.
double CW::Vector3D::dot | ( | const Vector3D & | vector2 | ) | const |
Returns dot product with another vector
Definition at line 300 of file Geometry.cpp.
CW::Vector3D::operator const SUVector3D * | ( | ) | const |
Pointer to internal SUVector3D object
Definition at line 204 of file Geometry.cpp.
bool CW::Vector3D::operator! | ( | ) | const |
Validty check
Definition at line 269 of file Geometry.cpp.
Arithmetic operator overloads
Definition at line 218 of file Geometry.cpp.
Copy assignment operator
Definition at line 179 of file Geometry.cpp.
Returns a vector rotated about another vector, which is used as the axis.
angle | - in radians to rotate. |
axis | - vector which will be used as the axis through which it will be rotated. |
Definition at line 336 of file Geometry.cpp.
|
static |
Returns a valid vector that has zero length.
Definition at line 348 of file Geometry.cpp.
Allows the multiplication operator to be on the other side of the vector.
Definition at line 101 of file Geometry.cpp.
Comparator operator overloads
Definition at line 247 of file Geometry.cpp.