preCICE v3.1.2
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
geometry.cpp File Reference
#include "geometry.hpp"
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include "logging/Logger.hpp"
#include "math/math.hpp"
#include "utils/Helpers.hpp"
#include "utils/assertion.hpp"
Include dependency graph for geometry.cpp:

Go to the source code of this file.

Namespaces

namespace  precice
 Main namespace of the precice library.
 
namespace  precice::math
 provides general mathematical constants and functions.
 
namespace  precice::math::geometry
 Provides computational geometry operations.
 

Functions

bool precice::math::geometry::lineIntersection (const Eigen::Ref< const Eigen::Vector2d > &a, const Eigen::Ref< const Eigen::Vector2d > &b, const Eigen::Ref< const Eigen::Vector2d > &c, const Eigen::Ref< const Eigen::Vector2d > &d, Eigen::Ref< Eigen::Vector2d > &intersectionPoint)
 Determines the intersection point of two lines, if one exists.
 
ResultConstants precice::math::geometry::segmentPlaneIntersection (const Eigen::Vector3d &pointOnPlane, const Eigen::Vector3d &planeNormal, const Eigen::Vector3d &firstPointSegment, const Eigen::Vector3d &secondPointSegment, Eigen::Vector3d &intersectionPoint)
 Determines the intersection point of a segment with a plane in 3D.
 
double precice::math::geometry::triangleArea (const Eigen::VectorXd &a, const Eigen::VectorXd &b, const Eigen::VectorXd &c)
 Computes the signed area of a triangle in 2D.
 
double precice::math::geometry::tetraVolume (const Eigen::Vector3d &a, const Eigen::Vector3d &b, const Eigen::Vector3d &c, const Eigen::Vector3d &d)
 Computes the (unsigned) area of a triangle in 3D.
 
Eigen::Vector2d precice::math::geometry::projectVector (const Eigen::Vector3d &vector, const int indexDimensionToRemove)
 Projects a 3D vector to a 2D one by removing one dimension.
 
ConvexityResult precice::math::geometry::isConvexQuad (std::array< Eigen::VectorXd, 4 > coords)
 

Variables

logging::Logger precice::math::geometry::_log ("math::geometry")