OpenStudioCore:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
openstudio::Plane Class Reference

#include <Plane.hpp>

Public Member Functions

double a () const
 coefficient a More...
 
double b () const
 coefficient b More...
 
double c () const
 coefficient c More...
 
double d () const
 coefficient d More...
 
bool equal (const Plane &other, double tol=0.001) const
 is this plane equal to the other plane true if dot product of outward normals is >= (1-tol) and abs(d1-d2) <= tol More...
 
Vector3d outwardNormal () const
 get the outward normal of this plane More...
 
bool parallel (const Plane &other, double tol=0.001) const
 is this plane parallel to the other plane true if absolute value of dot product of outward normals is >= (1-tol) More...
 
 Plane (const Plane &other)
 copy constructor More...
 
 Plane (const Point3d &point, const Vector3d &outwardNormal)
 construct with point and outward normal, throws openstudio::Exception if outwardNormal has 0 length. More...
 
 Plane (const std::vector< Point3d > &points)
 construct with points, will fit least squares plane. More...
 
bool pointOnPlane (const Point3d &point, double tol=0.001) const
 returns true if the point is on this plane More...
 
Point3d project (const Point3d &point) const
 project a point to this plane More...
 
std::vector< Point3dproject (const std::vector< Point3d > &points) const
 project a vector of points to this plane More...
 
bool reverseEqual (const Plane &other, double tol=0.001) const
 is this plane reverse equal to the other plane true if dot product of outward normals is <= (-1+tol) and abs(d1+d2) <= tol More...
 
Plane reversePlane () const
 flip the plane so outward normal is opposite More...
 
virtual ~Plane ()
 virtual destructor More...
 

Detailed Description

Plane defines an infinite plane in 3D space.

The equation of a plane is a*x + b*y + c*z = d, any point that satisfies this equation is on the plane.

Constructor & Destructor Documentation

openstudio::Plane::Plane ( const Plane other)

copy constructor

openstudio::Plane::Plane ( const Point3d point,
const Vector3d outwardNormal 
)

construct with point and outward normal, throws openstudio::Exception if outwardNormal has 0 length.

openstudio::Plane::Plane ( const std::vector< Point3d > &  points)

construct with points, will fit least squares plane.

attempts to align outward normal with that of the points (according to right hand rule). throws openstudio::Exception if cannot compute plane for these points.

virtual openstudio::Plane::~Plane ( )
virtual

virtual destructor

Member Function Documentation

double openstudio::Plane::a ( ) const

coefficient a

double openstudio::Plane::b ( ) const

coefficient b

double openstudio::Plane::c ( ) const

coefficient c

double openstudio::Plane::d ( ) const

coefficient d

bool openstudio::Plane::equal ( const Plane other,
double  tol = 0.001 
) const

is this plane equal to the other plane true if dot product of outward normals is >= (1-tol) and abs(d1-d2) <= tol

Vector3d openstudio::Plane::outwardNormal ( ) const

get the outward normal of this plane

bool openstudio::Plane::parallel ( const Plane other,
double  tol = 0.001 
) const

is this plane parallel to the other plane true if absolute value of dot product of outward normals is >= (1-tol)

bool openstudio::Plane::pointOnPlane ( const Point3d point,
double  tol = 0.001 
) const

returns true if the point is on this plane

Point3d openstudio::Plane::project ( const Point3d point) const

project a point to this plane

std::vector<Point3d> openstudio::Plane::project ( const std::vector< Point3d > &  points) const

project a vector of points to this plane

bool openstudio::Plane::reverseEqual ( const Plane other,
double  tol = 0.001 
) const

is this plane reverse equal to the other plane true if dot product of outward normals is <= (-1+tol) and abs(d1+d2) <= tol

Plane openstudio::Plane::reversePlane ( ) const

flip the plane so outward normal is opposite