PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
util::geometry::NullGeomObject Class Reference

Defines null (empty) geom object. More...

#include <geomObjects.h>

Inheritance diagram for util::geometry::NullGeomObject:
Collaboration diagram for util::geometry::NullGeomObject:

Public Member Functions

 NullGeomObject (std::string description="")
 Constructor.
 
virtual 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 util::geometry::GeomObject
 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::Pointbox () const
 Computes the bounding box of object.
 
virtual std::pair< util::Point, util::Pointbox (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 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.
 
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.
 

Additional Inherited Members

- 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.
 

Detailed Description

Defines null (empty) geom object.

Definition at line 236 of file geomObjects.h.

Constructor & Destructor Documentation

◆ NullGeomObject()

util::geometry::NullGeomObject::NullGeomObject ( std::string  description = "")
inline

Constructor.

Definition at line 242 of file geomObjects.h.

242: GeomObject("null", description) {};
GeomObject(std::string name="", std::string description="")
Constructor.
Definition geomObjects.h:39

Member Function Documentation

◆ print() [1/2]

void util::geometry::NullGeomObject::print ( ) const
inlineoverridevirtual

Prints the information about the object.

Reimplemented from util::geometry::GeomObject.

Definition at line 269 of file geomObjects.h.

269{ print(0, 0); };
void print() const override
Prints the information about the object.

References print().

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print() [2/2]

void util::geometry::NullGeomObject::print ( int  nt,
int  lvl 
) const
inlineoverridevirtual

Prints the information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)

Reimplemented from util::geometry::GeomObject.

Definition at line 262 of file geomObjects.h.

262 {
263 std::cout << printStr(nt, lvl);
264 };
virtual std::string printStr(int nt, int lvl) const override
Returns the string containing printable information about the object.

References printStr().

Here is the call graph for this function:

◆ printStr()

virtual std::string util::geometry::NullGeomObject::printStr ( int  nt,
int  lvl 
) const
inlineoverridevirtual

Returns the string containing printable information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)
Returns
string String containing printable information about the object

Reimplemented from util::geometry::GeomObject.

Definition at line 247 of file geomObjects.h.

247 {
248
249 auto tabS = util::io::getTabS(nt);
250 std::ostringstream oss;
251
252 oss << tabS << "------- NullGeomObject --------" << std::endl
253 << std::endl;
254 oss << tabS << "Name of GeomObject = " << d_name << std::endl;
255
256 return oss.str();
257 };
const std::string d_name
name of object
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40

References util::geometry::GeomObject::d_name, and util::io::getTabS().

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: