MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Geometry.h
Go to the documentation of this file.
1/*
2 * Geometry.h
3 *
4 * Created on: 20 de jul de 2021
5 * Author: Fabricio Fernandez <fabricio.hmf@gmail.com>
6 */
7
8#ifndef GEOMETRY_H_
9#define GEOMETRY_H_
10
11#include "Eigen/Core"
12using Eigen::Vector3d;
13
14#include<vector>
15using std::vector;
16
17#include <string>
18using std::string;
19
22namespace Geometry {
23
29 bool getInsidePolygon(const vector<Vector3d>& polygon, const Vector3d& point, string extrude_direction);
30
34 void getBoundingBox(const vector<Vector3d>& points, vector<Vector3d>& box);
35
41 bool getInsideBox(Vector3d p1, Vector3d p2, Vector3d position);
42}
43
44#endif /* GEOMETRY_H_ */
Contain auxiliary functions related with geometric operations.
bool getInsideBox(Vector3d p1, Vector3d p2, Vector3d position)
Verify if a point is inside a box.
void getBoundingBox(const vector< Vector3d > &points, vector< Vector3d > &box)
Calculate the bounding box of a group of points.
bool getInsidePolygon(const vector< Vector3d > &polygon, const Vector3d &point, string extrude_direction)
Verify in a point is inside of a polygon.