13#ifndef IGL_EMBREE_EMBREE_RENDERER_H 
   14#define IGL_EMBREE_EMBREE_RENDERER_H 
   16#include "../colormap.h" 
   18#include <Eigen/Geometry> 
   20#include <Eigen/Geometry> 
   22#include <embree3/rtcore.h> 
   23#include <embree3/rtcore_ray.h> 
   39      typedef Eigen::RowVector3f Vec3f;
 
   51      typedef Eigen::Matrix<float,Eigen::Dynamic,3> PointMatrixType;
 
   52      typedef Eigen::Matrix<float,Eigen::Dynamic,3> ColorMatrixType;
 
   53      typedef Eigen::Matrix<int,  Eigen::Dynamic,3> FaceMatrixType;
 
   54      typedef Eigen::Matrix<unsigned char,Eigen::Dynamic,Eigen::Dynamic> PixelMatrixType;
 
   60      EmbreeRenderer(
const EmbreeRenderer & that);
 
   61      EmbreeRenderer & operator=(
const EmbreeRenderer &);
 
   63      virtual ~EmbreeRenderer();
 
   70      template <
typename DerivedV, 
typename DerivedF>
 
   71      void set_mesh(
const Eigen::MatrixBase<DerivedV> & V,
 
   72                    const Eigen::MatrixBase<DerivedF> & F,
 
   80      template <
typename DerivedC>
 
   81      void set_colors(
const Eigen::MatrixBase<DerivedC> & C);
 
   84      template <
typename DerivedD>
 
   85      void set_data(
const Eigen::MatrixBase<DerivedD> & D,
 
   96      template <
typename DerivedD, 
typename T>
 
   98        const Eigen::MatrixBase<DerivedD> & D,
 
  106      template <
typename Derivedr>
 
  107      void set_rot(
const Eigen::MatrixBase<Derivedr> &r);
 
  112      template <
typename T>
 
  118      template <
typename Derivedtr>
 
  119      void set_translation(
const Eigen::MatrixBase<Derivedtr> &tr);
 
  124      void set_face_based(
bool f);
 
  129      void set_orthographic(
bool f );
 
  135      void set_double_sided(
bool f);
 
  145      void render_buffer(PixelMatrixType &R,
 
  162        const Eigen::RowVector3f& origin,
 
  163        const Eigen::RowVector3f& direction,
 
  166        float tfar = std::numeric_limits<float>::infinity(),
 
  167        int mask = 0xFFFFFFFF) 
const;
 
  180        const PointMatrixType& V,
 
  181        const FaceMatrixType& F,
 
  182        bool isStatic = 
false);
 
  194        const std::vector<const PointMatrixType*>& V,
 
  195        const std::vector<const FaceMatrixType*>& F,
 
  196        const std::vector<int>& masks,
 
  197        bool isStatic = 
false);
 
  212      Eigen::RowVector3f uC; 
 
  219      float camera_base_zoom;
 
  222      Eigen::Vector3f camera_base_translation;
 
  223      Eigen::Vector3f camera_translation;
 
  224      Eigen::Vector3f camera_eye;
 
  225      Eigen::Vector3f camera_up;
 
  226      Eigen::Vector3f camera_center;
 
  227      float camera_view_angle;
 
  232      Eigen::Matrix4f view;
 
  233      Eigen::Matrix4f proj;
 
  234      Eigen::Matrix4f norm;
 
  236      Eigen::Matrix3f rot_matrix;
 
  249        const Eigen::RowVector3f& origin,
 
  250        const Eigen::RowVector3f& direction,
 
  259#ifndef IGL_STATIC_LIBRARY 
  260#  include "EmbreeRenderer.cpp" 
ColorMapType
Definition colormap.h:19
 
@ COLOR_MAP_TYPE_VIRIDIS
Definition colormap.h:25
 
Definition EmbreeRenderer.h:42
 
Vec3f N
Definition EmbreeRenderer.h:47
 
int gid
Definition EmbreeRenderer.h:44
 
int id
Definition EmbreeRenderer.h:43
 
float u
Definition EmbreeRenderer.h:45
 
float v
Definition EmbreeRenderer.h:45
 
float t
Definition EmbreeRenderer.h:46