28 #include "utility/utils/misc_utils/matem.h"    29 #include "Surface3d.h"    30 #include "utility/geom/pos_vec/Pos3d.h"    31 #include "utility/geom/pos_vec/Pos3dList.h"    32 #include "../cgal_types.h"    54     typedef enum{AHEAD,BEHIND,INSIDE,CROSSES} polygon_classification;
    57     static polygon_classification 
clfpnt2clfpol(
const CGAL::Oriented_side os);
    60     explicit Plane(
const CGPlane_3 &cgp);
    69     explicit Plane(
const boost::python::list &);
    70     template <
typename InputIterator>
    71     Plane(InputIterator begin,InputIterator end);
    75     virtual GeomObj *getCopy(
void) 
const;
    76     const CGPlane_3 &ToCGAL(
void)
 const    79     virtual GEOM_FT 
GetMax(
unsigned short int)
 const    81     virtual GEOM_FT 
GetMin(
unsigned short int i)
 const    89     boost::python::list 
Projection(
const boost::python::list &) 
const;
    99     Plane getSwap(
void) 
const;
   101     bool positiveSide(
const Pos3d &p) 
const;
   102     bool negativeSide(
const Pos3d &p) 
const;
   104     virtual bool In(
const Pos3d &p, 
const GEOM_FT &tol= 0.0) 
const;
   106     CGAL::Oriented_side ClassifyPoint(
const Pos3d &p) 
const;
   108     template <
typename InputIterator>
   109     polygon_classification ClassifyPoints(InputIterator first,InputIterator last) 
const;
   110     polygon_classification classifyPolygon(
const Polygon3d &pol) 
const;
   115     virtual GEOM_FT 
dist(
const Pos3d &p) 
const;
   118       { ThreePoints(p1,p2,p3); }
   122     GEOM_FT 
x(
const Pos2d &p) 
const;
   123     GEOM_FT 
y(
const Pos2d &p) 
const;
   124     GEOM_FT 
z(
const Pos2d &p) 
const;
   129     inline virtual GEOM_FT 
Ix(
void)
 const   132     inline virtual GEOM_FT 
Iy(
void)
 const   135     inline virtual GEOM_FT 
Iz(
void)
 const   168     template <
typename InputIterator>
   171     friend Plane FromCGAL(
const CGPlane_3 &);
   172     void Print(std::ostream &os) 
const;
   175 Plane FromCGAL(
const CGPlane_3 &);
   191 bool parallel(
const Plane &p1, 
const Plane &p2);
   214 template <
typename InputIterator>
   215 Plane::polygon_classification Plane::ClassifyPoints(InputIterator first,InputIterator last)
 const   217     InputIterator i= first;
   218     CGAL::Oriented_side cf_pinic= ClassifyPoint(*i); i++;
   221         const CGAL::Oriented_side cf_point= ClassifyPoint(*i);
   222         if(cf_point!=cf_pinic)
   224             if(cf_pinic!=CGAL::ON_ORIENTED_BOUNDARY) 
   225               if(cf_point!=CGAL::ON_ORIENTED_BOUNDARY) 
   230               if(cf_point!=CGAL::ON_ORIENTED_BOUNDARY) 
   245 template <
typename InputIterator>
   249     GEOM_FT quality(0.0);
   250     cgp= pointList.linearLeastSquaresFittingPlane(quality);
   253 template <
typename InputIterator>
   254 Plane::Plane(InputIterator begin,InputIterator end)
   257     const size_t sz= std::distance(begin,end); 
   261           << 
"; the list must contain at least three points."    266         const InputIterator i= begin;
   268     InputIterator j= i;j++;
   270     InputIterator k= j; k++;
   272         ThreePoints(pi,pj,pk);
 Line3d XZTrace(void) const
