PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
geom::Cuboid Class Reference

Defines cuboid. More...

#include <geomObjects.h>

Inheritance diagram for geom::Cuboid:
Collaboration diagram for geom::Cuboid:

Public Member Functions

 Cuboid ()
 Constructor.
 
 Cuboid (double Lx, double Ly, double Lz, util::Point x=util::Point(), std::string description="")
 Constructor.
 
 Cuboid (const Cuboid &other)
 Copy constructor.
 
 Cuboid (util::Point x1, util::Point x2, std::string description="")
 Constructor.
 
Cuboidoperator= (const Cuboid &other)
 Assignment operator.
 
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::Pointbox () const override
 Computes the bounding box of object.
 
std::pair< util::Point, util::Pointbox (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 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

std::vector< util::Pointd_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 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.
 

Detailed Description

Defines cuboid.

Definition at line 2261 of file geomObjects.h.

Constructor & Destructor Documentation

◆ Cuboid() [1/4]

geom::Cuboid::Cuboid ( )
inline

Constructor.

Definition at line 2285 of file geomObjects.h.

2286 : GeomObject("cuboid", ""),
2287 d_Lx(0.),
2288 d_Ly(0.),
2289 d_Lz(0.),
2290 d_r(0.),
2291 d_x(util::Point()),
2292 d_vertices(std::vector<util::Point>(8, util::Point())) {
2293 };
double d_Ly
Edge length of cuboid in y-direction.
std::vector< util::Point > d_vertices
Vertices.
double d_Lx
Edge length of cuboid in x-direction.
util::Point d_x
Center.
double d_r
Radius of bounding circle.
double d_Lz
Edge length of cuboid in z-direction.
GeomObject(std::string name="", std::string description="")
Constructor.
A structure to represent 3d vectors.
Definition point.h:30

◆ Cuboid() [2/4]

geom::Cuboid::Cuboid ( double  Lx,
double  Ly,
double  Lz,
util::Point  x = util::Point(),
std::string  description = "" 
)
inline

Constructor.

Parameters
LxLength along x-direction
LyLength along y-direction
LzLength along z-direction
xCenter point
descriptionDescription of object (e.g., further classification or any tag)

Definition at line 2304 of file geomObjects.h.

2307 : GeomObject("cuboid", description),
2308 d_Lx(Lx),
2309 d_Ly(Ly),
2310 d_Lz(Lz),
2311 d_r(std::sqrt(std::pow(Lx, 2) + std::pow(Ly, 2) +
2312 std::pow(Lz, 2))),
2313 d_x(x),
2314 d_vertices(std::vector<util::Point>(8, util::Point())) {
2315 // numbering assuming x - left-right, y - back-front, z - bottom-top
2316 // counterclockwise in bottom plane (i.e.,
2317 // 0 - left-back-bottom, 1 - right-back-bottom,
2318 // 2 - right-front-bottom, 3 - left-front-bottom
2319 // similarly, in top plane
2320 d_vertices[0] =
2321 d_x + util::Point(-0.5 * d_Lx, -0.5 * d_Ly, -0.5 * d_Lz);
2322 d_vertices[1] =
2323 d_x + util::Point(0.5 * d_Lx, -0.5 * d_Ly, -0.5 * d_Lz);
2324 d_vertices[2] =
2325 d_x + util::Point(0.5 * d_Lx, 0.5 * d_Ly, -0.5 * d_Lz);
2326 d_vertices[3] =
2327 d_x + util::Point(-0.5 * d_Lx, 0.5 * d_Ly, -0.5 * d_Lz);
2328
2329 d_vertices[4] =
2330 d_x + util::Point(-0.5 * d_Lx, -0.5 * d_Ly, 0.5 * d_Lz);
2331 d_vertices[5] =
2332 d_x + util::Point(0.5 * d_Lx, -0.5 * d_Ly, 0.5 * d_Lz);
2333 d_vertices[6] =
2334 d_x + util::Point(0.5 * d_Lx, 0.5 * d_Ly, 0.5 * d_Lz);
2335 d_vertices[7] =
2336 d_x + util::Point(-0.5 * d_Lx, 0.5 * d_Ly, 0.5 * d_Lz);
2337 };

References d_Lx, d_Ly, d_Lz, d_vertices, and d_x.

◆ Cuboid() [3/4]

geom::Cuboid::Cuboid ( const Cuboid other)
inline

Copy constructor.

Parameters
otherObject to copy from

Definition at line 2343 of file geomObjects.h.

2344 : GeomObject(other.d_name, other.d_description),
2345 d_Lx(other.d_Lx),
2346 d_Ly(other.d_Ly),
2347 d_Lz(other.d_Lz),
2348 d_r(other.d_r),
2349 d_x(other.d_x),
2350 d_vertices(other.d_vertices) {
2351 d_tags = other.d_tags;
2352 }
std::vector< std::string > d_tags
Tags/attributes about the object.

References geom::GeomObject::d_tags.

◆ Cuboid() [4/4]

geom::Cuboid::Cuboid ( util::Point  x1,
util::Point  x2,
std::string  description = "" 
)
inline

Constructor.

Parameters
x1Left-bottom-back corner point
x2Right-top-front corner point
descriptionDescription of object (e.g., further classification or any tag)

Definition at line 2361 of file geomObjects.h.

2362 : GeomObject("cuboid", description),
2363 d_Lx(x2.d_x - x1.d_x),
2364 d_Ly(x2.d_y - x1.d_y),
2365 d_Lz(x2.d_z - x1.d_z),
2366 d_r(std::sqrt(
2367 std::pow(x2.d_x - x1.d_x, 2)
2368 + std::pow(x2.d_y - x1.d_y, 2)
2369 + std::pow(x2.d_z - x1.d_z, 2)
2370 )
2371 ),
2372 d_x(0.5 * (x1 + x2)),
2373 d_vertices(std::vector<util::Point>(8, util::Point())) {
2374 // numbering assuming x - left-right, y - back-front, z - bottom-top
2375 // counterclockwise in bottom plane (i.e.,
2376 // 0 - left-back-bottom, 1 - right-back-bottom,
2377 // 2 - right-front-bottom, 3 - left-front-bottom
2378 // similarly, in top plane
2379 d_vertices[0] =
2380 d_x + util::Point(-0.5 * d_Lx, -0.5 * d_Ly, -0.5 * d_Lz);
2381 d_vertices[1] =
2382 d_x + util::Point(0.5 * d_Lx, -0.5 * d_Ly, -0.5 * d_Lz);
2383 d_vertices[2] =
2384 d_x + util::Point(0.5 * d_Lx, 0.5 * d_Ly, -0.5 * d_Lz);
2385 d_vertices[3] =
2386 d_x + util::Point(-0.5 * d_Lx, 0.5 * d_Ly, -0.5 * d_Lz);
2387
2388 d_vertices[4] =
2389 d_x + util::Point(-0.5 * d_Lx, -0.5 * d_Ly, 0.5 * d_Lz);
2390 d_vertices[5] =
2391 d_x + util::Point(0.5 * d_Lx, -0.5 * d_Ly, 0.5 * d_Lz);
2392 d_vertices[6] =
2393 d_x + util::Point(0.5 * d_Lx, 0.5 * d_Ly, 0.5 * d_Lz);
2394 d_vertices[7] =
2395 d_x + util::Point(-0.5 * d_Lx, 0.5 * d_Ly, 0.5 * d_Lz);
2396 };
double d_y
the y coordinate
Definition point.h:36
double d_z
the z coordinate
Definition point.h:39
double d_x
the x coordinate
Definition point.h:33

References d_Lx, d_Ly, d_Lz, d_vertices, and d_x.

Member Function Documentation

◆ boundingRadius()

double geom::Cuboid::boundingRadius ( ) const
overridevirtual

Computes the radius of smallest circle/sphere such that object can be fit into it.

Returns
Radius Radius of bounding circle/sphere

Reimplemented from geom::GeomObject.

Definition at line 1231 of file geomObjects.cpp.

1231 {
1232
1233 return d_r;
1234 }

References d_r.

◆ box() [1/2]

std::pair< util::Point, util::Point > geom::Cuboid::box ( ) const
overridevirtual

Computes the bounding box of object.

Returns
Pair Left-bottom-back and right-top-front corner points of box

Reimplemented from geom::GeomObject.

Definition at line 1212 of file geomObjects.cpp.

1212 {
1213
1214 return box(0.);
1215 }
std::pair< util::Point, util::Point > box() const override
Computes the bounding box of object.

References box().

Referenced by box(), doesIntersect(), isInside(), isNear(), isNear(), isOutside(), and printStr().

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

◆ box() [2/2]

std::pair< util::Point, util::Point > geom::Cuboid::box ( const double &  tol) const
overridevirtual

Computes the bounding box of object.

Parameters
tolTolerance/padding used in creating bounding box
Returns
Pair Left-bottom-back and right-top-front corner points of box

Reimplemented from geom::GeomObject.

Definition at line 1217 of file geomObjects.cpp.

1218 {
1219 return {util::Point(d_vertices[0].d_x - tol, d_vertices[0].d_y - tol,
1220 d_vertices[0].d_z - tol),
1221 util::Point(d_vertices[6].d_x + tol, d_vertices[6].d_y + tol,
1222 d_vertices[6].d_z + tol)};
1223 }

References d_vertices, and d_x.

◆ center()

util::Point geom::Cuboid::center ( ) const
overridevirtual

Computes the center of object.

Returns
Point Coordinates of center

Reimplemented from geom::GeomObject.

Definition at line 1208 of file geomObjects.cpp.

1208 {
1209 return d_x;
1210 }

References d_x.

◆ doesIntersect() [1/2]

bool geom::Cuboid::doesIntersect ( const std::pair< util::Point, util::Point > &  box) const
overridevirtual

Checks if box intersects this object.

Parameters
boxBox
Returns
True True if intersects

Reimplemented from geom::GeomObject.

Definition at line 1306 of file geomObjects.cpp.

1307 {
1308
1309 // need to check all four corner points
1310 for (auto p: geom::getCornerPoints(3, box))
1311 if (this->isInside(p))
1312 return true;
1313
1314 return false;
1315 }
bool isInside(const util::Point &x) const override
Checks if point is inside this object.
std::vector< util::Point > getCornerPoints(size_t dim, const std::pair< util::Point, util::Point > &box)
Returns all corner points in the box.

References box(), geom::getCornerPoints(), and isInside().

Here is the call graph for this function:

◆ doesIntersect() [2/2]

bool geom::Cuboid::doesIntersect ( const util::Point x) const
overridevirtual

Checks if point lies exactly on the boundary.

Parameters
xPoint
Returns
True True if it lies on the boundary

Reimplemented from geom::GeomObject.

Definition at line 1273 of file geomObjects.cpp.

1273 {
1274
1275 return isNearBoundary(x, 1.0E-8, false);
1276 }
bool isNearBoundary(const util::Point &x, const double &tol, const bool &within) const override
cons

References isNearBoundary().

Here is the call graph for this function:

◆ inscribedRadius()

double geom::Cuboid::inscribedRadius ( ) const
overridevirtual

Computes the radius of biggest circle/sphere completely within the object.

Returns
Radius Radius of inscribed circle/sphere

Reimplemented from geom::GeomObject.

Definition at line 1225 of file geomObjects.cpp.

1225 {
1226
1227 auto l = util::isLess(d_Lx, d_Ly) ? d_Lx : d_Ly;
1228 return util::isLess(l, d_Lz) ? l : d_Lz;
1229 }
bool isLess(const double &a, const double &b)
Returns true if a < b.
Definition function.cpp:20

References d_Lx, d_Ly, d_Lz, and util::isLess().

Here is the call graph for this function:

◆ isInside() [1/2]

bool geom::Cuboid::isInside ( const std::pair< util::Point, util::Point > &  box) const
overridevirtual

Checks if box is completely inside.

Parameters
boxBox
Returns
True True if box lies inside

Reimplemented from geom::GeomObject.

Definition at line 1278 of file geomObjects.cpp.

1279 {
1280
1281 for (auto p: geom::getCornerPoints(3, box))
1282 if (!this->isInside(p))
1283 return false;
1284
1285 return true;
1286 }

References box(), geom::getCornerPoints(), and isInside().

Here is the call graph for this function:

◆ isInside() [2/2]

bool geom::Cuboid::isInside ( const util::Point x) const
overridevirtual

Checks if point is inside this object.

Parameters
xPoint
Returns
True If point lies inside

Reimplemented from geom::GeomObject.

Definition at line 1236 of file geomObjects.cpp.

1236 {
1238 }
bool isPointInsideCuboid(util::Point x, util::Point x_lbb, util::Point x_rtf)
Checks if point is inside a cuboid.

References d_vertices, and geom::isPointInsideCuboid().

Referenced by doesIntersect(), isInside(), isOutside(), and isOutside().

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

◆ isNear() [1/2]

bool geom::Cuboid::isNear ( const std::pair< util::Point, util::Point > &  box,
const double &  tol 
) const
overridevirtual

Checks if box is within given distance of this object.

Parameters
boxBox
tolTolerance used in checking the nearness
Returns
True True if box is inside within the tol distance

Reimplemented from geom::GeomObject.

Definition at line 1299 of file geomObjects.cpp.

1301 {
1302
1303 return geom::areBoxesNear(box(), bbox, tol, 3);
1304 }
bool areBoxesNear(const std::pair< util::Point, util::Point > &b1, const std::pair< util::Point, util::Point > &b2, const double &tol, size_t dim)
Checks if given two boxes are within given distance from each other.

References geom::areBoxesNear(), and box().

Here is the call graph for this function:

◆ isNear() [2/2]

bool geom::Cuboid::isNear ( const util::Point x,
const double &  tol 
) const
overridevirtual

Checks if point is within given distance of this object.

Parameters
xPoint
tolTolerance used in checking the nearness
Returns
True True if within the tol distance

Reimplemented from geom::GeomObject.

Definition at line 1244 of file geomObjects.cpp.

1245 {
1246
1247 // get a bigger box containing this object
1248 auto bbox = box(tol);
1249
1250 return geom::isPointInsideBox(x, 3, bbox);
1251 }
bool isPointInsideBox(util::Point x, size_t dim, const std::pair< util::Point, util::Point > &box)
Returns true if point is inside box.

References box(), and geom::isPointInsideBox().

Referenced by isNearBoundary().

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

◆ isNearBoundary()

bool geom::Cuboid::isNearBoundary ( const util::Point x,
const double &  tol,
const bool &  within 
) const
overridevirtual

cons

cons

Reimplemented from geom::GeomObject.

Definition at line 1253 of file geomObjects.cpp.

1255 {
1256
1257 // check if particle is within the tolerance distance
1258 if (!isNear(x, within ? 0. : tol))
1259 return false;
1260
1261 bool near_x_edge = util::isLess(std::abs(x.d_x - d_vertices[0].d_x), tol) or
1262 util::isLess(std::abs(x.d_x - d_vertices[6].d_x), tol);
1263
1264 bool near_y_edge = util::isLess(std::abs(x.d_y - d_vertices[0].d_y), tol) or
1265 util::isLess(std::abs(x.d_y - d_vertices[6].d_y), tol);
1266
1267 bool near_z_edge = util::isLess(std::abs(x.d_z - d_vertices[0].d_z), tol) or
1268 util::isLess(std::abs(x.d_z - d_vertices[6].d_z), tol);
1269
1270 return near_x_edge || near_y_edge || near_z_edge;
1271 }
bool isNear(const util::Point &x, const double &tol) const override
Checks if point is within given distance of this object.

References d_vertices, util::Point::d_x, util::Point::d_y, util::Point::d_z, util::isLess(), and isNear().

Referenced by doesIntersect().

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

◆ isOutside() [1/2]

bool geom::Cuboid::isOutside ( const std::pair< util::Point, util::Point > &  box) const
overridevirtual

Checks if box is outside of the object.

Parameters
boxBox
Returns
True True if box lies outside

Reimplemented from geom::GeomObject.

Definition at line 1288 of file geomObjects.cpp.

1289 {
1290
1291 bool intersect = false;
1292 for (auto p: geom::getCornerPoints(3, box))
1293 if (!intersect)
1294 intersect = this->isInside(p);
1295
1296 return !intersect;
1297 }

References box(), geom::getCornerPoints(), and isInside().

Here is the call graph for this function:

◆ isOutside() [2/2]

bool geom::Cuboid::isOutside ( const util::Point x) const
overridevirtual

Checks if point is outside of this object.

Parameters
xPoint
Returns
True If point lies outside

Reimplemented from geom::GeomObject.

Definition at line 1240 of file geomObjects.cpp.

1240 {
1241 return !isInside(x);
1242 }

References isInside().

Here is the call graph for this function:

◆ operator=()

Cuboid & geom::Cuboid::operator= ( const Cuboid other)
inline

Assignment operator.

Parameters
otherObject to copy from
Returns
Reference to this object

Definition at line 2403 of file geomObjects.h.

2403 {
2404 if (this != &other) {
2405 // Copy base class members
2406 d_tags = other.d_tags;
2407
2408 // Copy member variables
2409 d_Lx = other.d_Lx;
2410 d_Ly = other.d_Ly;
2411 d_Lz = other.d_Lz;
2412 d_r = other.d_r;
2413 d_x = other.d_x;
2414 d_vertices = other.d_vertices;
2415 }
2416 return *this;
2417 }

References d_Lx, d_Ly, d_Lz, d_r, geom::GeomObject::d_tags, d_vertices, and d_x.

◆ print() [1/2]

void geom::Cuboid::print ( ) const
inlineoverridevirtual

Prints the information about the object.

Reimplemented from geom::GeomObject.

Definition at line 2551 of file geomObjects.h.

2551{ 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 geom::Cuboid::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 geom::GeomObject.

Definition at line 2544 of file geomObjects.h.

2544 {
2545 std::cout << printStr(nt, lvl);
2546 };
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()

std::string geom::Cuboid::printStr ( int  nt,
int  lvl 
) const
overridevirtual

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 geom::GeomObject.

Definition at line 1317 of file geomObjects.cpp.

1317 {
1318
1319 auto tabS = util::io::getTabS(nt);
1320
1321 std::ostringstream oss;
1322
1323 oss << tabS << "------- Cuboid --------" << std::endl << std::endl;
1324 oss << tabS << "Name = " << d_name << std::endl;
1325 oss << tabS << "Lengths (Lx, Ly, Lz) = "
1326 << util::io::printStr(std::vector<double>{d_Lx, d_Ly, d_Lz}, 0)
1327 << std::endl;
1328 oss << tabS << "Bounding sphere radius = " << d_r << std::endl;
1329 oss << tabS << "Center = " << d_x.printStr(0, 0) << std::endl;
1330 oss << tabS << "Vertices = " << util::io::printStr(d_vertices, 0) << std::endl;
1331 oss << std::endl;
1332
1333 if (lvl > 0)
1334 oss << tabS << "Bounding box: "
1335 << util::io::printBoxStr(box(0.), nt + 1);
1336
1337 if (lvl == 0)
1338 oss << std::endl;
1339
1340 return oss.str();
1341 }
const std::string d_name
name of object
std::string printBoxStr(const std::pair< util::Point, util::Point > &box, int nt=print_default_tab)
Returns formatted string for output.
Definition io.h:188
std::string getTabS(int nt)
Returns tab spaces of a given size.
Definition io.h:39
std::string printStr(const T &msg, int nt=print_default_tab)
Returns formatted string for output.
Definition io.h:53
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition point.h:94

References box(), d_Lx, d_Ly, d_Lz, geom::GeomObject::d_name, d_r, d_vertices, d_x, util::io::getTabS(), util::io::printBoxStr(), util::io::printStr(), and util::Point::printStr().

Referenced by print().

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

◆ transform()

void geom::Cuboid::transform ( const util::Point translation,
const double &  scale,
const double &  angle,
const util::Point axis,
const util::Point rotationPoint 
)
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.

Parameters
translationRigid translation vector \(\mathbf t\) (added after rotate+scale about \(\mathbf p\))
scaleUniform scale factor
angleRotation angle (radians)
axisAxis of rotation
rotationPointIf non-null, use as \(\mathbf p\); if null, use old d_x as pivot.

Reimplemented from geom::GeomObject.

Definition at line 2419 of file geomObjects.h.

2420 {
2421 // Scale the dimensions
2422 d_Lx *= scale;
2423 d_Ly *= scale;
2424 d_Lz *= scale;
2425 d_r *= scale;
2426
2427 const util::Point c0 = d_x;
2428 for (auto &v : d_vertices) {
2429 v = mapSimilarity(v, c0, translation, scale, angle, axis, rotationPoint);
2430 }
2431 d_x = mapSimilarity(c0, c0, translation, scale, angle, axis, rotationPoint);
2432 }
util::Point mapSimilarity(const util::Point &x, const util::Point &pivotDefault, const util::Point &t, double scale, double angle, const util::Point &axis, const util::Point *rotationPoint)
Definition geomObjects.h:55

References d_Lx, d_Ly, d_Lz, d_r, d_vertices, d_x, and geom::mapSimilarity().

Here is the call graph for this function:

◆ volume()

double geom::Cuboid::volume ( ) const
overridevirtual

Computes the volume (area in 2d, length in 1d) of object.

Returns
Volume Volume of object

Reimplemented from geom::GeomObject.

Definition at line 1204 of file geomObjects.cpp.

1204 {
1205 return d_Lx * d_Ly * d_Lz;
1206 }

References d_Lx, d_Ly, and d_Lz.

Field Documentation

◆ d_Lx

double geom::Cuboid::d_Lx

Edge length of cuboid in x-direction.

Definition at line 2270 of file geomObjects.h.

Referenced by Cuboid(), Cuboid(), inscribedRadius(), operator=(), printStr(), transform(), and volume().

◆ d_Ly

double geom::Cuboid::d_Ly

Edge length of cuboid in y-direction.

Definition at line 2273 of file geomObjects.h.

Referenced by Cuboid(), Cuboid(), inscribedRadius(), operator=(), printStr(), transform(), and volume().

◆ d_Lz

double geom::Cuboid::d_Lz

Edge length of cuboid in z-direction.

Definition at line 2276 of file geomObjects.h.

Referenced by Cuboid(), Cuboid(), inscribedRadius(), operator=(), printStr(), transform(), and volume().

◆ d_r

double geom::Cuboid::d_r

Radius of bounding circle.

Definition at line 2279 of file geomObjects.h.

Referenced by boundingRadius(), operator=(), printStr(), and transform().

◆ d_vertices

◆ d_x

util::Point geom::Cuboid::d_x

Center.

Definition at line 2267 of file geomObjects.h.

Referenced by box(), center(), Cuboid(), Cuboid(), operator=(), printStr(), and transform().


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