scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
Loading...
Searching...
No Matches
renderer.h
Go to the documentation of this file.
1
6
7#pragma once
8
9#include <scimesh/mesh.h>
10#include <scimesh/scene.h>
11#include <scimesh/camera.h>
13#include <scimesh/image.h>
14
15namespace scimesh {
16
73class Renderer {
74public:
83 Image render_mesh(const Mesh &mesh, const Camera &camera, const RenderOptions &options);
84
104 Image render_scene(const Scene &scene, const Camera &camera, const RenderOptions &options);
105
119 Image render_triangles_raw(const std::vector<Vec3> &positions,
120 const std::vector<Color> &colors,
121 const Camera &camera,
122 const RenderOptions &options);
123
145 Image render_points_raw(const std::vector<Vec3> &positions,
146 const std::vector<Color> &colors,
147 float radius,
148 const Camera &camera,
149 const RenderOptions &options);
150
151private:
156 void render_pipeline(const std::vector<SceneNodeRef> &nodes,
157 const Camera &camera,
158 const RenderOptions &options,
159 Image &output);
160};
161
162} // namespace scimesh
Camera definition and helper functions for view setup.
The main rendering engine.
Definition renderer.h:73
Image render_mesh(const Mesh &mesh, const Camera &camera, const RenderOptions &options)
Render a single mesh to an image.
Definition renderer.cpp:31
Image render_scene(const Scene &scene, const Camera &camera, const RenderOptions &options)
Render a scene (collection of meshes) to an image.
Definition renderer.cpp:43
Image render_points_raw(const std::vector< Vec3 > &positions, const std::vector< Color > &colors, float radius, const Camera &camera, const RenderOptions &options)
Render a point cloud (spheres at each position) to an image.
Definition renderer.cpp:77
Image render_triangles_raw(const std::vector< Vec3 > &positions, const std::vector< Color > &colors, const Camera &camera, const RenderOptions &options)
Render raw triangles (no Mesh wrapper) to an image.
Definition renderer.cpp:54
The Image — an RGBA pixel buffer with compositing and I/O operations.
The Mesh — the central data structure for 3D geometry in scimesh.
RenderOptions — all settings that control how meshes are drawn.
The Scene — a collection of meshes rendered together.
A virtual camera that defines the viewpoint for rendering.
Definition camera.h:77
A 2D RGBA image buffer.
Definition image.h:87
A 3D triangle mesh using an indexed face set representation.
Definition mesh.h:76
All settings that control rendering output.
A collection of Mesh objects to be rendered together.
Definition scene.h:57