MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Geometry Namespace Reference

Contain auxiliary functions related with geometric operations. More...

Functions

bool getInsidePolygon (const vector< Vector3d > &polygon, const Vector3d &point, string extrude_direction)
 Verify in a point is inside of a polygon.
 
void getBoundingBox (const vector< Vector3d > &points, vector< Vector3d > &box)
 Calculate the bounding box of a group of points.
 
bool getInsideBox (Vector3d p1, Vector3d p2, Vector3d position)
 Verify if a point is inside a box.
 

Detailed Description

Contain auxiliary functions related with geometric operations.

Function Documentation

◆ getBoundingBox()

void Geometry::getBoundingBox ( const vector< Vector3d > &  points,
vector< Vector3d > &  box 
)

Calculate the bounding box of a group of points.

Parameters
[in]pointsA group of points
[out]boxThe bounding box formed by two points, the left-lower point and the right-upper point

◆ getInsideBox()

bool Geometry::getInsideBox ( Vector3d  p1,
Vector3d  p2,
Vector3d  position 
)

Verify if a point is inside a box.

Parameters
[in]p1Left and lower point of the box
[in]p2Right and upper point of the box
[in]positionPoint to be evaluated the function
Returns
True if the point is inside the box, false otherwise

◆ getInsidePolygon()

bool Geometry::getInsidePolygon ( const vector< Vector3d > &  polygon,
const Vector3d &  point,
string  extrude_direction 
)

Verify in a point is inside of a polygon.

Parameters
[in]polygonA list of points forming the polygon
[in]pointA point to verify if is inside the polygon
[in]extrude_directionThe normal vector of the plane where the polygon is defined
Returns
True is the point is inside the polygon