libigl v2.5.0
Loading...
Searching...
No Matches
ray_sphere_intersect.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) 2013 Alec Jacobson <alecjacobson@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#ifndef IGL_RAY_SPHERE_INTERSECT_H
9#define IGL_RAY_SPHERE_INTERSECT_H
10#include "igl_inline.h"
11#include <Eigen/Core>
12namespace igl
13{
25 template <
26 typename Derivedo,
27 typename Derivedd,
28 typename Derivedc,
29 typename r_type,
30 typename t_type>
32 const Eigen::PlainObjectBase<Derivedo> & o,
33 const Eigen::PlainObjectBase<Derivedd> & d,
34 const Eigen::PlainObjectBase<Derivedc> & c,
35 r_type r,
36 t_type & t0,
37 t_type & t1);
38}
39#ifndef IGL_STATIC_LIBRARY
40#include "ray_sphere_intersect.cpp"
41#endif
42#endif
43
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
int ray_sphere_intersect(const Eigen::PlainObjectBase< Derivedo > &o, const Eigen::PlainObjectBase< Derivedd > &d, const Eigen::PlainObjectBase< Derivedc > &c, r_type r, t_type &t0, t_type &t1)
Compute the intersection between a ray from O in direction D and a sphere centered at C with radius r...