SUAPI-CppWrapper
C++WrapperforSketchUpCAPI
Public Member Functions | Static Public Member Functions | Data Fields | Friends
CW::Plane3D Class Reference

Public Member Functions

 Plane3D (const SUPlane3D plane)
 
 Plane3D (double a, double b, double c, double d)
 
 Plane3D (const Face &face)
 
 Plane3D (bool invalid)
 
 Plane3D (const Vector3D &normal, const Point3D &point)
 
 Plane3D (const Point3D &point, const Vector3D &normal)
 
 Plane3D (const Plane3D &plane)
 
Plane3Doperator= (const Plane3D &plane)
 
 operator SUPlane3D () const
 
bool operator! () const
 
bool coplanar (const Plane3D &test_plane) const
 
Vector3D normal () const
 
Line3D intersection (const Plane3D &plane2) const
 
Point3D intersection (const Line3D &line) const
 
Point3D intersection (const Point3D &start_point, const Vector3D &direction) const
 
Point3D intersection_between (const Point3D &point_a, const Point3D &point_b) const
 
double angle_with (const Plane3D &plane2) const
 
double angle (const Plane3D &plane2) const
 
double distance (const Point3D &point) const
 
bool on_plane (const Point3D &point) const
 
Plane3D offset (double offset_by) const
 
bool parallel (const Plane3D &plane2) const
 
Plane3D inverse () const
 

Static Public Member Functions

static Plane3D plane_from_loop (const std::vector< Point3D > &loop_points)
 

Data Fields

double & a
 
double & b
 
double & c
 
double & d
 

Friends

bool operator== (const Plane3D &lhs, const Plane3D &rhs)
 
bool operator!= (const Plane3D &lhs, const Plane3D &rhs)
 

Detailed Description

Definition at line 382 of file Geometry.hpp.

Constructor & Destructor Documentation

CW::Plane3D::Plane3D ( bool  invalid)

Invaid, or NULL Plane3D objects can be simulated with this constructor.

Definition at line 718 of file Geometry.cpp.

CW::Plane3D::Plane3D ( const Vector3D normal,
const Point3D point 
)

Create a plane using a point and a vector.

Definition at line 709 of file Geometry.cpp.

Member Function Documentation

bool CW::Plane3D::coplanar ( const Plane3D test_plane) const

Checks if geometry is on the plane

Definition at line 772 of file Geometry.cpp.

double CW::Plane3D::distance ( const Point3D point) const

Returns the distance of a point from the plane. It can be negative as the plane has a front and back side.

Definition at line 838 of file Geometry.cpp.

Line3D CW::Plane3D::intersection ( const Plane3D plane2) const

Returns line of intersection between two planes

Definition at line 782 of file Geometry.cpp.

Point3D CW::Plane3D::intersection ( const Line3D line) const

Returns point where a line intersects this plane.

Definition at line 795 of file Geometry.cpp.

Point3D CW::Plane3D::intersection ( const Point3D start_point,
const Vector3D direction 
) const

Returns point where a ray drawn from the given point intersects this plane. Note that this is different from a line, which effectively draws a ray in both directions of the point.

Parameters
start_point- the point from which the ray will be drawn from.
direction- vector representing the direction of the ray.
Returns
point of the intersection, or a null Point3D object if no intersection exists.

Definition at line 800 of file Geometry.cpp.

Point3D CW::Plane3D::intersection_between ( const Point3D point_a,
const Point3D point_b 
) const

Returns point at which a line segment drawn from point A to point B intersects the plane.

Parameters
point_a- the start of the line segment.
point_b- the end of the line segment.
Returns
point of the intersection, or a null Point3D object if no intersection exists.

Definition at line 824 of file Geometry.cpp.

Plane3D CW::Plane3D::inverse ( ) const

Returns a Plane with normals reversed.

Definition at line 870 of file Geometry.cpp.

Vector3D CW::Plane3D::normal ( ) const

Returns the normal of the plane

Definition at line 834 of file Geometry.cpp.

Plane3D CW::Plane3D::offset ( double  offset_by) const

Returns a plane moved along normal by given amount.

Definition at line 851 of file Geometry.cpp.

bool CW::Plane3D::on_plane ( const Point3D point) const

Returns true if the point is on the plane, within SketchUp's tolerance.

Definition at line 842 of file Geometry.cpp.

CW::Plane3D::operator SUPlane3D ( ) const

Implicit conversion to SUPlane3D

Definition at line 889 of file Geometry.cpp.

bool CW::Plane3D::operator! ( ) const

Comparative operators

Definition at line 740 of file Geometry.cpp.

bool CW::Plane3D::parallel ( const Plane3D plane2) const

Checks if the plane is parallel with another.

Definition at line 856 of file Geometry.cpp.

Plane3D CW::Plane3D::plane_from_loop ( const std::vector< Point3D > &  loop_points)
static

Create a plane from a series of points (normally vertexes within a loop).

Note that the normal of the returned plane (if successful) will point in the direction expected of an OUTER_LOOP.

Definition at line 892 of file Geometry.cpp.

Friends And Related Function Documentation

bool operator== ( const Plane3D lhs,
const Plane3D rhs 
)
friend

Comparative operators

Definition at line 750 of file Geometry.cpp.


The documentation for this class was generated from the following files: