xc
Public Member Functions | List of all members
Rectangle2d Class Reference

Rectangle in a two dimensional space. More...

#include <Rectangle2d.h>

Inheritance diagram for Rectangle2d:
Inheritance graph
[legend]
Collaboration diagram for Rectangle2d:
Collaboration graph
[legend]

Public Member Functions

 Rectangle2d (const double &b=1.0, const double &h=1.0)
 
 Rectangle2d (const Pos2d &o, const double &b=1.0, const double &h=1.0)
 
virtual GeomObjgetCopy (void) const
 Constructor virtual.
 
- Public Member Functions inherited from Quadrilateral2d
 Quadrilateral2d (void)
 Default constructor.
 
 Quadrilateral2d (const Pos2d &p1, const Pos2d &p2, const Pos2d &p3, const Pos2d &p4)
 Constructor.
 
void push_back (const Pos2d &)
 Back inserter.
 
std::vector< double > getNaturalCoordinates (const Pos2d &) const
 Return natural coordinates for point xy (in cartesian coord.) based on $ 23.6 from Felippa book:"Introduction to Finite Element Methods" see IFEM.Ch23.pdf. More...
 
std::vector< std::vector< double > > getNaturalCoordinates (const std::list< Pos2d > &) const
 Return natural coordinates for points xy (in cartesian coord.) More...
 
boost::python::list getNaturalCoordinatesPy (const boost::python::list &) const
 Return natural coordinates for points xy (in cartesian coord.) More...
 
std::vector< double > Ni (const Pos2d &) const
 Return the values of the shape functions for the point argument. More...
 
std::vector< std::vector< double > > Ni (const std::list< Pos2d > &) const
 Return a vector of vectors containing the values of the shape functions for the points in the argument list. More...
 
boost::python::list NiPy (const Pos2d &) const
 Return a Python list containing the values of the shape functions for the point argument. More...
 
boost::python::list NiPy (const boost::python::list &) const
 Return a Python list containing the values of the shape functions for the points in the argument list. More...
 
Pos2d getMidpoint (void) const
 Return the intersection between the lines that join the midpoints of the quadrilateral sides. More...
 
Triangle2d getFirstTriangle (void) const
 
Triangle2d getSecondTriangle (void) const
 
Pos2dArray genMesh (int n1, int n2) const
 Returns a point grid.
 
Pos2dArray genBilinMesh (const size_t &n1, const size_t &n2) const
 Returns a point grid (the routine is taken from OpenSees).
 
- Public Member Functions inherited from Polygon2d
 Polygon2d (void)
 Default constructor.
 
 Polygon2d (const GeomObj::list_Pos2d &lv)
 Constructor.
 
 Polygon2d (const CGPolygon_2 &)
 Constructor.
 
 Polygon2d (const std::list< Polygon2d > &lp)
 Constructor.
 
 Polygon2d (const Polyline2d &)
 Constructor.
 
 Polygon2d (const boost::python::list &)
 Constructor (Python interface).
 
const CGPolygon_2 & ToCGAL (void) const
 
virtual unsigned int getNumVertices (void) const
 
void push_back (const Pos2d &p)
 
vertex_iterator insert (vertex_iterator i, const Pos2d &q)
 Insert vertex q before the vertex pointed by i.
 
template<class InputIterator >
void insert (vertex_iterator i, InputIterator first, InputIterator last)
 Insert the vertices between [first,last) before the vertex pointed by i. More...
 
void set (vertex_iterator i, const Pos2d &p)
 Modifies the position of the i-th vertex making it equal to the argument. More...
 
void erase (vertex_iterator i)
 
void erase (vertex_iterator first, vertex_iterator last)
 Elimina el vértice los vértices del rango [first,last).
 
void erase (void)
 Elimina el vértice los vértices del rango [first,last).
 
vertex_iterator vertices_begin (void) const
 
vertex_iterator vertices_end (void) const
 
vertex_circulator vertices_circulator (void)
 
edge_const_iterator edges_begin (void) const
 
edge_const_iterator edges_end (void)
 
edge_const_circulator edges_circulator (void) const
 
Polygon2d getSwap (void) const
 
bool clockwise (void) const
 
bool counterclockwise (void) const
 
void swap (void)
 
void makeCounterClockWise (void)
 Makes the polygon counter clockwise.
 
Polygon2d offset (const GEOM_FT &d) const
 Return a polygon parallel to this one at the given distance. More...
 
Polygon2d buffer (const GEOM_FT &d) const
 Returns the buffer (a polygon being the spatial point set collection within a specified maximum distance from this polygon) of this polygon. More...
 
GEOM_FT AreaSigno (void) const
 
virtual GEOM_FT getArea (void) const
 Return the polygon area.
 
std::vector< Polygon2dgetTributaryPolygons (void) const
 Return the polygons that form the tributary area of each vertex.
 
std::vector< double > getTributaryAreas (void) const
 Return the areas of the tributary polygons (one for each vertex).
 
virtual GEOM_FT GetMax (unsigned short int i) const
 Return the maximum value of the i-th coordinate.
 
virtual GEOM_FT GetMin (unsigned short int i) const
 Return the minimum value of the i-th coordinate.
 
virtual bool In (const Pos2d &p, const double &tol=0.0) const
 Return true if the point is inside the polygon.
 
template<class inputIterator >
bool In (inputIterator begin, inputIterator end) const
 Return true if all the objects in the given sequence are inside the polygon. More...
 
bool In (const Polyline2d &) const
 Return true if the polyline is inside the polygon.
 
bool In (const Polygon2d &) const
 Return true if this polygon contains the polygon argument.
 
bool Overlap (const Pos2d &) const
 Return true if the polygon contains the point.
 
bool Overlap (const Line2d &r) const
 Return true if the line and the polygon overlap.
 
bool Overlap (const Ray2d &sr) const
 Return true if the ray and the polygon overlap.
 
bool Overlap (const Segment2d &sg) const
 Return true if the segment and the polygon overlap.
 
bool Overlap (const BND2d &) const
 Return true if the boundary and the polygon overlap.
 
bool Overlap (const Polyline2d &) const
 Return true if the polyline and the polygon overlap.
 
bool Overlap (const Polygon2d &) const
 Return verdadero si el polígono se superpone con el que se pasa como parámetro. More...
 
bool Overlap (const std::list< Polygon2d > &) const
 Return verdadero si el polígono se superpone con alguno de los de la lista que se pasa como parámetro. More...
 
template<class T >
bool intersects (const T &t) const
 
Pos2d Vertice (unsigned int i) const
 Return the position of the i-th vertex.
 
Pos2d Vertice0 (unsigned int j) const
 Return the position of the i-th vertex (0 based: j=0..getNumVertices()-1). More...
 
GeomObj::list_Pos2d getVertexList (void) const
 
boost::python::list getVertexListPy (void) const
 Return a Python list containing the positions of the polygon vertices. More...
 
void Transform (const Trf2d &trf2d)
 Aplica a los vértices la transformación que se pasa como parámetro.
 
std::deque< GEOM_FT > & getCovers (const Pos2dList &) const
 Return the cover of the positions in the argument.
 
Polygon2d getUnion (const Polygon2d &other) const
 Return the union of this polygon with the argument.
 
void une (const Polygon2d &)
 
void une (const std::list< Polygon2d > &l)
 
void clipBy (const Polygon2d &)
 Clip this polygont with the polygon argument.
 
Segment2d Clip (const Line2d &) const
 Return the intersection of the polygon with the line.
 
Segment2d Clip (const Ray2d &) const
 Return the intersection of the polygon and the ray.
 
Segment2d Clip (const Segment2d &) const
 Return the intersection of the polygon and the segment.
 
std::list< Polygon2dClip (const BND2d &bnd) const
 Return the polygons that result from clipping this one with the BND argument. More...
 
boost::python::list ClipPy (const BND2d &) const
 Return the polygons that result from clipping this one with the BND argument in a Python list. More...
 
std::list< Polygon2dClip (const Polygon2d &) const
 Return the polygons that result from clipping this one with the polygon argument. More...
 
boost::python::list ClipPy (const Polygon2d &) const
 Return the polygons that result from clipping this one with the polygon argument in a Python list. More...
 
Segment2d getIntersection (const Line2d &) const
 Return the intersection of the polygon with the given line.
 
Segment2d getIntersection (const Ray2d &) const
 Return the intersection of the polygon with the given ray.
 
Segment2d getIntersection (const Segment2d &) const
 Return the intersection of the polygon with the given segment.
 
std::list< Polygon2dgetIntersection (const HalfPlane2d &) const
 Return the intersection with the given half plane.
 
