![]() |
PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Defines abstract geometrical domain. More...
#include <geomObjects.h>
Public Member Functions | |
| GeomObject (std::string name="", std::string description="") | |
| Constructor. | |
| virtual double | volume () const |
| Computes the volume (area in 2d, length in 1d) of object. | |
| virtual util::Point | center () const |
| Computes the center of object. | |
| virtual std::pair< util::Point, util::Point > | box () const |
| Computes the bounding box of object. | |
| virtual std::pair< util::Point, util::Point > | box (const double &tol) const |
| Computes the bounding box of object. | |
| virtual double | inscribedRadius () const |
| Computes the radius of biggest circle/sphere completely within the object. | |
| virtual double | boundingRadius () const |
| Computes the radius of smallest circle/sphere such that object can be fit into it. | |
| virtual std::string | printStr (int nt, int lvl) const |
| Returns the string containing printable information about the object. | |
| virtual void | print (int nt, int lvl) const |
| Prints the information about the object. | |
| virtual void | print () const |
| Prints the information about the object. | |
Interaction with point | |
| virtual bool | isInside (const util::Point &x) const |
| Checks if point is inside this object. | |
| virtual bool | isOutside (const util::Point &x) const |
| Checks if point is outside of this object. | |
| virtual bool | isNear (const util::Point &x, const double &tol) const |
| Checks if point is within given distance of this object. | |
| virtual bool | isNearBoundary (const util::Point &x, const double &tol, const bool &within) const |
| Checks if point is within given distance of this object. | |
| virtual bool | doesIntersect (const util::Point &x) const |
| Checks if point lies exactly on the boundary. | |
Interaction with box | |
| virtual bool | isInside (const std::pair< util::Point, util::Point > &box) const |
| Checks if box is completely inside. | |
| virtual bool | isOutside (const std::pair< util::Point, util::Point > &box) const |
| Checks if box is outside of the object. | |
| virtual bool | isNear (const std::pair< util::Point, util::Point > &box, const double &tol) const |
| Checks if box is within given distance of this object. | |
| virtual bool | doesIntersect (const std::pair< util::Point, util::Point > &box) const |
| Checks if box intersects this object. | |
Data Fields | |
| 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 abstract geometrical domain.
Definition at line 31 of file geomObjects.h.
|
inlineexplicit |
Constructor.
| name | Name of the geometric object |
| description | Description of object (e.g., further classification or any tag) |
Definition at line 39 of file geomObjects.h.
|
inlinevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 85 of file geomObjects.h.
|
inlinevirtual |
Computes the bounding box of object.
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 59 of file geomObjects.h.
|
inlinevirtual |
Computes the bounding box of object.
| tol | Tolerance/padding used in creating bounding box |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 69 of file geomObjects.h.
|
inlinevirtual |
Computes the center of object.
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 53 of file geomObjects.h.
|
inlinevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 179 of file geomObjects.h.
|
inlinevirtual |
Checks if point lies exactly on the boundary.
| x | Point |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 134 of file geomObjects.h.
|
inlinevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 78 of file geomObjects.h.
|
inlinevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 148 of file geomObjects.h.
|
inlinevirtual |
Checks if point is inside this object.
| x | Point |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 96 of file geomObjects.h.
|
inlinevirtual |
Checks if box is within given distance of this object.
| box | Box |
| tol | Tolerance used in checking the nearness |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 168 of file geomObjects.h.
|
inlinevirtual |
Checks if point is within given distance of this object.
| x | Point |
| tol | Tolerance used in checking the nearness |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 112 of file geomObjects.h.
|
inlinevirtual |
Checks if point is within given distance of this object.
| x | Point |
| tol | Tolerance used in checking the nearness |
| within | Check if the point is within (inside) the object |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 123 of file geomObjects.h.
|
inlinevirtual |
Checks if box is outside of the object.
| box | Box |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 158 of file geomObjects.h.
|
inlinevirtual |
Checks if point is outside of this object.
| x | Point |
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 104 of file geomObjects.h.
|
inlinevirtual |
Prints the information about the object.
Reimplemented in util::geometry::NullGeomObject, util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 220 of file geomObjects.h.
References print().
Referenced by print().
|
inlinevirtual |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Reimplemented in util::geometry::NullGeomObject, util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 215 of file geomObjects.h.
References printStr().
|
inlinevirtual |
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 in util::geometry::NullGeomObject, util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 193 of file geomObjects.h.
References d_description, d_name, and util::io::getTabS().
Referenced by print().
|
inlinevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented in util::geometry::Line, util::geometry::Triangle, util::geometry::Square, util::geometry::Rectangle, util::geometry::Hexagon, util::geometry::Drum2D, util::geometry::Cube, util::geometry::Cuboid, util::geometry::Circle, util::geometry::Ellipse, util::geometry::Sphere, util::geometry::Cylinder, util::geometry::AnnulusGeomObject, and util::geometry::ComplexGeomObject.
Definition at line 47 of file geomObjects.h.
| const std::string util::geometry::GeomObject::d_description |
Further description of object.
Definition at line 227 of file geomObjects.h.
Referenced by printStr().
| const std::string util::geometry::GeomObject::d_name |
name of object
Definition at line 224 of file geomObjects.h.
Referenced by printStr(), and util::geometry::NullGeomObject::printStr().
| std::vector<std::string> util::geometry::GeomObject::d_tags |
Tags/attributes about the object.
Definition at line 230 of file geomObjects.h.