15 #include <embree3/rtcore.h> 16 #include <Euclid/Render/RenderCore.h> 67 virtual RTCRayHit
gen_ray(
float s,
float t)
const = 0;
142 void set_aspect(
float aspect);
147 void set_aspect(
unsigned width,
unsigned height);
152 void set_fov(
float vfov);
159 RTCRayHit
gen_ray(
float s,
float t)
const override;
201 void set_extent(
float xextent,
float yextent);
208 RTCRayHit
gen_ray(
float s,
float t)
const override;
242 void attach_geometry_buffers(
const std::vector<float>& positions,
243 const std::vector<unsigned>& indices);
264 void attach_color_buffer(
const std::vector<float>* colors,
265 bool vertex_color =
false);
276 void attach_face_mask_buffer(
const std::vector<uint8_t>* mask);
281 void release_buffers();
286 void set_material(
const Material& material);
291 void set_background(
const Eigen::Ref<const Eigen::Array3f>& color);
296 void set_background(
float r,
float g,
float b);
301 void enable_light(
bool on);
315 void render_shaded(std::vector<uint8_t>& pixels,
319 bool interleaved =
true);
335 void render_shaded(std::vector<uint8_t>& pixels,
340 bool interleaved =
true);
352 void render_depth(std::vector<uint8_t>& pixels,
367 void render_depth(std::vector<float>& values,
379 void render_silhouette(std::vector<uint8_t>& pixels,
401 void render_index(std::vector<uint8_t>& pixels,
405 bool interleaved =
true);
418 void render_index(std::vector<uint32_t>& indices,
427 std::function<Eigen::Array3f(const RTCHit&)> _select_diffuse_color();
432 Eigen::Array3f _diffuse_material(
const RTCHit& hit);
437 Eigen::Array3f _diffuse_face_color(
const RTCHit& hit);
442 Eigen::Array3f _diffuse_vertex_color(
const RTCHit& hit);
446 Eigen::Array3f _background = Eigen::Array3f::Zero();
449 RTCGeometry _geometry;
450 const std::vector<float>* _colors =
nullptr;
451 const std::vector<uint8_t>* _face_mask =
nullptr;
453 bool _vertex_color =
false;
454 bool _lighting =
true;
460 #include "src/RayTracer.cpp" float tnear
The near plane.
Definition: RenderCore.h:100
Film film
The film plane.
Definition: RayTracer.h:75
A RayCamera using orthographic projection.
Definition: RayTracer.h:167
float tfar
The far plane.
Definition: RenderCore.h:105
virtual RTCRayHit gen_ray(float s, float t) const =0
Generate an embree rayhit structure.
A simple Lambertian material model.
Definition: RenderCore.h:154
A basic positionable camera model.
Definition: RenderCore.h:17
A RayCamera using perspective projection.
Definition: RayTracer.h:83
A simple ray tracer.
Definition: RayTracer.h:215
The film plane of a camera.
Definition: RayTracer.h:34
A camera model used for ray tracing.
Definition: RayTracer.h:25
RayCamera()=default
Create a RayCamera.