boost::python::list getIntersectionPy (const HalfPlane2d &) const
 Return the intersection with the given half plane in a Python list.
 
std::list< Polygon2dgetIntersection (const Polygon2d &) const
 Return the intersection with the given polygon.
 
boost::python::list getIntersectionPy (const Polygon2d &) const
 Return the intersection with the given polygon in a Python list.
 
std::list< Polygon2dgetBayazitDecomposition (void) const
 Return the decomposition obtained using the Mark Bayazit algorithm.
 
- Public Member Functions inherited from PolygonalSurface2d
virtual unsigned int getNumEdges (void) const
 
bool empty (void) const
 
const Pos2d operator() (const size_t &i) const
 
const Pos2d operator[] (const size_t &j) const
 
Segment2d Lado (unsigned int i) const
 Return the i-th edge (i between 1 and num_sides).
 
Segment2d Lado0 (unsigned int i) const
 Return the i-th side (i between 0 and num_sides-1).
 
int getNearestEdgeIndex (const Pos2d &) const
 Return the nearest edge to the given point. More...
 
Segment2d getNearestEdge (const Pos2d &) const
 Return the nearest edge to the given point. More...
 
Pos2d Projection (const Pos2d &) const
 Return the projection of the given point into the polyline. More...
 
GeomObj::list_Pos2d getVertices (void) const
 Return los vertices of the polygon.
 
Vector2d getLado0Normal (const size_t i) const
 Return la normal al lado of the polygon.
 
Vector2d getVertex0Normal (const size_t i) const
 Return la normal en el vértice of the polygon.
 
int getIndexOfDistalEdge (const Pos2d &) const
 Return the distal edge with respect to the point argument. More...
 
int getIndexOfProximalEdge (const Pos2d &) const
 Return the proximal edge with respect to the point argument. More...
 
int getIndexOfDistalVertex (const Pos2d &) const
 Return the distal vertex with respect to the point argument. More...
 
int getIndexOfProximalVertex (const Pos2d &) const
 Return the proximal vertex with respect to the point argument. More...
 
Polyline2d getPolyline (void) const
 Return the closed polyline formed with the vertices of the polygon. More...
 
virtual GEOM_FT getLength (void) const
 Return the perimeter of the surface.
 
GEOM_FT getPerimeter (void) const
 
virtual GEOM_FT getLengthUpTo (const Pos2d &) const
 Return the length along the perimeter upto the given point.
 
GEOM_FT getLambda (const Pos2d &p) const
 
GEOM_FT AreaSigno (void) const
 
virtual Pos2d getCenterOfMass (void) const
 Return the center of mass.
 
virtual Pos2d Centroide (void) const
 Return the centroid (point interior to the polygon). More...
 
GEOM_FT getMoment (const int &p, const int &q) const
 
virtual GEOM_FT Ix (void) const
 Calcula el moment of inertia with respect to an axis parallel to the x axis que pasa por the center of mass of the surface. More...
 
virtual GEOM_FT Iy (void) const
 Calcula el moment of inertia with respect to an axis parallel to the y axis that passes through the polygon centroid. More...
 
virtual GEOM_FT Pxy (void) const
 Calcula el product of inertia with respect to the axis parallel to the axis x and y with origin in the polygon centroid. More...
 
GeomObj::list_Pos2d getApproxTangentPositions (const Vector2d &) const
 Return the points for which the polygon is almost tangent to the direction argument. More...
 
GEOM_FT DistSigno (const Pos2d &p, const bool &clockwise=false) const
 Return the distance from the point to the perímeter The distance is computed as the maximum of: -The signed distances from the point to each of the half-planes that contain a side. More...
 
GEOM_FT Dist (const Pos2d &p) const
 Return the distance from the point to the polygon. More...
 
GEOM_FT getCover (const Pos2d &) const
 Return the distance from the point to the nearest edge.
 
GEOM_FT getCover (const Pos2d &, const Vector2d &) const
 Return the distance from the point to the nearest of the intersections of the ray defined by the point and the vector with the nearest edge. More...
 
bool Overlap (const Line2d &r) const
 Return true if the line and the polygonal surface overlap.
 
bool Overlap (const Ray2d &sr) const
 Return true if the ray and the polygonal surface overlap.
 
Segment2d Clip (const Line2d &) const
 Return the intersection of the polygon with the line (if exists).
 
