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// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef GEOMETRY_H_
5#define GEOMETRY_H_
6
7#include "Eigen/Core"
8using Eigen::Vector3d;
9
10#include<vector>
11using std::vector;
12
13#include <string>
14using std::string;
15
18namespace Geometry {
19
25 bool getInsidePolygon(const vector<Vector3d>& polygon, const Vector3d& point, string extrude_direction);
26
30 void getBoundingBox(const vector<Vector3d>& points, vector<Vector3d>& box);
31
37 bool getInsideBox(Vector3d p1, Vector3d p2, Vector3d position);
38}
39
40#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.