![]() |
PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Defines complex geometrical object. More...
#include <geomObjects.h>
Public Member Functions | |
| ComplexGeomObject () | |
| Constructor. | |
| ComplexGeomObject (std::vector< std::shared_ptr< util::geometry::GeomObject > > &obj, std::vector< std::string > obj_flag, size_t dim, std::string description="") | |
| Constructor. | |
| double | volume () const override |
| Computes the volume (area in 2d, length in 1d) of object. | |
| util::Point | center () const override |
| Computes the center of object. | |
| std::pair< util::Point, util::Point > | box () const override |
| Computes the bounding box of object. | |
| std::pair< util::Point, util::Point > | box (const double &tol) const override |
| Computes the bounding box of object. | |
| double | inscribedRadius () const override |
| Computes the radius of biggest circle/sphere completely within the object. | |
| double | boundingRadius () const override |
| Computes the radius of smallest circle/sphere such that object can be fit into it. | |
| std::string | printStr (int nt, int lvl) const override |
| Returns the string containing printable information about the object. | |
| void | print (int nt, int lvl) const override |
| Prints the information about the object. | |
| void | print () const override |
| Prints the information about the object. | |
Interaction with point | |
| bool | isInside (const util::Point &x) const override |
| Checks if point is inside this object. | |
| bool | isOutside (const util::Point &x) const override |
| Checks if point is outside of this object. | |
| bool | isNear (const util::Point &x, const double &tol) const override |
| Checks if point is within given distance of this object. | |
| bool | isNearBoundary (const util::Point &x, const double &tol, const bool &within) const override |
| cons | |
| bool | doesIntersect (const util::Point &x) const override |
| Checks if point lies exactly on the boundary. | |
Interaction with box | |
| bool | isInside (const std::pair< util::Point, util::Point > &box) const override |
| Checks if box is completely inside. | |
| bool | isOutside (const std::pair< util::Point, util::Point > &box) const override |
| Checks if box is outside of the object. | |
| bool | isNear (const std::pair< util::Point, util::Point > &box, const double &tol) const override |
| Checks if box is within given distance of this object. | |
| bool | doesIntersect (const std::pair< util::Point, util::Point > &box) const override |
| Checks if box intersects this object. | |
Public Member Functions inherited from util::geometry::GeomObject | |
| GeomObject (std::string name="", std::string description="") | |
| Constructor. | |
Data Fields | |
| std::vector< std::shared_ptr< util::geometry::GeomObject > > | d_obj |
| Object. | |
| std::vector< std::string > | d_objFlag |
| Object flag. | |
| std::vector< int > | d_objFlagInt |
| Object integer flags. Here, +1 means object is filling and -1 means object is void. | |
| size_t | d_dim |
| Dimension objects live in. | |
Data Fields inherited from util::geometry::GeomObject | |
| const std::string | d_name |
| name of object | |
| const std::string | d_description |
| Further description of object. | |
| std::vector< std::string > | d_tags |
| Tags/attributes about the object. | |
Defines complex geometrical object.
Definition at line 2729 of file geomObjects.h.
|
inline |
Constructor.
Definition at line 2735 of file geomObjects.h.
|
inline |
Constructor.
| obj | Vector of geometrical objects |
| obj_flag | Specifies which objects are filling and which are void |
| dim | Dimension of the composite object |
| description | Description of object (e.g., further classification or any tag) |
Definition at line 2745 of file geomObjects.h.
References d_dim, d_objFlag, and d_objFlagInt.
|
overridevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented from util::geometry::GeomObject.
Definition at line 1909 of file geomObjects.cpp.
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1875 of file geomObjects.cpp.
|
overridevirtual |
Computes the bounding box of object.
| tol | Tolerance/padding used in creating bounding box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1881 of file geomObjects.cpp.
|
overridevirtual |
Computes the center of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1852 of file geomObjects.cpp.
References util::isGreater(), and util::methods::maxIndex().
|
overridevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 2006 of file geomObjects.cpp.
References util::getCornerPoints().
|
overridevirtual |
Checks if point lies exactly on the boundary.
| x | Point |
Reimplemented from util::geometry::GeomObject.
Definition at line 1966 of file geomObjects.cpp.
|
overridevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1903 of file geomObjects.cpp.
|
overridevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1972 of file geomObjects.cpp.
References util::getCornerPoints().
|
overridevirtual |
Checks if point is inside this object.
| x | Point |
Reimplemented from util::geometry::GeomObject.
Definition at line 1916 of file geomObjects.cpp.
|
overridevirtual |
Checks if box is within given distance of this object.
| box | Box |
| tol | Tolerance used in checking the nearness |
Reimplemented from util::geometry::GeomObject.
Definition at line 1992 of file geomObjects.cpp.
|
overridevirtual |
Checks if point is within given distance of this object.
| x | Point |
| tol | Tolerance used in checking the nearness |
Reimplemented from util::geometry::GeomObject.
Definition at line 1938 of file geomObjects.cpp.
|
overridevirtual |
cons
cons
Reimplemented from util::geometry::GeomObject.
Definition at line 1951 of file geomObjects.cpp.
|
overridevirtual |
Checks if box is outside of the object.
| box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1982 of file geomObjects.cpp.
References util::getCornerPoints().
|
overridevirtual |
Checks if point is outside of this object.
| x | Point |
Reimplemented from util::geometry::GeomObject.
Definition at line 1934 of file geomObjects.cpp.
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from util::geometry::GeomObject.
Definition at line 2884 of file geomObjects.h.
References print().
Referenced by print().
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Reimplemented from util::geometry::GeomObject.
Definition at line 2877 of file geomObjects.h.
References d_dim, and printStr().
Returns the string containing printable information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Reimplemented from util::geometry::GeomObject.
Definition at line 2018 of file geomObjects.cpp.
References util::io::getTabS(), and util::io::printBoxStr().
Referenced by print().
|
overridevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1843 of file geomObjects.cpp.
| size_t util::geometry::ComplexGeomObject::d_dim |
Dimension objects live in.
Definition at line 2905 of file geomObjects.h.
Referenced by ComplexGeomObject(), and print().
| std::vector<std::shared_ptr<util::geometry::GeomObject> > util::geometry::ComplexGeomObject::d_obj |
Object.
Definition at line 2887 of file geomObjects.h.
| std::vector<std::string> util::geometry::ComplexGeomObject::d_objFlag |
Object flag.
Ordering of objects is important. To describe a rectangle with circular hole, we will have d_obj = {rectangle, circle} and have flag = {plus, minus}. This means final object is rectangle - circle
Definition at line 2897 of file geomObjects.h.
Referenced by ComplexGeomObject().
| std::vector<int> util::geometry::ComplexGeomObject::d_objFlagInt |
Object integer flags. Here, +1 means object is filling and -1 means object is void.
Definition at line 2902 of file geomObjects.h.
Referenced by ComplexGeomObject().