Segment2d Clip (const Ray2d &) const
 Return the intersection of the polygon with the ray (if it exists).
 
Segment2d Clip (const Segment2d &) const
 Return the intersection of the polygon with the segment argument (if exists). More...
 
void Print (std::ostream &os) const
 
void Plot (Plotter &plotter) const
 
- Public Member Functions inherited from Surface2d
virtual unsigned short int Dimension (void) const
 Return the dimension of the object 0, 1, 2 or 3.
 
GEOM_FT getPerimeter (void) const
 Return the object perimeter.
 
virtual GEOM_FT getVolume (void) const
 Return the object volume.
 
virtual GEOM_FT IArea (void) const
 
- Public Member Functions inherited from GeomObj2d
GEOM_FT GetXMax (void) const
 
GEOM_FT GetYMax (void) const
 
GEOM_FT GetXMin (void) const
 
GEOM_FT GetYMin (void) const
 
Pos2d getPMax (void) const
 
Pos2d getPMin (void) const
 
virtual Vector2d Projection (const Vector2d &) const
 Return the projection onto the line. More...
 
BND2d Bnd (void) const
 Return the bounding rectangle.
 
virtual bool Out (const Pos2d &p, const double &tol=0.0) const
 Return true if the point lies outside the object.
 
virtual GEOM_FT getCenterOfMassFactor (void) const
 Return the factor used for the computation of the center of mass (1.0 by default). More...
 
virtual GEOM_FT Iz (void) const
 Moment of inertia polar with respect to the center of mass en local axis.
 
double Theta_p (void) const
 Return the angle of one of the principal axis of inertia.
 
Dir2d IAxisDir_a (void) const
 Return the dirección de un principal axis of inertia (we don't know if it's the major or the minor yet). More...
 
Dir2d IAxisDir_b (void) const
 Return the direction of the other principal axis of inertia (we don't know if it's the major or the minor yet). More...
 
