|
@@ -13,8 +13,8 @@
|
|
|
// * For Embree2.2
|
|
|
// * Uncomment #define __USE_RAY_MASK__ in platform.h to enable masking
|
|
|
|
|
|
-#ifndef IGL_EMBREE_INTERSECTOR_H
|
|
|
-#define IGL_EMBREE_INTERSECTOR_H
|
|
|
+#ifndef IGL_EMBREE_EMBREE_INTERSECTOR_H
|
|
|
+#define IGL_EMBREE_EMBREE_INTERSECTOR_H
|
|
|
|
|
|
#include "Hit.h"
|
|
|
#include <Eigen/Geometry>
|
|
@@ -28,156 +28,158 @@
|
|
|
|
|
|
namespace igl
|
|
|
{
|
|
|
- class EmbreeIntersector
|
|
|
+ namespace embree
|
|
|
{
|
|
|
- public:
|
|
|
- // Initialize embree engine. This will be called on instance `init()`
|
|
|
- // calls. If already inited then this function does nothing: it is harmless
|
|
|
- // to call more than once.
|
|
|
- static inline void global_init();
|
|
|
- private:
|
|
|
- // Deinitialize the embree engine.
|
|
|
- static inline void global_deinit();
|
|
|
- public:
|
|
|
- typedef Eigen::Matrix<float,Eigen::Dynamic,3> PointMatrixType;
|
|
|
- typedef Eigen::Matrix<int,Eigen::Dynamic,3> FaceMatrixType;
|
|
|
- public:
|
|
|
- inline EmbreeIntersector();
|
|
|
- private:
|
|
|
- // Copying and assignment are not allowed.
|
|
|
- inline EmbreeIntersector(const EmbreeIntersector & that);
|
|
|
- inline EmbreeIntersector & operator=(const EmbreeIntersector &);
|
|
|
- public:
|
|
|
- virtual inline ~EmbreeIntersector();
|
|
|
-
|
|
|
- // Initialize with a given mesh.
|
|
|
- //
|
|
|
- // Inputs:
|
|
|
- // V #V by 3 list of vertex positions
|
|
|
- // F #F by 3 list of Oriented triangles
|
|
|
- // Side effects:
|
|
|
- // The first time this is ever called the embree engine is initialized.
|
|
|
- inline void init(
|
|
|
- const PointMatrixType& V,
|
|
|
- const FaceMatrixType& F);
|
|
|
-
|
|
|
- // Initialize with a given mesh.
|
|
|
- //
|
|
|
- // Inputs:
|
|
|
- // V vector of #V by 3 list of vertex positions for each geometry
|
|
|
- // F vector of #F by 3 list of Oriented triangles for each geometry
|
|
|
- // masks a 32 bit mask to identify active geometries.
|
|
|
- // Side effects:
|
|
|
- // The first time this is ever called the embree engine is initialized.
|
|
|
- inline void init(
|
|
|
- const std::vector<const PointMatrixType*>& V,
|
|
|
- const std::vector<const FaceMatrixType*>& F,
|
|
|
- const std::vector<int>& masks);
|
|
|
-
|
|
|
- // Deinitialize embree datasctructures for current mesh. Also called on
|
|
|
- // destruction: no need to call if you just want to init() once and
|
|
|
- // destroy.
|
|
|
- inline void deinit();
|
|
|
+ class EmbreeIntersector
|
|
|
+ {
|
|
|
+ public:
|
|
|
+ // Initialize embree engine. This will be called on instance `init()`
|
|
|
+ // calls. If already inited then this function does nothing: it is harmless
|
|
|
+ // to call more than once.
|
|
|
+ static inline void global_init();
|
|
|
+ private:
|
|
|
+ // Deinitialize the embree engine.
|
|
|
+ static inline void global_deinit();
|
|
|
+ public:
|
|
|
+ typedef Eigen::Matrix<float,Eigen::Dynamic,3> PointMatrixType;
|
|
|
+ typedef Eigen::Matrix<int,Eigen::Dynamic,3> FaceMatrixType;
|
|
|
+ public:
|
|
|
+ inline EmbreeIntersector();
|
|
|
+ private:
|
|
|
+ // Copying and assignment are not allowed.
|
|
|
+ inline EmbreeIntersector(const EmbreeIntersector & that);
|
|
|
+ inline EmbreeIntersector & operator=(const EmbreeIntersector &);
|
|
|
+ public:
|
|
|
+ virtual inline ~EmbreeIntersector();
|
|
|
+
|
|
|
+ // Initialize with a given mesh.
|
|
|
+ //
|
|
|
+ // Inputs:
|
|
|
+ // V #V by 3 list of vertex positions
|
|
|
+ // F #F by 3 list of Oriented triangles
|
|
|
+ // Side effects:
|
|
|
+ // The first time this is ever called the embree engine is initialized.
|
|
|
+ inline void init(
|
|
|
+ const PointMatrixType& V,
|
|
|
+ const FaceMatrixType& F);
|
|
|
|
|
|
- // Given a ray find the first hit
|
|
|
- //
|
|
|
- // Inputs:
|
|
|
- // origin 3d origin point of ray
|
|
|
- // direction 3d (not necessarily normalized) direction vector of ray
|
|
|
- // tnear start of ray segment
|
|
|
- // tfar end of ray segment
|
|
|
- // masks a 32 bit mask to identify active geometries.
|
|
|
- // Output:
|
|
|
- // hit information about hit
|
|
|
- // Returns true if and only if there was a hit
|
|
|
- inline bool intersectRay(
|
|
|
- const Eigen::RowVector3f& origin,
|
|
|
- const Eigen::RowVector3f& direction,
|
|
|
- Hit& hit,
|
|
|
- float tnear = 0,
|
|
|
- float tfar = std::numeric_limits<float>::infinity(),
|
|
|
- int mask = 0xFFFFFFFF) const;
|
|
|
-
|
|
|
- // Given a ray find the first hit
|
|
|
- // This is a conservative hit test where multiple rays within a small radius
|
|
|
- // will be tested and only the closesest hit is returned.
|
|
|
- //
|
|
|
- // Inputs:
|
|
|
- // origin 3d origin point of ray
|
|
|
- // direction 3d (not necessarily normalized) direction vector of ray
|
|
|
- // tnear start of ray segment
|
|
|
- // tfar end of ray segment
|
|
|
- // masks a 32 bit mask to identify active geometries.
|
|
|
- // geoId id of geometry mask (default -1 if no: no masking)
|
|
|
- // closestHit true for gets closest hit, false for furthest hit
|
|
|
- // Output:
|
|
|
- // hit information about hit
|
|
|
- // Returns true if and only if there was a hit
|
|
|
- inline bool intersectBeam(
|
|
|
- const Eigen::RowVector3f& origin,
|
|
|
- const Eigen::RowVector3f& direction,
|
|
|
- Hit& hit,
|
|
|
- float tnear = 0,
|
|
|
- float tfar = std::numeric_limits<float>::infinity(),
|
|
|
- int mask = 0xFFFFFFFF,
|
|
|
- int geoId = -1,
|
|
|
- bool closestHit = true,
|
|
|
- unsigned int samples = 4) const;
|
|
|
-
|
|
|
- // Given a ray find all hits in order
|
|
|
- //
|
|
|
- // Inputs:
|
|
|
- // origin 3d origin point of ray
|
|
|
- // direction 3d (not necessarily normalized) direction vector of ray
|
|
|
- // tnear start of ray segment
|
|
|
- // tfar end of ray segment
|
|
|
- // masks a 32 bit mask to identify active geometries.
|
|
|
- // Output:
|
|
|
- // hit information about hit
|
|
|
- // num_rays number of rays shot (at least one)
|
|
|
- // Returns true if and only if there was a hit
|
|
|
- inline bool intersectRay(
|
|
|
- const Eigen::RowVector3f& origin,
|
|
|
- const Eigen::RowVector3f& direction,
|
|
|
- std::vector<Hit > &hits,
|
|
|
- int& num_rays,
|
|
|
- float tnear = 0,
|
|
|
- float tfar = std::numeric_limits<float>::infinity(),
|
|
|
- int mask = 0xFFFFFFFF) const;
|
|
|
-
|
|
|
- // Given a ray find the first hit
|
|
|
- //
|
|
|
- // Inputs:
|
|
|
- // a 3d first end point of segment
|
|
|
- // ab 3d vector from a to other endpoint b
|
|
|
- // Output:
|
|
|
- // hit information about hit
|
|
|
- // Returns true if and only if there was a hit
|
|
|
- inline bool intersectSegment(
|
|
|
- const Eigen::RowVector3f& a,
|
|
|
- const Eigen::RowVector3f& ab,
|
|
|
- Hit &hit,
|
|
|
- int mask = 0xFFFFFFFF) const;
|
|
|
+ // Initialize with a given mesh.
|
|
|
+ //
|
|
|
+ // Inputs:
|
|
|
+ // V vector of #V by 3 list of vertex positions for each geometry
|
|
|
+ // F vector of #F by 3 list of Oriented triangles for each geometry
|
|
|
+ // masks a 32 bit mask to identify active geometries.
|
|
|
+ // Side effects:
|
|
|
+ // The first time this is ever called the embree engine is initialized.
|
|
|
+ inline void init(
|
|
|
+ const std::vector<const PointMatrixType*>& V,
|
|
|
+ const std::vector<const FaceMatrixType*>& F,
|
|
|
+ const std::vector<int>& masks);
|
|
|
+
|
|
|
+ // Deinitialize embree datasctructures for current mesh. Also called on
|
|
|
+ // destruction: no need to call if you just want to init() once and
|
|
|
+ // destroy.
|
|
|
+ inline void deinit();
|
|
|
|
|
|
- private:
|
|
|
-
|
|
|
- struct Vertex {float x,y,z,a;};
|
|
|
- struct Triangle {int v0, v1, v2;};
|
|
|
-
|
|
|
- RTCScene scene;
|
|
|
- unsigned geomID;
|
|
|
- Vertex* vertices;
|
|
|
- Triangle* triangles;
|
|
|
- bool initialized;
|
|
|
-
|
|
|
- inline void createRay(
|
|
|
- RTCRay& ray,
|
|
|
- const Eigen::RowVector3f& origin,
|
|
|
- const Eigen::RowVector3f& direction,
|
|
|
- float tnear,
|
|
|
- float tfar,
|
|
|
- int mask) const;
|
|
|
- };
|
|
|
+ // Given a ray find the first hit
|
|
|
+ //
|
|
|
+ // Inputs:
|
|
|
+ // origin 3d origin point of ray
|
|
|
+ // direction 3d (not necessarily normalized) direction vector of ray
|
|
|
+ // tnear start of ray segment
|
|
|
+ // tfar end of ray segment
|
|
|
+ // masks a 32 bit mask to identify active geometries.
|
|
|
+ // Output:
|
|
|
+ // hit information about hit
|
|
|
+ // Returns true if and only if there was a hit
|
|
|
+ inline bool intersectRay(
|
|
|
+ const Eigen::RowVector3f& origin,
|
|
|
+ const Eigen::RowVector3f& direction,
|
|
|
+ Hit& hit,
|
|
|
+ float tnear = 0,
|
|
|
+ float tfar = std::numeric_limits<float>::infinity(),
|
|
|
+ int mask = 0xFFFFFFFF) const;
|
|
|
+
|
|
|
+ // Given a ray find the first hit
|
|
|
+ // This is a conservative hit test where multiple rays within a small radius
|
|
|
+ // will be tested and only the closesest hit is returned.
|
|
|
+ //
|
|
|
+ // Inputs:
|
|
|
+ // origin 3d origin point of ray
|
|
|
+ // direction 3d (not necessarily normalized) direction vector of ray
|
|
|
+ // tnear start of ray segment
|
|
|
+ // tfar end of ray segment
|
|
|
+ // masks a 32 bit mask to identify active geometries.
|
|
|
+ // geoId id of geometry mask (default -1 if no: no masking)
|
|
|
+ // closestHit true for gets closest hit, false for furthest hit
|
|
|
+ // Output:
|
|
|
+ // hit information about hit
|
|
|
+ // Returns true if and only if there was a hit
|
|
|
+ inline bool intersectBeam(
|
|
|
+ const Eigen::RowVector3f& origin,
|
|
|
+ const Eigen::RowVector3f& direction,
|
|
|
+ Hit& hit,
|
|
|
+ float tnear = 0,
|
|
|
+ float tfar = -1,
|
|
|
+ int mask = 0xFFFFFFFF,
|
|
|
+ int geoId = -1,
|
|
|
+ bool closestHit = true) const;
|
|
|
+
|
|
|
+ // Given a ray find all hits in order
|
|
|
+ //
|
|
|
+ // Inputs:
|
|
|
+ // origin 3d origin point of ray
|
|
|
+ // direction 3d (not necessarily normalized) direction vector of ray
|
|
|
+ // tnear start of ray segment
|
|
|
+ // tfar end of ray segment
|
|
|
+ // masks a 32 bit mask to identify active geometries.
|
|
|
+ // Output:
|
|
|
+ // hit information about hit
|
|
|
+ // num_rays number of rays shot (at least one)
|
|
|
+ // Returns true if and only if there was a hit
|
|
|
+ inline bool intersectRay(
|
|
|
+ const Eigen::RowVector3f& origin,
|
|
|
+ const Eigen::RowVector3f& direction,
|
|
|
+ std::vector<Hit > &hits,
|
|
|
+ int& num_rays,
|
|
|
+ float tnear = 0,
|
|
|
+ float tfar = std::numeric_limits<float>::infinity(),
|
|
|
+ int mask = 0xFFFFFFFF) const;
|
|
|
+
|
|
|
+ // Given a ray find the first hit
|
|
|
+ //
|
|
|
+ // Inputs:
|
|
|
+ // a 3d first end point of segment
|
|
|
+ // ab 3d vector from a to other endpoint b
|
|
|
+ // Output:
|
|
|
+ // hit information about hit
|
|
|
+ // Returns true if and only if there was a hit
|
|
|
+ inline bool intersectSegment(
|
|
|
+ const Eigen::RowVector3f& a,
|
|
|
+ const Eigen::RowVector3f& ab,
|
|
|
+ Hit &hit,
|
|
|
+ int mask = 0xFFFFFFFF) const;
|
|
|
+
|
|
|
+ private:
|
|
|
+
|
|
|
+ struct Vertex {float x,y,z,a;};
|
|
|
+ struct Triangle {int v0, v1, v2;};
|
|
|
+
|
|
|
+ RTCScene scene;
|
|
|
+ unsigned geomID;
|
|
|
+ Vertex* vertices;
|
|
|
+ Triangle* triangles;
|
|
|
+ bool initialized;
|
|
|
+
|
|
|
+ inline void createRay(
|
|
|
+ RTCRay& ray,
|
|
|
+ const Eigen::RowVector3f& origin,
|
|
|
+ const Eigen::RowVector3f& direction,
|
|
|
+ float tnear,
|
|
|
+ float tfar,
|
|
|
+ int mask) const;
|
|
|
+ };
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Implementation
|
|
@@ -188,12 +190,15 @@ namespace igl
|
|
|
// initialized...
|
|
|
namespace igl
|
|
|
{
|
|
|
- // Keeps track of whether the **Global** Embree intersector has been
|
|
|
- // initialized. This should never been done at the global scope.
|
|
|
- static bool EmbreeIntersector_inited = false;
|
|
|
+ namespace embree
|
|
|
+ {
|
|
|
+ // Keeps track of whether the **Global** Embree intersector has been
|
|
|
+ // initialized. This should never been done at the global scope.
|
|
|
+ static bool EmbreeIntersector_inited = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-inline void igl::EmbreeIntersector::global_init()
|
|
|
+inline void igl::embree::EmbreeIntersector::global_init()
|
|
|
{
|
|
|
if(!EmbreeIntersector_inited)
|
|
|
{
|
|
@@ -208,13 +213,13 @@ inline void igl::EmbreeIntersector::global_init()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-inline void igl::EmbreeIntersector::global_deinit()
|
|
|
+inline void igl::embree::EmbreeIntersector::global_deinit()
|
|
|
{
|
|
|
EmbreeIntersector_inited = false;
|
|
|
rtcExit();
|
|
|
}
|
|
|
|
|
|
-inline igl::EmbreeIntersector::EmbreeIntersector()
|
|
|
+inline igl::embree::EmbreeIntersector::EmbreeIntersector()
|
|
|
:
|
|
|
//scene(NULL),
|
|
|
geomID(0),
|
|
@@ -224,7 +229,7 @@ inline igl::EmbreeIntersector::EmbreeIntersector()
|
|
|
{
|
|
|
}
|
|
|
|
|
|
-inline igl::EmbreeIntersector::EmbreeIntersector(
|
|
|
+inline igl::embree::EmbreeIntersector::EmbreeIntersector(
|
|
|
const EmbreeIntersector &)
|
|
|
:// To make -Weffc++ happy
|
|
|
//scene(NULL),
|
|
@@ -236,7 +241,7 @@ inline igl::EmbreeIntersector::EmbreeIntersector(
|
|
|
assert(false && "Embree: Copying EmbreeIntersector is not allowed");
|
|
|
}
|
|
|
|
|
|
-inline igl::EmbreeIntersector & igl::EmbreeIntersector::operator=(
|
|
|
+inline igl::embree::EmbreeIntersector & igl::embree::EmbreeIntersector::operator=(
|
|
|
const EmbreeIntersector &)
|
|
|
{
|
|
|
assert(false && "Embree: Assigning an EmbreeIntersector is not allowed");
|
|
@@ -244,7 +249,7 @@ inline igl::EmbreeIntersector & igl::EmbreeIntersector::operator=(
|
|
|
}
|
|
|
|
|
|
|
|
|
-inline void igl::EmbreeIntersector::init(
|
|
|
+inline void igl::embree::EmbreeIntersector::init(
|
|
|
const PointMatrixType& V,
|
|
|
const FaceMatrixType& F)
|
|
|
{
|
|
@@ -257,7 +262,7 @@ inline void igl::EmbreeIntersector::init(
|
|
|
init(Vtemp,Ftemp,masks);
|
|
|
}
|
|
|
|
|
|
-inline void igl::EmbreeIntersector::init(
|
|
|
+inline void igl::embree::EmbreeIntersector::init(
|
|
|
const std::vector<const PointMatrixType*>& V,
|
|
|
const std::vector<const FaceMatrixType*>& F,
|
|
|
const std::vector<int>& masks)
|
|
@@ -318,14 +323,14 @@ inline void igl::EmbreeIntersector::init(
|
|
|
initialized = true;
|
|
|
}
|
|
|
|
|
|
-igl::EmbreeIntersector
|
|
|
+igl::embree::EmbreeIntersector
|
|
|
::~EmbreeIntersector()
|
|
|
{
|
|
|
if(initialized)
|
|
|
deinit();
|
|
|
}
|
|
|
|
|
|
-void igl::EmbreeIntersector::deinit()
|
|
|
+void igl::embree::EmbreeIntersector::deinit()
|
|
|
{
|
|
|
if(scene)
|
|
|
{
|
|
@@ -344,7 +349,7 @@ void igl::EmbreeIntersector::deinit()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-inline bool igl::EmbreeIntersector::intersectRay(
|
|
|
+inline bool igl::embree::EmbreeIntersector::intersectRay(
|
|
|
const Eigen::RowVector3f& origin,
|
|
|
const Eigen::RowVector3f& direction,
|
|
|
Hit& hit,
|
|
@@ -375,7 +380,7 @@ inline bool igl::EmbreeIntersector::intersectRay(
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-inline bool igl::EmbreeIntersector::intersectBeam(
|
|
|
+inline bool igl::embree::EmbreeIntersector::intersectBeam(
|
|
|
const Eigen::RowVector3f& origin,
|
|
|
const Eigen::RowVector3f& direction,
|
|
|
Hit& hit,
|
|
@@ -383,8 +388,7 @@ inline bool igl::EmbreeIntersector::intersectBeam(
|
|
|
float tfar,
|
|
|
int mask,
|
|
|
int geoId,
|
|
|
- bool closestHit,
|
|
|
- unsigned int samples) const
|
|
|
+ bool closestHit) const
|
|
|
{
|
|
|
bool hasHit = false;
|
|
|
Hit bestHit;
|
|
@@ -394,18 +398,19 @@ inline bool igl::EmbreeIntersector::intersectBeam(
|
|
|
else
|
|
|
bestHit.t = 0;
|
|
|
|
|
|
- if(hasHit = (intersectRay(origin,direction,hit,tnear,tfar,mask) && (hit.gid == geoId || geoId == -1)))
|
|
|
+ if(hasHit = ((intersectRay(origin,direction,hit,tnear,tfar,mask)) && (hit.gid == geoId || geoId == -1)))
|
|
|
bestHit = hit;
|
|
|
|
|
|
// sample points around actual ray (conservative hitcheck)
|
|
|
- const float eps= 1e-5;
|
|
|
+ float eps= 1e-5;
|
|
|
+ int density = 4;
|
|
|
|
|
|
Eigen::RowVector3f up(0,1,0);
|
|
|
Eigen::RowVector3f offset = direction.cross(up).normalized();
|
|
|
|
|
|
- Eigen::Matrix3f rot = Eigen::AngleAxis<float>(2*3.14159265358979/samples,direction).toRotationMatrix();
|
|
|
+ Eigen::Matrix3f rot = Eigen::AngleAxis<float>(2*3.14159265358979/density,direction).toRotationMatrix();
|
|
|
|
|
|
- for(int r=0;r<samples;r++)
|
|
|
+ for(int r=0;r<density;r++)
|
|
|
{
|
|
|
if(intersectRay(origin+offset*eps,direction,hit,tnear,tfar,mask) && ((closestHit && (hit.t < bestHit.t)) || (!closestHit && (hit.t > bestHit.t))) && (hit.gid == geoId || geoId == -1))
|
|
|
{
|
|
@@ -420,7 +425,7 @@ inline bool igl::EmbreeIntersector::intersectBeam(
|
|
|
}
|
|
|
|
|
|
inline bool
|
|
|
-igl::EmbreeIntersector
|
|
|
+igl::embree::EmbreeIntersector
|
|
|
::intersectRay(
|
|
|
const Eigen::RowVector3f& origin,
|
|
|
const Eigen::RowVector3f& direction,
|
|
@@ -442,7 +447,7 @@ igl::EmbreeIntersector
|
|
|
double min_t = tnear;
|
|
|
bool large_hits_warned = false;
|
|
|
RTCRay ray;
|
|
|
- createRay(ray,origin,direction,tnear,tfar,mask);
|
|
|
+ createRay(ray,origin,direction,tnear,std::numeric_limits<float>::infinity(),mask);
|
|
|
|
|
|
while(true)
|
|
|
{
|
|
@@ -461,9 +466,9 @@ igl::EmbreeIntersector
|
|
|
// push min_t a bit more
|
|
|
//double t_push = pow(2.0,self_hits-4)*(hit.t<eps?eps:hit.t);
|
|
|
double t_push = pow(2.0,self_hits)*eps;
|
|
|
-#ifdef IGL_VERBOSE
|
|
|
- std::cerr << " t_push: "<<t_push<<endl;
|
|
|
-#endif
|
|
|
+ #ifdef IGL_VERBOSE
|
|
|
+ std::cerr<<" t_push: "<<t_push<<endl;
|
|
|
+ #endif
|
|
|
//o = o+t_push*d;
|
|
|
min_t += t_push;
|
|
|
self_hits++;
|
|
@@ -478,7 +483,7 @@ igl::EmbreeIntersector
|
|
|
hit.t = ray.tfar;
|
|
|
hits.push_back(hit);
|
|
|
#ifdef IGL_VERBOSE
|
|
|
- std::cerr << " t: "<<hit.t<<endl;
|
|
|
+ std::cerr<<" t: "<<hit.t<<endl;
|
|
|
#endif
|
|
|
// Instead of moving origin, just change min_t. That way calculations
|
|
|
// all use exactly same origin values
|
|
@@ -520,7 +525,7 @@ igl::EmbreeIntersector
|
|
|
}
|
|
|
|
|
|
inline bool
|
|
|
-igl::EmbreeIntersector
|
|
|
+igl::embree::EmbreeIntersector
|
|
|
::intersectSegment(const Eigen::RowVector3f& a, const Eigen::RowVector3f& ab, Hit &hit, int mask) const
|
|
|
{
|
|
|
RTCRay ray;
|
|
@@ -542,7 +547,7 @@ igl::EmbreeIntersector
|
|
|
}
|
|
|
|
|
|
inline void
|
|
|
-igl::EmbreeIntersector
|
|
|
+igl::embree::EmbreeIntersector
|
|
|
::createRay(RTCRay& ray, const Eigen::RowVector3f& origin, const Eigen::RowVector3f& direction, float tnear, float tfar, int mask) const
|
|
|
{
|
|
|
ray.org[0] = origin[0];
|
|
@@ -560,4 +565,4 @@ igl::EmbreeIntersector
|
|
|
ray.time = 0.0f;
|
|
|
}
|
|
|
|
|
|
-#endif //EMBREE_INTERSECTOR_H
|
|
|
+#endif //EMBREE_INTERSECTOR_H
|