PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Defines cuboid. More...
#include <geomObjects.h>
Public Member Functions | |
Cuboid () | |
Constructor. | |
Cuboid (double Lx, double Ly, double Lz, util::Point x=util::Point(), std::string description="") | |
Constructor. | |
Cuboid (util::Point x1, util::Point x2, 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< util::Point > | d_vertices |
Vertices. | |
util::Point | d_x |
Center. | |
double | d_Lx |
Edge length of cuboid in x-direction. | |
double | d_Ly |
Edge length of cuboid in y-direction. | |
double | d_Lz |
Edge length of cuboid in z-direction. | |
double | d_r |
Radius of bounding circle. | |
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 cuboid.
Definition at line 1662 of file geomObjects.h.
|
inline |
Constructor.
Definition at line 1668 of file geomObjects.h.
|
inline |
Constructor.
Lx | Length along x-direction |
Ly | Length along y-direction |
Lz | Length along z-direction |
x | Center point |
description | Description of object (e.g., further classification or any tag) |
Definition at line 1686 of file geomObjects.h.
References d_Lx, d_Ly, d_Lz, d_vertices, and d_x.
|
inline |
Constructor.
x1 | Left-bottom-back corner point |
x2 | Right-top-front corner point |
description | Description of object (e.g., further classification or any tag) |
Definition at line 1728 of file geomObjects.h.
References d_Lx, d_Ly, d_Lz, d_vertices, and d_x.
|
overridevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented from util::geometry::GeomObject.
Definition at line 1082 of file geomObjects.cpp.
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1063 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 1068 of file geomObjects.cpp.
|
overridevirtual |
Computes the center of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1059 of file geomObjects.cpp.
|
overridevirtual |
Checks if box intersects this object.
box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1157 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 1124 of file geomObjects.cpp.
|
overridevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1076 of file geomObjects.cpp.
References util::isLess().
|
overridevirtual |
Checks if box is completely inside.
box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1129 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 1087 of file geomObjects.cpp.
References util::isPointInsideCuboid().
|
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 1150 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 1095 of file geomObjects.cpp.
References util::isPointInsideBox().
|
overridevirtual |
cons
cons
Reimplemented from util::geometry::GeomObject.
Definition at line 1104 of file geomObjects.cpp.
References util::Point::d_x, util::Point::d_y, util::Point::d_z, and util::isLess().
|
overridevirtual |
Checks if box is outside of the object.
box | Box |
Reimplemented from util::geometry::GeomObject.
Definition at line 1139 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 1091 of file geomObjects.cpp.
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1882 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 1875 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 1168 of file geomObjects.cpp.
References util::io::getTabS(), util::io::printBoxStr(), and util::io::printStr().
Referenced by print().
|
overridevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented from util::geometry::GeomObject.
Definition at line 1055 of file geomObjects.cpp.
double util::geometry::Cuboid::d_Lx |
Edge length of cuboid in x-direction.
Definition at line 1891 of file geomObjects.h.
double util::geometry::Cuboid::d_Ly |
Edge length of cuboid in y-direction.
Definition at line 1894 of file geomObjects.h.
double util::geometry::Cuboid::d_Lz |
Edge length of cuboid in z-direction.
Definition at line 1897 of file geomObjects.h.
double util::geometry::Cuboid::d_r |
Radius of bounding circle.
Definition at line 1900 of file geomObjects.h.
std::vector<util::Point> util::geometry::Cuboid::d_vertices |
util::Point util::geometry::Cuboid::d_x |