Return the trace on the XZ plane. 
Definition: Plane.cc:498
bool intersects(const Plane &) const
Returns true if intersection exists. 
Definition: Plane.cc:365
Ref2d3d getRef(void) const
Return a reference frame whose XY plane corresponds to this one. 
Definition: Plane.cc:166
Base class for surfaces in a three-dimensional space. 
Definition: Surface3d.h:35
Line3d getMaximumSlopeLineXZ(void) const
Return the maximum slope line with respect to the XZ plane. 
Definition: Plane.cc:520
Plane polygon in a 3D space. 
Definition: Polygon3d.h:35
GEOM_FT y(const Pos2d &p) const
Return the y coordinate of the point of the plane such: x = p.x() z = p.y() 
Definition: Plane.cc:349
Segment en tres dimensiones. 
Definition: Segment3d.h:41
Base class for position lists. 
Definition: PolyPos.h:35
GeneralEquationOfPlane getGeneralEquation(void) const
Returns the plane equation in general form: ax + by + cz + d = 0. 
Definition: Plane.cc:315
Posición en dos dimensiones. 
Definition: Pos2d.h:41
Two-dimensional rectangular coordinate system definde in a three-dimensional space. 
Definition: Rect2d3dCooSys.h:36
GEOM_FT PseudoDist2(const Pos3d &p) const
Return the signed squared distance from the point. 
Definition: Plane.cc:302
Vector3d Base1(void) const
Return un vector ortogonal al devuelto por Normal(). 
Definition: Plane.cc:145
Polyline in a three-dimensional space. 
Definition: Polyline3d.h:37
Plane in a three-dimensional space. 
Definition: Plane.h:49
Rect2d3dCooSys getCooSys(void) const
Return a coordinate system whose XY plane corresponds to this one. 
Definition: Plane.cc:161
Line3d getIntersection(const Plane &) const
Returns (if exists) the intersection with the plane argument. 
Definition: Plane.cc:369
List of 3D positions. 
Definition: Pos3dList.h:36
GEOM_FT z(const Pos2d &p) const
Return the z coordinate of the point of the plane such: x = p.x() y = p.y() 
Definition: Plane.cc:356
virtual Pos3d getCenterOfMass(void) const
Return the position of the centroid. 
Definition: Plane.cc:320
GEOM_FT getSlopeAngleXY(void) const
Returns the slope angle with respect to the XY plane. 
Definition: Plane.cc:568
static polygon_classification clfpnt2clfpol(const CGAL::Oriented_side os)
Converts the point classification to the polygon one. 
Definition: Plane.cc:116
Ray in a three-dimensional space. 
Definition: Ray3d.h:36
Line3d XYTrace(void) const
Return the trace on the XY plane. 
Definition: Plane.cc:494
virtual std::string getClassName(void) const
Returns demangled class name. 
Definition: EntityWithOwner.cc:90
Line3d getMaximumSlopeLineYZ(void) const
Return the maximum slope line with respect to the YZ plane. 
Definition: Plane.cc:534
void GeneralEquation(const GeneralEquationOfPlane &eq)
Creates a Plane object from the its equation in general form: general ax + by + cz + d = 0...
Definition: Plane.cc:361
virtual GEOM_FT Iy(void) const
Moment of inertia with respect to the center of mass in local coordinates. 
Definition: Plane.h:132
virtual GEOM_FT dist(const Pos3d &p) const
Return the distance from the point to this surface. 
Definition: Plane.cc:290
GEOM_FT getAngle(const Plane &) const
Return the angle between this plane and the argument. 
Definition: Plane.cc:548
Line3d YZTrace(void) const
Return the trace on the YZ plane. 
Definition: Plane.cc:502
GEOM_FT getSlopeAngleYZ(void) const
Returns the slope angle with respect to the YZ plane. 
Definition: Plane.cc:576
virtual GEOM_FT Iz(void) const
Moment of inertia with respect to the center of mass in local coordinates. 
Definition: Plane.h:135
GEOM_FT PseudoDist(const Pos3d &p) const
Return the signed distance from the point. 
Definition: Plane.cc:294
int getSide(const Pos3d &p) const
Return 1 if point in positive side, -1 if in negative side or 0 otherwise. 
Definition: Plane.cc:265
Vector3d Base2(void) const
Return un vector ortogonal al devuelto por Normal() y al devuelto por Base1(). 
Definition: Plane.cc:152
virtual GEOM_FT Ix(void) const
Moment of inertia with respect to the center of mass in local coordinates. 
Definition: Plane.h:129
virtual GEOM_FT GetMax(unsigned short int) const
Return the maximum value of the i-th coordinate. 
Definition: Plane.h:79
Equation for a plane in general form: ax + by + cz + d = 0 where v[0]= d, v[1]= a, v[2]= b, v[3]= c. 
Definition: GeneralEquationOfPlane.h:36
Pos3d Projection(const Pos3d &) const
Return the projection of the point onto this plane. 
Definition: Plane.cc:176
Posición en tres dimensiones. 
Definition: Pos3d.h:44
void Put(const Pos3d &p1, const Pos3d &p2, const Pos3d &p3)
Set the points that define the plane. 
Definition: Plane.h:117
Line in a three-dimensional space. 
Definition: Line3d.h:62
Pos3d Point(void) const
Return an arbitrary point on the plane. 
Definition: Plane.cc:255
GEOM_FT x(const Pos2d &p) const
Return the x coordinate of the point of the plane such: y = p.x() z = p.y() 
Definition: Plane.cc:342
virtual bool operator==(const Plane &) const
Comparison operator. 
Definition: Plane.cc:101
Clase base para las entidades geométricas. 
Definition: GeomObj.h:40
Group of 3D entities. 
Definition: GeomGroup3d.h:36
Line3d getMaximumSlopeLineXY(void) const
Return the maximum slope line with respect to the XY plane. 
Definition: Plane.cc:506
virtual GEOM_FT GetMin(unsigned short int i) const
Return the minimum value of the i-th coordinate. 
Definition: Plane.h:81
virtual bool In(const Pos3d &p, const GEOM_FT &tol=0.0) const
Return true if the point is in the plane. 
Definition: Plane.cc:278
GEOM_FT linearLeastSquaresFitting(const GeomObj3d::list_Pos3d &lp)
Compute the plane that best suits the point cloud. 
Definition: Plane.cc:580
virtual GEOM_FT dist2(const Pos3d &p) const
Return the squared distance from the point. 
Definition: Plane.cc:311
Vector en tres dimensiones. 
Definition: Vector3d.h:39
Two-dimensional reference system defined in a three-dimensional space. 
Definition: Ref2d3d.h:41
virtual Vector3d Normal(void) const
Return el normal vector oriented to the "positive" side. 
Definition: Plane.cc:138
GEOM_FT getSlopeAngleXZ(void) const
Returns the slope angle with respect to the XZ plane. 
Definition: Plane.cc:572