PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Defines cylinder. More...
#include <geomObjects.h>
Public Member Functions | |
Cylinder () | |
Constructor. | |
Cylinder (double r, double l, util::Point x_begin, util::Point xa, std::string description="") | |
Constructor. | |
Cylinder (double r, util::Point x_begin, util::Point xa, 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 | |
util::Point | d_x |
Center. | |
util::Point | d_xBegin |
Center point of cross-section at the beginning. | |
util::Point | d_xa |
Axis of cylinder (unit vector) | |
double | d_r |
Radius. | |
double | d_l |
Length. | |
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 cylinder.
Definition at line 2212 of file geomObjects.h.
|
inline |
Constructor.
Definition at line 2218 of file geomObjects.h.
|
inline |
Constructor.
r | Radius of cylinder |
l | Length of cylinder |
x_begin | Center of the bottom bottom cross-section |
xa | Axis of cylinder (if it is not a unit vector, we compute unit vector along xa) |
description | Description of object (e.g., further classification or any tag) |
Definition at line 2235 of file geomObjects.h.
|
inline |
Constructor.
r | Radius of cylinder |
x_begin | Center of the bottom bottom cross-section |
xa | Axis of cylinder (should be the actual vector from center of bottom section to top section so that the length of the vector is a length of cylinder) |
description | Description of object (e.g., further classification or any tag) |
Definition at line 2253 of file geomObjects.h.
|
overridevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented from util::geometry::GeomObject.
Definition at line 1392 of file geomObjects.cpp.
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1366 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 1372 of file geomObjects.cpp.
|
overridevirtual |
Computes the center of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1362 of file geomObjects.cpp.
|
overridevirtual |
Checks if box intersects this object.
box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1500 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 1467 of file geomObjects.cpp.
|
overridevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1385 of file geomObjects.cpp.
|
overridevirtual |
Checks if box is completely inside.
box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1472 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 1397 of file geomObjects.cpp.
References util::isGreater(), and util::isLess().
|
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 1493 of file geomObjects.cpp.
References util::areBoxesNear().
|
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 1421 of file geomObjects.cpp.
References util::isGreater(), and util::isLess().
|
overridevirtual |
cons
cons
Reimplemented from util::geometry::GeomObject.
Definition at line 1442 of file geomObjects.cpp.
References util::isGreater(), and util::isLess().
|
overridevirtual |
Checks if box is outside of the object.
box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1482 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 1417 of file geomObjects.cpp.
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from util::geometry::GeomObject.
Definition at line 2379 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 util::geometry::GeomObject.
Definition at line 2372 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 util::geometry::GeomObject.
Definition at line 1512 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 1358 of file geomObjects.cpp.
double util::geometry::Cylinder::d_l |
Length.
Definition at line 2394 of file geomObjects.h.
double util::geometry::Cylinder::d_r |
Radius.
Definition at line 2391 of file geomObjects.h.
util::Point util::geometry::Cylinder::d_x |
Center.
Definition at line 2382 of file geomObjects.h.
util::Point util::geometry::Cylinder::d_xa |
Axis of cylinder (unit vector)
Definition at line 2388 of file geomObjects.h.
util::Point util::geometry::Cylinder::d_xBegin |
Center point of cross-section at the beginning.
Definition at line 2385 of file geomObjects.h.