libigl v2.5.0
Loading...
Searching...
No Matches
predicates.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2019 Qingnan Zhou <qnzhou@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#pragma once
9#ifndef IGL_PREDICATES_PREDICATES_H
10#define IGL_PREDICATES_PREDICATES_H
11
12#include "../igl_inline.h"
13#include <Eigen/Core>
14
15namespace igl {
16 namespace predicates {
20 enum class Orientation {
21 POSITIVE=1, INSIDE=1,
22 NEGATIVE=-1, OUTSIDE=-1,
24 };
25
32
43 template<typename Vector2D>
45 const Eigen::MatrixBase<Vector2D>& pa,
46 const Eigen::MatrixBase<Vector2D>& pb,
47 const Eigen::MatrixBase<Vector2D>& pc);
59 template<typename Vector3D>
61 const Eigen::MatrixBase<Vector3D>& pa,
62 const Eigen::MatrixBase<Vector3D>& pb,
63 const Eigen::MatrixBase<Vector3D>& pc,
64 const Eigen::MatrixBase<Vector3D>& pd);
76 template<typename Vector2D>
78 const Eigen::MatrixBase<Vector2D>& pa,
79 const Eigen::MatrixBase<Vector2D>& pb,
80 const Eigen::MatrixBase<Vector2D>& pc,
81 const Eigen::MatrixBase<Vector2D>& pd);
94 template<typename Vector3D>
96 const Eigen::MatrixBase<Vector3D>& pa,
97 const Eigen::MatrixBase<Vector3D>& pb,
98 const Eigen::MatrixBase<Vector3D>& pc,
99 const Eigen::MatrixBase<Vector3D>& pd,
100 const Eigen::MatrixBase<Vector3D>& pe);
101 }
102}
103
104#ifndef IGL_STATIC_LIBRARY
105# include "predicates.cpp"
106#endif
107
108#endif
#define IGL_INLINE
Definition igl_inline.h:15
Orientation orient3d(const Eigen::MatrixBase< Vector3D > &pa, const Eigen::MatrixBase< Vector3D > &pb, const Eigen::MatrixBase< Vector3D > &pc, const Eigen::MatrixBase< Vector3D > &pd)
Compute the orientation of the tetrahedron formed by pa, pb, pc, pd.
Orientation incircle(const Eigen::MatrixBase< Vector2D > &pa, const Eigen::MatrixBase< Vector2D > &pb, const Eigen::MatrixBase< Vector2D > &pc, const Eigen::MatrixBase< Vector2D > &pd)
Decide whether a point is inside/outside/on a circle.
void exactinit()
Initialize internal variable used by predciates.
Orientation insphere(const Eigen::MatrixBase< Vector3D > &pa, const Eigen::MatrixBase< Vector3D > &pb, const Eigen::MatrixBase< Vector3D > &pc, const Eigen::MatrixBase< Vector3D > &pd, const Eigen::MatrixBase< Vector3D > &pe)
Decide whether a point is inside/outside/on a sphere.
Orientation
Types of orientations and other predicate results.
Definition predicates.h:20
Orientation orient2d(const Eigen::MatrixBase< Vector2D > &pa, const Eigen::MatrixBase< Vector2D > &pb, const Eigen::MatrixBase< Vector2D > &pc)
Compute the orientation of the triangle formed by pa, pb, pc.
Definition AABB.h:17