![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Filled ellipse in the plane z = center.d_z, semi-axes in the xy plane. More...
#include <geomObjects.h>
Public Member Functions | |
| Ellipse () | |
| Ellipse (double a, double b, double theta, util::Point x=util::Point(), std::string description="") | |
| Ellipse (const Ellipse &other) | |
| Ellipse & | operator= (const Ellipse &other) |
| void | transform (const util::Point &translation, const double &scale, const double &angle, const util::Point &axis, const util::Point *rotationPoint) override |
Similarity about pivot \(\mathbf p\) (default: old center d_x), then rigid displacement \(\mathbf t\) = translation: \(\mathbf y = \mathbf p + s\,\mathbf R(\mathbf x-\mathbf p) + \mathbf t\). When \(\theta=0\) and \(s=1\), \(\mathbf y = \mathbf x + \mathbf t\) for every point and the center. | |
| 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. | |
| 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 |
| Checks if point is within given distance of this object. | |
| bool | doesIntersect (const util::Point &x) const override |
| Checks if point lies exactly on the boundary. | |
| 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. | |
| 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. | |
Public Member Functions inherited from geom::GeomObject | |
| GeomObject (std::string name="", std::string description="") | |
| Constructor. | |
| virtual bool | wallContactQuery (const util::Point &x, WallContactHit &hit) const |
Closest-point / signed-gap query for analytical wall contact. Default: unsupported (returns false, clears hit). | |
Data Fields | |
| util::Point | d_x |
| Center. | |
| double | d_a |
| Semi-axis along local x before rotation (in-plane) | |
| double | d_b |
| Semi-axis along local y before rotation (in-plane) | |
| double | d_theta |
| Counter-clockwise rotation about +z through the center (radians) | |
Data Fields inherited from geom::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. | |
Filled ellipse in the plane z = center.d_z, semi-axes in the xy plane.
Definition at line 2747 of file geomObjects.h.
|
inline |
Definition at line 2762 of file geomObjects.h.
|
inline |
|
inline |
Definition at line 2783 of file geomObjects.h.
References geom::GeomObject::d_tags.
|
overridevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented from geom::GeomObject.
Definition at line 1552 of file geomObjects.cpp.
Referenced by isNear().
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from geom::GeomObject.
Definition at line 1533 of file geomObjects.cpp.
References box().
Referenced by box(), doesIntersect(), isInside(), isNear(), isOutside(), and printStr().
|
overridevirtual |
Computes the bounding box of object.
| tol | Tolerance/padding used in creating bounding box |
Reimplemented from geom::GeomObject.
Definition at line 1537 of file geomObjects.cpp.
References d_a, d_b, d_theta, d_x, util::Point::d_x, and util::Point::d_y.
|
overridevirtual |
Computes the center of object.
Reimplemented from geom::GeomObject.
Definition at line 1529 of file geomObjects.cpp.
References d_x.
|
overridevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 1625 of file geomObjects.cpp.
References box(), geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point lies exactly on the boundary.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 1583 of file geomObjects.cpp.
References isNearBoundary().
|
overridevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented from geom::GeomObject.
Definition at line 1548 of file geomObjects.cpp.
|
overridevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 1587 of file geomObjects.cpp.
References box(), geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is inside this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 1556 of file geomObjects.cpp.
Referenced by doesIntersect(), isInside(), isNear(), isOutside(), and isOutside().
|
overridevirtual |
Checks if box is within given distance of this object.
| box | Box |
| tol | Tolerance used in checking the nearness |
Reimplemented from geom::GeomObject.
Definition at line 1606 of file geomObjects.cpp.
References boundingRadius(), box(), geom::circumscribedRadiusInBox(), d_x, geom::getCenter(), geom::getCornerPoints(), geom::inscribedRadiusInBox(), isInside(), util::isLess(), and isNear().
|
overridevirtual |
Checks if point is within given distance of this object.
| x | Point |
| tol | Tolerance used in checking the nearness |
Reimplemented from geom::GeomObject.
Definition at line 1566 of file geomObjects.cpp.
Referenced by isNear().
|
overridevirtual |
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 from geom::GeomObject.
Definition at line 1572 of file geomObjects.cpp.
Referenced by doesIntersect().
|
overridevirtual |
Checks if box is outside of the object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 1596 of file geomObjects.cpp.
References box(), geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is outside of this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 1562 of file geomObjects.cpp.
References isInside().
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from geom::GeomObject.
Definition at line 2833 of file geomObjects.h.
References print().
Referenced by print().
|
inlineoverridevirtual |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Reimplemented from geom::GeomObject.
Definition at line 2832 of file geomObjects.h.
References printStr().
|
overridevirtual |
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 geom::GeomObject.
Definition at line 1634 of file geomObjects.cpp.
References box(), d_a, d_b, geom::GeomObject::d_name, d_theta, d_x, util::io::getTabS(), util::io::printBoxStr(), and util::Point::printStr().
Referenced by print().
|
inlineoverridevirtual |
Similarity about pivot \(\mathbf p\) (default: old center d_x), then rigid displacement \(\mathbf t\) = translation: \(\mathbf y = \mathbf p + s\,\mathbf R(\mathbf x-\mathbf p) + \mathbf t\). When \(\theta=0\) and \(s=1\), \(\mathbf y = \mathbf x + \mathbf t\) for every point and the center.
| translation | Rigid translation vector \(\mathbf t\) (added after rotate+scale about \(\mathbf p\)) |
| scale | Uniform scale factor |
| angle | Rotation angle (radians) |
| axis | Axis of rotation |
| rotationPoint | If non-null, use as \(\mathbf p\); if null, use old d_x as pivot. |
Reimplemented from geom::GeomObject.
Definition at line 2803 of file geomObjects.h.
References d_a, d_b, d_theta, d_x, and geom::mapSimilarity().
|
overridevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented from geom::GeomObject.
Definition at line 1525 of file geomObjects.cpp.
| double geom::Ellipse::d_a |
Semi-axis along local x before rotation (in-plane)
Definition at line 2753 of file geomObjects.h.
Referenced by mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::addEllipseDiskOcc(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::assertEllipseAnnulusValid(), boundingRadius(), box(), mesh_gen::buildEllipseOcc(), inscribedRadius(), isInside(), isNear(), isNearBoundary(), operator=(), printStr(), transform(), and volume().
| double geom::Ellipse::d_b |
Semi-axis along local y before rotation (in-plane)
Definition at line 2756 of file geomObjects.h.
Referenced by mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::addEllipseDiskOcc(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::assertEllipseAnnulusValid(), boundingRadius(), box(), mesh_gen::buildEllipseOcc(), inscribedRadius(), isInside(), isNear(), isNearBoundary(), operator=(), printStr(), transform(), and volume().
| double geom::Ellipse::d_theta |
Counter-clockwise rotation about +z through the center (radians)
Definition at line 2759 of file geomObjects.h.
Referenced by mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::addEllipseDiskOcc(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::assertEllipseAnnulusValid(), box(), mesh_gen::buildEllipseOcc(), geom::anonymous_namespace{geomObjects.cpp}::ellipseLocal(), operator=(), printStr(), and transform().
| util::Point geom::Ellipse::d_x |
Center.
Definition at line 2750 of file geomObjects.h.
Referenced by mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::addEllipseDiskOcc(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::assertEllipseAnnulusValid(), box(), mesh_gen::buildEllipseOcc(), center(), geom::anonymous_namespace{geomObjects.cpp}::ellipseLocal(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::embedPointInAnnulus2D(), isNear(), operator=(), printStr(), and transform().