26 #include "GeomObj2d.h" 27 #include "../cgal_types.h" 40 CGIsoRectangle_2 cgrectg;
42 template <
class inputIterator>
43 bool Overlap(inputIterator begin, inputIterator end)
const;
45 inline bool In(
const CGPoint_2 &p,
const double &tol)
const 46 {
return In(
Pos2d(p), tol); }
47 inline bool Overlap(
const CGPoint_2 &p)
const 48 {
return Overlap(
Pos2d(p)); }
52 virtual GeomObj *getCopy(
void)
const 53 {
return new BND2d(*
this); }
54 inline bool isUndefined(
void)
const 56 inline virtual unsigned short int Dimension(
void)
const 61 {
return GetXMax()-GetXMin(); }
64 {
return GetYMax()-GetYMin(); }
73 virtual GEOM_FT
getArea(
void)
const;
77 virtual GEOM_FT
Ix(
void)
const;
78 virtual GEOM_FT
Iy(
void)
const;
79 inline virtual GEOM_FT
Pxy(
void)
const 82 void Update(
const Pos2d &);
83 void PutPMax(
const Pos2d &);
84 void PutPMin(
const Pos2d &);
86 Pos2d getPMax(
void)
const;
87 Pos2d getPMin(
void)
const;
88 inline GEOM_FT
GetMax(
unsigned short int i)
const 89 {
return cgrectg.max_coord(i-1); }
90 inline GEOM_FT
GetMin(
unsigned short int i)
const 91 {
return cgrectg.min_coord(i-1); }
93 Pos2d getCenterOfMass(
void)
const;
95 bool In(
const Pos2d &,
const double &tol= 0.0)
const;
96 template <
class inputIterator>
97 bool In(inputIterator begin, inputIterator end,
const double &tol= 0.0)
const;
98 bool In(
const Polyline2d &,
const double &tol= 0.0)
const;
99 bool In(
const Polygon2d &,
const double &tol= 0.0)
const;
100 bool Overlap(
const Pos2d &)
const;
101 bool Overlap(
const Line2d &r)
const;
102 bool Overlap(
const Ray2d &sr)
const;
104 bool Overlap(
const BND2d &)
const;
107 bool Overlap(
const std::list<Polygon2d> &)
const;
108 bool Interseca(
const Line2d &r)
const;
109 bool Interseca(
const Ray2d &sr)
const;
110 bool Interseca(
const Segment2d &sg)
const;
111 bool Interseca(
const BND2d &)
const;
118 friend bool operator==(
const BND2d &a,
const BND2d &b);
119 void Print(std::ostream &stream)
const;
120 void Plot(Plotter &)
const;
123 inline bool intersecan(
const Line2d &r,
const BND2d &bnd)
124 {
return bnd.Interseca(r); }
125 inline bool intersecan(
const Ray2d &sr,
const BND2d &bnd)
126 {
return bnd.Interseca(sr); }
128 {
return bnd.Interseca(sg); }
129 inline bool intersecan(
const BND2d &bnd,
const Line2d &r)
130 {
return bnd.Interseca(r); }
131 inline bool intersecan(
const BND2d &bnd,
const Ray2d &sr)
132 {
return bnd.Interseca(sr); }
134 {
return bnd.Interseca(sg); }
138 template <
class inputIterator>
139 bool BND2d::In(inputIterator begin, inputIterator end,
const double &tol)
const 142 for(inputIterator i= begin;i!=end;i++)
143 if(!this->In(*i, tol))
153 template <
class inputIterator>
154 bool BND2d::Overlap(inputIterator begin, inputIterator end)
const 157 for(inputIterator i= begin;i!=end;i++)
virtual GEOM_FT Pxy(void) const
!
Definition: BND2d.h:79
"boundary" en dos dimensiones.
Definition: BND2d.h:38
GEOM_FT GetMax(unsigned short int i) const
Return the maximum value of the i-th coordinate.
Definition: BND2d.h:88
const GeomObj::list_Pos2d & getVertexList(void) const
Return a list with the object vertices.
Definition: BND2d.cc:101
virtual GEOM_FT getArea(void) const
Return the object area.
Definition: BND2d.cc:126
Base class for position lists.
Definition: PolyPos.h:35
virtual GEOM_FT getWidth(void) const
Return object width (x axis).
Definition: BND2d.h:60
Posición en dos dimensiones.
Definition: Pos2d.h:41
Line in a two-dimensional space.
Definition: Line2d.h:61
BND2d(void)
Constructor.
Definition: BND2d.cc:40
Base class for two-dimensional transformations.
Definition: Trf2d.h:40
GEOM_FT getHeight(void) const
Return object height (z axis).
Definition: BND2d.h:63
virtual GEOM_FT Ix(void) const
Moment of inertia with respect to the center of mass en local axis.
Definition: BND2d.cc:148
Vector en dos dimensiones.
Definition: Vector2d.h:40
virtual GEOM_FT getVolume(void) const
Return the volume of the object.
Definition: BND2d.h:75
Base class for the two-dimensional geometric objects.
Definition: GeomObj2d.h:37
virtual unsigned short int Dimension(void) const
Return the dimension of the object 0, 1, 2 or 3.
Definition: BND2d.h:56
virtual GEOM_FT getLength(void) const
Return the object length.
Definition: BND2d.h:70
Polígono en dos dimensiones.
Definition: Polygon2d.h:38
Segment in a two-dimensional space.
Definition: Segment2d.h:38
boost::python::list getVertexListPy(void) const
Return a Python list with the object vertices.
Definition: BND2d.cc:115
void Transform(const Trf2d &trf2d)
Aplica al objeto la transformación que se pasa como parámetro.
Definition: BND2d.cc:290
Polyline in a two-dimensional space.
Definition: Polyline2d.h:41
virtual GEOM_FT Iy(void) const
Moment of inertia with respect to the center of mass en local axis.
Definition: BND2d.cc:155
Clase base para las entidades geométricas.
Definition: GeomObj.h:40
Ray in a two-dimensional space.
Definition: Ray2d.h:35
GEOM_FT GetMin(unsigned short int i) const
Return the minimum value of the i-th coordinate.
Definition: BND2d.h:90