![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Ellipsoid: center \(\mathbf c\), semi-axes \(r_1,r_2,r_3\) in a body frame rotated from world by axis–angle \((\hat{\mathbf a},\theta)\) (Rodrigues). Axis-aligned case: \(\theta=0\) (axis ignored). More...
#include <geomObjects.h>
Public Member Functions | |
| Ellipsoid () | |
| Ellipsoid (double a, double b, double c, util::Point x=util::Point(), std::string description="") | |
| Ellipsoid (double a, double b, double c, double theta, util::Point x, util::Point axis, std::string description="") | |
| General orientation: same semi-axes, rotation \(\theta\) about unit axis (normalized internally; zero axis with \(\theta\neq 0\) is invalid). | |
| Ellipsoid (const Ellipsoid &other) | |
| Ellipsoid & | operator= (const Ellipsoid &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 |
| double | d_a |
| double | d_b |
| double | d_c |
| util::Point | d_axis |
| Unit rotation axis (axis–angle); default (0,0,1) when \(\theta=0\). | |
| double | d_theta |
| Rotation angle (radians) about d_axis. | |
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. | |
Ellipsoid: center \(\mathbf c\), semi-axes \(r_1,r_2,r_3\) in a body frame rotated from world by axis–angle \((\hat{\mathbf a},\theta)\) (Rodrigues). Axis-aligned case: \(\theta=0\) (axis ignored).
Definition at line 3031 of file geomObjects.h.
|
inline |
Definition at line 3043 of file geomObjects.h.
|
inline |
| a | First semi-axis (body frame) |
| b | Second semi-axis (body frame) |
| c | Third semi-axis (body frame) |
Definition at line 3057 of file geomObjects.h.
|
inline |
General orientation: same semi-axes, rotation \(\theta\) about unit axis (normalized internally; zero axis with \(\theta\neq 0\) is invalid).
Definition at line 3071 of file geomObjects.h.
References d_axis, and util::Point::length().
|
inline |
Definition at line 3086 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 2151 of file geomObjects.cpp.
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from geom::GeomObject.
Definition at line 2118 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 2122 of file geomObjects.cpp.
References d_a, d_b, d_c, d_x, util::Point::d_x, util::Point::d_y, util::Point::d_z, and geom::ellipsoidRotationMatrix().
|
overridevirtual |
Computes the center of object.
Reimplemented from geom::GeomObject.
Definition at line 2114 of file geomObjects.cpp.
References d_x.
|
overridevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 2222 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 2194 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 2142 of file geomObjects.cpp.
|
overridevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 2198 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 2160 of file geomObjects.cpp.
References d_a, d_b, d_c, and util::isLess().
Referenced by doesIntersect(), isInside(), isNearBoundary(), 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 2217 of file geomObjects.cpp.
References geom::areBoxesNear(), and box().
|
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 2171 of file geomObjects.cpp.
References d_a, d_b, d_c, and util::isLess().
Referenced by isNearBoundary().
|
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 2179 of file geomObjects.cpp.
References d_a, d_b, d_c, isInside(), and isNear().
Referenced by doesIntersect().
|
overridevirtual |
Checks if box is outside of the object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 2207 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 2167 of file geomObjects.cpp.
References isInside().
Definition at line 3097 of file geomObjects.h.
References d_a, d_axis, d_b, d_c, geom::GeomObject::d_tags, d_theta, and d_x.
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from geom::GeomObject.
Definition at line 3133 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 3132 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 2231 of file geomObjects.cpp.
References box(), d_a, d_axis, d_b, d_c, geom::GeomObject::d_name, d_theta, d_x, util::io::getTabS(), util::io::printBoxStr(), and util::Point::printStr().
Referenced by print().
|
overridevirtual |
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 2090 of file geomObjects.cpp.
References d_a, d_axis, d_b, d_c, 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 2110 of file geomObjects.cpp.
| double geom::Ellipsoid::d_a |
Definition at line 3034 of file geomObjects.h.
Referenced by boundingRadius(), box(), mesh_gen::buildEllipsoidOcc(), inscribedRadius(), isInside(), isNear(), isNearBoundary(), operator=(), printStr(), transform(), and volume().
| util::Point geom::Ellipsoid::d_axis |
Unit rotation axis (axis–angle); default (0,0,1) when \(\theta=0\).
Definition at line 3038 of file geomObjects.h.
Referenced by Ellipsoid(), geom::ellipsoidRotationMatrix(), operator=(), printStr(), and transform().
| double geom::Ellipsoid::d_b |
Definition at line 3035 of file geomObjects.h.
Referenced by boundingRadius(), box(), mesh_gen::buildEllipsoidOcc(), inscribedRadius(), isInside(), isNear(), isNearBoundary(), operator=(), printStr(), transform(), and volume().
| double geom::Ellipsoid::d_c |
Definition at line 3036 of file geomObjects.h.
Referenced by boundingRadius(), box(), mesh_gen::buildEllipsoidOcc(), inscribedRadius(), isInside(), isNear(), isNearBoundary(), operator=(), printStr(), transform(), and volume().
| double geom::Ellipsoid::d_theta |
Rotation angle (radians) about d_axis.
Definition at line 3040 of file geomObjects.h.
Referenced by geom::ellipsoidRotationMatrix(), operator=(), printStr(), and transform().
| util::Point geom::Ellipsoid::d_x |
Definition at line 3033 of file geomObjects.h.
Referenced by box(), mesh_gen::buildEllipsoidOcc(), center(), geom::anonymous_namespace{geomObjects.cpp}::ellipsoidMetric(), operator=(), printStr(), and transform().