// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2019 Qingnan Zhou // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #pragma once #ifndef IGL_PREDICATES_ORIENT3D_H #define IGL_PREDICATES_ORIENT3D_H #include "../igl_inline.h" #include #include "Orientation.h" namespace igl { namespace predicates { /// Compute the orientation of the tetrahedron formed by pa, pb, pc, pd. /// /// @param[in] pa 3D point on plane /// @param[in] pb 3D point on plane /// @param[in] pc 3D point on plane /// @param[in] pd 3D query point /// @return POSITIVE if pd is "below" the oriented plane formed by pa, pb and pc. /// NEGATIVE if pd is "above" the plane. /// COPLANAR if pd is on the plane. /// /// \fileinfo template IGL_INLINE Orientation orient3d( const Eigen::MatrixBase& pa, const Eigen::MatrixBase& pb, const Eigen::MatrixBase& pc, const Eigen::MatrixBase& pd); /// Compute the orientation of the tetrahedron formed by each 4-tuple of /// points /// /// @param[in] A #P|1 by 3 matrix of 3D points /// @param[in] B #P|1 by 3 matrix of 3D points /// @param[in] C #P|1 by 3 matrix of 3D points /// @param[in] D #P|1 by 3 matrix of 3D points /// @param[out] R #P vector of orientations /// template IGL_INLINE void orient3d( const Eigen::MatrixBase& A, const Eigen::MatrixBase& B, const Eigen::MatrixBase& C, const Eigen::MatrixBase& D, Eigen::PlainObjectBase& R); } } #ifndef IGL_STATIC_LIBRARY #include "orient3d.cpp" #endif #endif