Line2d IAxis_a (void) const
 Return un principal axis of inertia (no sabemos si el mayor o el menor.
 
Line2d IAxis_b (void) const
 Return un principal axis of inertia (no sabemos si el mayor o el menor.
 
Ref2d2d PrincipalAxesOfInertia (void) const
 Return los principal axis of inertia.
 
GEOM_FT I1 (void) const
 Return the moment of inertia principal mayor.
 
GEOM_FT I2 (void) const
 Return the moment of inertia principal menor.
 
PrincipalAxesOfInertia2D Inertia (void)
 
GEOM_FT I (const unsigned short int &i, const unsigned short int &j) const
 Return the componente i,j of the inertia tensor computed with respect to the center of mass. More...
 
GEOM_FT I (const Pos2d &O, const Vector2d &e) const
 Return the moment of inertia with respect to the axis that passes through O with the direction of e. More...
 
GEOM_FT I (const Line2d &r) const
 Return the moment of inertia with respect to the line argument.
 
GEOM_FT I (const unsigned short int i, const unsigned short int j, const Pos2d &o) const
 Return the component i,j of the inertia tensor computed with respect to the point "o". More...
 
GEOM_FT IO (const Pos2d &o) const
 Return the polar moment of inertia with respect to the point o.
 
FT_matrix I (void) const
 Return the inertia tensor with respect to the center of mass of the object.
 
FT_matrix I (const Pos2d &o) const
 Return the inertia tensor with respect to the point o.
 
virtual void Move (const Vector2d &)
 Desplaza el objeto.
 
- Public Member Functions inherited from GeomObj
 GeomObj (void)
 Constructor.
 
virtual bool hasCenterOfMass (void) const
 Return true if the object has a center of mass.
 
GEOM_FT getCenterOfMassArea (void) const
 Return the dimension used to compute the center of mass, as follows: More...
 
- Public Member Functions inherited from ProtoGeom
 ProtoGeom (void)
 False when solution is not possible: intersection of parallel planes. More...
 
void setExists (bool e)
 
bool exists (void) const
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary with the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from CommandEntity
 CommandEntity (CommandEntity *owr=nullptr)
 Default constructor.
 
CommandEntityOwner (void)
 Return a pointer to the object owner.
 
const CommandEntityOwner (void) const
 Return un puntero al objeto propietario de ESTE.
 
const StandardOutputWrappergetStandardOutputWrapper (void) const
 Return the regular output stream wrapper.
 
StandardOutputWrappergetStandardOutputWrapper (void)
 Return the regular output stream wrapper.
 
const std::string & getLogFileName (void) const
 Returns log file name.
 
void setLogFileName (const std::string &)
 Sets log file name.
 
const std::string & getErrFileName (void) const
 Returns err file name.
 
void setErrFileName (const std::string &)
 Sets error file name.
 
const std::string & getOutputFileName (void) const
 Returns regular output file name.
 
void setOutputFileName (const std::string &)
 Sets regular output file name.
 
boost::python::object evalPy (boost::python::object dict, const std::string &)
 Return the Python object that results from evaluating the argument.
 
boost::python::object execPy (boost::python::object dict, const std::string &)
 Return the Python objects that results from executing the code in the string argument.
 
boost::python::object execFilePy (boost::python::object dict, const std::string &)
 Return the Python object that results from executing the code in the file.
 
- Public Member Functions inherited from EntityWithProperties
 EntityWithProperties (EntityWithProperties *owr=nullptr)
 Default constructor.
 
void clearPyProps (void)
 Clear python properties map.
 
bool hasPyProp (const std::string &)
 Returns true if property exists.
 
boost::python::object getPyProp (const std::string &str)
 Return the Python object with the name being passed as parameter.
 
void setPyProp (std::string str, boost::python::object val)
 Sets/appends a value tho the Python object's dictionary.
 
void copyPropsFrom (const EntityWithProperties &)
 Copy the properties from the argument.
 
boost::python::list getPropNames (void) const
 Return the names of the object properties weightings.
 
const PythonDict & getPropertiesDict (void) const
 Return a std::map container with the properties of the object.
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary containing the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from EntityWithOwner
 EntityWithOwner (EntityWithOwner *owr=nullptr)
 Default constructor.
 
 EntityWithOwner (const EntityWithOwner &)
 Copy constructor.
 
EntityWithOwneroperator= (const EntityWithOwner &)
 Assignment operator.
 
virtual bool operator== (const EntityWithOwner &) const
 Comparison operator.
 
virtual ~EntityWithOwner (void)
 Virtual destructor.
 
virtual std::string getClassName (void) const
 Returns demangled class name.
 
void set_owner (EntityWithOwner *owr)
 Assigns the owner of the object.
 
EntityWithOwnerOwner (void)
 
const EntityWithOwnerOwner (void) const
 

Additional Inherited Members

- Public Types inherited from Polygon2d
typedef CGPolygon_2::Vertex_iterator vertex_iterator
 
typedef CGPolygon_2::Vertex_circulator vertex_circulator
 
typedef CGPolygon_2::Edge_const_iterator edge_const_iterator
 
typedef CGPolygon_2::Edge_const_circulator edge_const_circulator
 
- Public Types inherited from GeomObj2d
typedef PolyPos< Pos2dlist_Pos2d
 
- Public Types inherited from GeomObj
typedef PolyPos< Pos3dlist_Pos3d
 
typedef PolyPos< Pos2dlist_Pos2d
 
- Public Types inherited from EntityWithProperties
typedef std::map< std::string, boost::python::object > PythonDict
 
- Static Public Member Functions inherited from CommandEntity
static void resetStandardOutput (void)
 Reset the standard output streams to its defaults buffers.
 
- Static Public Member Functions inherited from EntityWithOwner
static int getVerbosityLevel (void)
 Get the value of the verbosity level.
 
static void setVerbosityLevel (const int &)
 Set the value of the verbosity level.
 
- Protected Member Functions inherited from Polygon2d
bool In (const CGPoint_2 &p) const
 
bool Overlap (const CGPoint_2 &p) const
 
- Protected Member Functions inherited from PolygonalSurface2d
Segment2d Lado0 (unsigned int i, unsigned int j) const
 Return the segments between vertices i and j (0->n).
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 
- Protected Member Functions inherited from EntityWithProperties
bool isEqual (const EntityWithProperties &) const
 Return true if both objects are equal.
 
- Protected Member Functions inherited from EntityWithOwner
virtual bool isEqual (const EntityWithOwner &) const
 Return true if both objects are equal.
 
- Static Protected Member Functions inherited from CommandEntity
static CommandEntityentcmd_cast (boost::any &data)
 
- Static Protected Attributes inherited from EntityWithOwner
static int verbosity = 1
 Object that owns THIS ONE. More...
 

Detailed Description

Rectangle in a two dimensional space.


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