9 #include <pybind11/functional.h>
28 namespace visualization {
35 const std::string &resource_path) {
62 bool z_in_view_space =
false) {
68 const Eigen::Matrix4d &extrinsic) {
74 const Eigen::Matrix4d &extrinsic,
75 int intrinsic_width_px,
76 int intrinsic_height_px) {
78 *scene_->
GetCamera(), intrinsic, extrinsic, intrinsic_width_px,
83 const Eigen::Vector3f ¢er,
84 const Eigen::Vector3f &eye,
85 const Eigen::Vector3f &up,
86 float nearClip = -1.0f,
87 float farClip = -1.0f) {
90 aspect = float(width_) / float(height_);
93 auto far_plane = farClip > 0.0
97 camera->SetProjection(
101 camera->LookAt(center, eye, up);
114 py::class_<TextureHandle> texture_handle(m_rendering,
"TextureHandle",
115 "Handle to a texture");
116 py::class_<Renderer> renderer(
117 m_rendering,
"Renderer",
118 "Renderer class that manages 3D resources. Get from gui.Window.");
120 "Sets the background color for the renderer, [r, g, b, a]. "
121 "Applies to everything being rendered, so it essentially acts "
122 "as the background color of the window")
125 const std::shared_ptr<geometry::Image>,
bool)) &
127 "image"_a,
"is_sRGB"_a =
false,
128 "Adds a texture. The first parameter is the image, the second "
129 "parameter is optional and is True if the image is in the "
130 "sRGB colorspace and False otherwise")
131 .def(
"update_texture",
133 const std::shared_ptr<geometry::Image>,
136 "texture"_a,
"image"_a,
"is_sRGB"_a =
false,
137 "Updates the contents of the texture to be the new image, or "
138 "returns False and does nothing if the image is a different "
139 "size. It is more efficient to call update_texture() rather "
140 "than removing and adding a new texture, especially when "
141 "changes happen frequently, such as when implementing video. "
142 "add_texture(geometry.Image, bool). The first parameter is "
143 "the image, the second parameter is optional and is True "
144 "if the image is in the sRGB colorspace and False otherwise")
146 "Deletes the texture. This does not remove the texture from "
147 "any existing materials or GUI widgets, and must be done "
148 "prior to this call.");
153 py::class_<PyOffscreenRenderer, std::shared_ptr<PyOffscreenRenderer>>
154 offscreen(m_rendering,
"OffscreenRenderer",
155 "Renderer instance that can be used for rendering to an "
158 .def(py::init([](
int w,
int h,
const std::string &resource_path) {
159 return std::make_shared<PyOffscreenRenderer>(
160 w, h, resource_path);
162 "width"_a,
"height"_a,
"resource_path"_a =
"",
163 "Takes width, height and optionally a resource_path. "
164 " If unspecified, resource_path will use the resource path "
166 "the installed CloudViewer library.")
167 .def_property_readonly(
169 "Returns the CloudViewerScene for this renderer. This "
171 "destroyed when the renderer is destroyed and should not "
172 "be accessed after that point.")
174 py::overload_cast<
float,
const Eigen::Vector3f &,
175 const Eigen::Vector3f &,
176 const Eigen::Vector3f &,
float,
float>(
178 "vertical_field_of_view"_a,
"center"_a,
"eye"_a,
"up"_a,
179 "near_clip"_a = -1.0f,
"far_clip"_a = -1.0f,
180 "Sets camera view using bounding box of current geometry if "
181 "the near_clip and far_clip parameters are not set")
184 const Eigen::Matrix4d &>(
186 "intrinsics"_a,
"extrinsic_matrix"_a,
187 "Sets the camera view using bounding box of current geometry")
189 py::overload_cast<
const Eigen::Matrix3d &,
190 const Eigen::Matrix4d &,
int,
int>(
192 "intrinsic_matrix"_a,
"extrinsic_matrix"_a,
193 "intrinsic_width_px"_a,
"intrinsic_height_px"_a,
194 "Sets the camera view using bounding box of current geometry")
196 "Renders scene to an image, blocking until the image is "
198 .def(
"render_to_depth_image",
200 "z_in_view_space"_a =
false,
201 "Renders scene depth buffer to a float image, blocking until "
202 "the image is returned. Pixels range from 0 (near plane) to "
203 "1 (far plane). If z_in_view_space is set to True then pixels "
204 "are pre-transformed into view space (i.e., distance from "
208 py::class_<Camera, std::shared_ptr<Camera>> cam(m_rendering,
"Camera",
210 py::native_enum<Camera::FovType>(
211 cam,
"FovType",
"enum.Enum",
212 "Enum class for Camera field of view types.")
218 py::native_enum<Camera::Projection>(
219 cam,
"Projection",
"enum.Enum",
220 "Enum class for Camera projection types.")
226 cam.def(
"set_projection",
229 "field_of_view"_a,
"aspect_ratio"_a,
"near_plane"_a,
"far_plane"_a,
230 "field_of_view_type"_a,
"Sets a perspective projection.")
231 .def(
"set_projection",
233 double,
double,
double)) &
235 "projection_type"_a,
"left"_a,
"right"_a,
"bottom"_a,
"top"_a,
237 "Sets the camera projection via a viewing frustum. ")
238 .def(
"set_projection",
239 (
void(
Camera::*)(
const Eigen::Matrix3d &,
double,
double,
242 "intrinsics"_a,
"near_plane"_a,
"far_plane"_a,
"image_width"_a,
244 "Sets the camera projection via intrinsics matrix.")
246 "Sets the position and orientation of the camera: ")
248 "view_width"_a,
"view_height"_a,
249 "Takes the (x, y, z) location in the view, where x, y are the "
250 "number of pixels from the upper left of the view, and z is "
251 "the depth value. Returns the world coordinate (x', y', z').")
253 "Copies the settings from the camera passed as the argument "
256 "Returns the distance from the camera to the near plane")
258 "Returns the distance from the camera to the far plane")
260 "Returns the field of view of camera, in degrees. Only valid "
261 "if it was passed to set_projection().")
263 "Returns the field of view type. Only valid if it was passed "
264 "to set_projection().")
266 "get_projection_matrix",
267 [](
const Camera &cam) -> Eigen::Matrix4f {
270 return cam.GetProjectionMatrix().matrix();
272 "Returns the projection matrix of the camera")
275 [](
const Camera &cam) -> Eigen::Matrix4f {
276 return cam.GetViewMatrix().matrix();
278 "Returns the view matrix of the camera")
281 [](
const Camera &cam) -> Eigen::Matrix4f {
282 return cam.GetModelMatrix().matrix();
284 "Returns the model matrix of the camera");
287 py::class_<Gradient, std::shared_ptr<Gradient>> gradient(
288 m_rendering,
"Gradient",
289 "Manages a gradient for the unlitGradient shader."
290 "In gradient mode, the array of points specifies points along "
291 "the gradient, from 0 to 1 (inclusive). These do need to be "
296 "Rainbow (note the gaps around green):"
297 " [ ( 0.000, blue ),"
298 " ( 0.125, cornflower blue ),"
301 " ( 0.750, yellow ),"
302 " ( 0.875, orange ),"
304 "The gradient will generate a largish texture, so it should "
305 "be fairly smooth, but the boundaries may not be exactly as "
306 "specified due to quantization imposed by the fixed size of "
308 " The points *must* be sorted from the smallest value to the "
309 "largest. The values must be in the range [0, 1].");
311 py::native_enum<Gradient::Mode>(gradient,
"Mode",
"enum.Enum")
316 py::class_<Gradient::Point> gpt(gradient,
"Point");
317 gpt.def(py::init<float, const Eigen::Vector4f>())
321 s <<
"Gradient.Point[" << p.
value <<
", (" << p.
color[0]
322 <<
", " << p.
color[1] <<
", " << p.
color[2] <<
", "
323 << p.
color[3] <<
")]";
327 "Must be within 0.0 and 1.0")
329 "[R, G, B, A]. Color values must be in [0.0, 1.0]");
330 gradient.def(py::init<>())
331 .def(py::init<std::vector<Gradient::Point>>())
336 py::class_<MaterialRecord> mat(
337 m_rendering,
"MaterialRecord",
338 "Describes the real-world, physically based (PBR) "
339 "material used to render a geometry");
340 mat.def(py::init<>())
345 .def_readwrite(
"base_reflectance",
348 .def_readwrite(
"base_clearcoat_roughness",
354 .def_readwrite(
"absorption_color",
356 .def_readwrite(
"absorption_distance",
360 "Requires 'shader' to be 'unlitLine'")
368 .def_readwrite(
"clearcoat_roughness_img",
371 .def_readwrite(
"ao_rough_metal_img",
380 .def_readwrite(
"ground_plane_axis",
385 py::class_<TriangleMeshModel, std::shared_ptr<TriangleMeshModel>> tri_model(
386 m_rendering,
"TriangleMeshModel",
387 "A list of geometry.TriangleMesh and MaterialRecord that can "
389 "complex model with multiple meshes, such as might be stored in an "
390 "FBX, OBJ, or GLTF file");
391 py::class_<TriangleMeshModel::MeshInfo> tri_model_info(tri_model,
394 .def(py::init([](std::shared_ptr<ccMesh> mesh,
395 const std::string &
name,
396 unsigned int material_idx) {
401 .def_readwrite(
"material_idx",
403 tri_model.def(py::init<>())
408 py::class_<ColorGradingParams> color_grading(
409 m_rendering,
"ColorGrading",
410 "Parameters to control color grading options");
412 py::native_enum<ColorGradingParams::Quality>(
413 color_grading,
"Quality",
"enum.Enum",
414 "Quality level of color grading operations")
420 py::native_enum<ColorGradingParams::ToneMapping>(
421 color_grading,
"ToneMapping",
"enum.Enum",
422 "Specifies the tone-mapping algorithm")
429 .value(
"DISPLAY_RANGE",
440 "Quality of color grading operations. High quality "
441 "is more accurate but slower")
444 "The tone mapping algorithm to apply. Must be one of "
445 "Linear, AcesLegacy, Aces, Filmic, Uchimura, "
446 "Rienhard, Display Range(for debug)")
449 "White balance color temperature")
453 "Tint on the green/magenta axis. Ranges from -1.0 to 1.0.");
456 py::class_<View, UnownedPointer<View>> view(m_rendering,
"View",
457 "Low-level view class");
458 py::native_enum<View::ShadowType>(
459 view,
"ShadowType",
"enum.Enum",
460 "Available shadow mapping algorithm options")
465 "Sets the parameters to be used for the color grading algorithms")
467 "True to enable, False to disable post processing. Post "
468 "processing effects include: color grading, ambient occlusion "
469 "(and other screen space effects), and anti-aliasing.")
471 "enabled"_a,
"ssct_enabled"_a =
false,
472 "True to enable, False to disable ambient occlusion. "
473 "Optionally, screen-space cone tracing may be enabled with "
474 "ssct_enabled=True.")
476 "temporal"_a =
false,
477 "True to enable, False to disable anti-aliasing. Note that "
478 "this only impacts anti-aliasing post-processing. MSAA is "
479 "controlled separately by `set_sample_count`. Temporal "
480 "anti-aliasing may be optionally enabled with temporal=True.")
482 "Sets the sample count for MSAA. Set to 1 to disable MSAA. "
483 "Typical values are 2, 4 or 8. The maximum possible value "
484 "depends on the underlying GPU and OpenGL driver.")
487 "cloudViewer.visualization.rendering.View."
489 "True to enable, false to enable all shadow mapping when "
490 "rendering this View. When enabling shadow mapping you may "
491 "also specify one of two shadow mapping algorithms: PCF "
492 "(default) or VSM. Note: shadowing is enabled by default with "
493 "PCF shadow mapping.")
495 "Returns the Camera associated with this View.");
498 py::class_<Scene, UnownedPointer<Scene>> scene(m_rendering,
"Scene",
499 "Low-level rendering scene");
500 py::native_enum<Scene::GroundPlane>(
501 scene,
"GroundPlane",
"enum.Enum",
502 "Plane on which to show ground plane: XZ, XY, or YZ")
509 "Adds a camera to the scene")
511 "Removes the camera with the given name")
513 "Sets the camera with the given name as the active camera for "
520 "name"_a,
"geometry"_a,
"material"_a,
521 "downsampled_name"_a =
"",
"downsample_threshold"_a =
SIZE_MAX,
522 "Adds a Geometry with a material to the scene")
528 "name"_a,
"geometry"_a,
"material"_a,
529 "downsampled_name"_a =
"",
"downsample_threshold"_a =
SIZE_MAX,
530 "Adds a Geometry with a material to the scene")
532 "Returns True if a geometry with the provided name exists in "
535 "point_cloud"_a,
"update_flag"_a,
536 "Updates the flagged arrays from the tgeometry.PointCloud. "
537 "The flags should be ORed from Scene.UPDATE_POINTS_FLAG, "
538 "Scene.UPDATE_NORMALS_FLAG, Scene.UPDATE_COLORS_FLAG, and "
539 "Scene.UPDATE_UV0_FLAG")
541 "Removes the named geometry from the scene.")
543 "Show or hide the named geometry.")
545 "Returns false if the geometry is hidden, True otherwise. "
546 "Note: this is different from whether or not the geometry is "
549 "cast_shadows"_a,
"receive_shadows"_a,
550 "Controls whether an object casts and/or receives shadows: "
551 "geometry_shadows(name, cast_shadows, receieve_shadows)")
554 "Enable/disable view frustum culling on the named object. "
555 "Culling is enabled by default.")
558 "Set sorting priority for named object. Objects with higher "
559 "priority will be rendering on top of overlapping geometry "
560 "with lower priority.")
562 "enable"_a,
"Enables or disables indirect lighting")
564 "Loads the indirect light. The name parameter is the name of "
566 .def(
"set_indirect_light_intensity",
568 "Sets the brightness of the indirect light")
572 "Sets the parameters of the sun light direction, "
575 "position"_a,
"intensity"_a,
"falloff"_a,
"cast_shadows"_a,
576 "Adds a point light to the scene.")
578 "position"_a,
"direction"_a,
"intensity"_a,
"falloff"_a,
579 "inner_cone_angle"_a,
"outer_cone_angle"_a,
"cast_shadows"_a,
580 "Adds a spot light to the scene.")
582 "color"_a,
"direction"_a,
"intensity"_a,
"cast_shadows"_a,
583 "Adds a directional light to the scene")
585 "Removes the named light from the scene.")
588 "Changes a point, spot, or directional light's color")
590 "position"_a,
"Changes a point or spot light's position.")
592 "name"_a,
"direction"_a,
593 "Changes a spot or directional light's direction.")
595 "name"_a,
"intensity"_a,
596 "Changes a point, spot or directional light's intensity.")
598 "falloff"_a,
"Changes a point or spot light's falloff.")
600 "name"_a,
"inner_cone_angle"_a,
"outer_cone_angle"_a,
601 "Changes a spot light's inner and outer cone angles.")
603 "can_cast_shadows"_a,
604 "Changes whether a point, spot, or directional light can "
607 "Renders the scene to an image. This can only be used in a "
608 "GUI app. To render without a window, use "
609 "``Application.render_to_image``.")
611 "Renders the scene to a depth image. This can only be used in "
612 "GUI app. To render without a window, use "
613 "``Application.render_to_depth_image``. Pixels range from "
614 "0.0 (near plane) to 1.0 (far plane)");
622 py::class_<CloudViewerScene, UnownedPointer<CloudViewerScene>> o3dscene(
623 m_rendering,
"CloudViewerScene",
"High-level scene for rending");
624 py::native_enum<CloudViewerScene::LightingProfile>(
625 o3dscene,
"LightingProfile",
"enum.Enum",
626 "Enum for conveniently setting lighting")
627 .value(
"HARD_SHADOWS",
629 .value(
"DARK_SHADOWS",
631 .value(
"MED_SHADOWS",
633 .value(
"SOFT_SHADOWS",
639 o3dscene.def(py::init<Renderer &>())
641 "Toggles display of the skybox")
643 "Toggles display of xyz axes")
645 "enable"_a,
"plane"_a,
"Toggles display of ground plane")
648 "Sets a simple lighting model. The default value is "
649 "set_lighting(CloudViewerScene.LightingProfile.MED_SHADOWS, "
650 "(0.577, -0.577, -0.577))")
652 "set_background_color",
655 "visualization.rendering.CloudViewerScene.set_"
656 "background_color()\nhas been deprecated. "
657 "Please use set_background() instead.");
658 scene.SetBackground(
color,
nullptr);
660 "This function has been deprecated. Please use "
661 "set_background() instead.")
664 "set_background([r, g, b, a], image=None). Sets the "
665 "background color and (optionally) image of the scene. ")
668 py::overload_cast<
const std::string &,
const ccHObject *,
671 "name"_a,
"geometry"_a,
"material"_a,
672 "add_downsampled_copy_for_fast_rendering"_a =
true,
673 "Adds a geometry with the specified name. Default visible is "
676 py::overload_cast<
const std::string &,
680 "name"_a,
"geometry"_a,
"material"_a,
681 "add_downsampled_copy_for_fast_rendering"_a =
true,
682 "Adds a geometry with the specified name. Default visible is "
685 "Adds TriangleMeshModel to the scene.")
687 "Returns True if the geometry has been added to the scene, "
690 "Removes the geometry with the given name")
692 "name"_a,
"Returns True if the geometry name is visible")
693 .def(
"set_geometry_transform",
696 "sets the pose of the geometry name to transform")
697 .def(
"get_geometry_transform",
699 "Returns the pose of the geometry name in the scene")
700 .def(
"modify_geometry_material",
703 "Modifies the material of the specified geometry")
705 "show"_a,
"Shows or hides the geometry with the given name")
708 "Applies the passed material to all the geometries")
712 scene->GetView()->SetViewport(0, 0,
width,
height);
714 "width"_a,
"height"_a,
715 "Sets the view size. This should not be used except for "
716 "rendering to an image")
718 "The low-level rendering scene object "
721 "The camera object (read-only)")
722 .def_property_readonly(
"bounding_box",
724 "The bounding box of all the items in the "
725 "scene, visible and invisible")
726 .def_property_readonly(
728 "The low level view associated with the scene")
729 .def_property_readonly(
"background_color",
731 "The background color (read-only)")
732 .def_property(
"downsample_threshold",
735 "Minimum number of points before downsampled point "
736 "clouds are created and used when rendering speed "
741 py::module m_rendering = m.def_submodule(
"rendering");
Hierarchical CLOUDVIEWER Object.
Contains the pinhole camera intrinsic parameters.
int height_
Height of the image.
int width_
Width of the image.
Eigen::Matrix3d intrinsic_matrix_
virtual Eigen::Vector3f Unproject(float x, float y, float z, float view_width, float view_height) const =0
virtual void CopyFrom(const Camera *camera)=0
virtual double GetNear() const =0
virtual double GetFar() const =0
virtual double GetFieldOfView() const =0
only valid if fov was passed to SetProjection()
virtual FovType GetFieldOfViewType() const =0
only valid if fov was passed to SetProjection()
static void SetupCameraAsPinholeCamera(rendering::Camera &camera, const Eigen::Matrix3d &intrinsic, const Eigen::Matrix4d &extrinsic, int intrinsic_width_px, int intrinsic_height_px, const ccBBox &scene_bounds)
static float CalcNearPlane()
Returns a good value for the near plane.
virtual void SetProjection(double fov, double aspect, double near, double far, FovType fov_type)=0
static float CalcFarPlane(const rendering::Camera &camera, const ccBBox &scene_bounds)
virtual void LookAt(const Eigen::Vector3f ¢er, const Eigen::Vector3f &eye, const Eigen::Vector3f &up)=0
const ccBBox & GetBoundingBox()
Eigen::Matrix4d GetGeometryTransform(const std::string &name)
void ShowSkybox(bool enable)
void ShowGeometry(const std::string &name, bool show)
Shows or hides the geometry with the specified name.
bool HasGeometry(const std::string &name) const
void ModifyGeometryMaterial(const std::string &name, const MaterialRecord &mat)
void SetDownsampleThreshold(size_t n_points)
void SetBackground(const Eigen::Vector4f &color, std::shared_ptr< geometry::Image > image=nullptr)
void SetGeometryTransform(const std::string &name, const Eigen::Matrix4d &transform)
const Eigen::Vector4f GetBackgroundColor() const
void RemoveGeometry(const std::string &name)
void ShowGroundPlane(bool enable, Scene::GroundPlane plane)
void ShowAxes(bool enable)
void UpdateMaterial(const MaterialRecord &mat)
Updates all geometries to use this material.
bool GeometryIsVisible(const std::string &name)
size_t GetDownsampleThreshold() const
void SetLighting(LightingProfile profile, const Eigen::Vector3f &sun_dir)
Camera * GetCamera() const
void AddGeometry(const std::string &name, const ccHObject *geom, const MaterialRecord &mat, bool add_downsampled_copy_for_fast_rendering=true)
Adds a geometry with the specified name. Default visible is true.
void AddModel(const std::string &name, const TriangleMeshModel &model)
void SetToneMapping(ToneMapping algorithm)
Quality
Quality level of color grading operations.
float GetTemperature() const
void SetQuality(Quality q)
Quality GetQuality() const
ToneMapping GetToneMapping() const
void SetTemperature(float temperature)
static filament::Engine & GetInstance()
static FilamentResourceManager & GetResourceManager()
static void EnableHeadless()
static void DestroyInstance()
const std::vector< Gradient::Point > & GetPoints() const
void SetPoints(const std::vector< Gradient::Point > &points)
@ kLUT
Normal gradient mode.
PyOffscreenRenderer(int width, int height, const std::string &resource_path)
std::shared_ptr< geometry::Image > RenderToDepthImage(bool z_in_view_space=false)
CloudViewerScene * GetScene()
void SetupCamera(float verticalFoV, const Eigen::Vector3f ¢er, const Eigen::Vector3f &eye, const Eigen::Vector3f &up, float nearClip=-1.0f, float farClip=-1.0f)
void SetupCamera(const Eigen::Matrix3d &intrinsic, const Eigen::Matrix4d &extrinsic, int intrinsic_width_px, int intrinsic_height_px)
void SetupCamera(const camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic)
std::shared_ptr< geometry::Image > RenderToImage()
virtual bool UpdateTexture(TextureHandle texture, const std::shared_ptr< geometry::Image > image, bool srgb)=0
virtual void SetClearColor(const Eigen::Vector4f &color)=0
virtual TextureHandle AddTexture(const ResourceLoadRequest &request, bool srgb=false)=0
virtual void RemoveTexture(const TextureHandle &id)=0
virtual void SetGeometryPriority(const std::string &object_name, uint8_t priority)=0
virtual void RenderToDepthImage(std::function< void(std::shared_ptr< geometry::Image >)> callback)=0
Size of image is the size of the window.
virtual void UpdateLightIntensity(const std::string &light_name, float intensity)=0
virtual bool AddPointLight(const std::string &light_name, const Eigen::Vector3f &color, const Eigen::Vector3f &position, float intensity, float falloff, bool cast_shadows)=0
virtual bool AddDirectionalLight(const std::string &light_name, const Eigen::Vector3f &color, const Eigen::Vector3f &direction, float intensity, bool cast_shadows)=0
virtual void UpdateLightFalloff(const std::string &light_name, float falloff)=0
virtual bool GeometryIsVisible(const std::string &object_name)=0
virtual void UpdateLightDirection(const std::string &light_name, const Eigen::Vector3f &direction)=0
virtual void GeometryShadows(const std::string &object_name, bool cast_shadows, bool receive_shadows)=0
virtual void RemoveCamera(const std::string &camera_name)=0
static const uint32_t kUpdateNormalsFlag
virtual void SetActiveCamera(const std::string &camera_name)=0
virtual void RemoveGeometry(const std::string &object_name)=0
static const uint32_t kUpdatePointsFlag
virtual void EnableSunLight(bool enable)=0
virtual void RemoveLight(const std::string &light_name)=0
virtual void EnableLightShadow(const std::string &light_name, bool cast_shadows)=0
virtual void UpdateGeometry(const std::string &object_name, const t::geometry::PointCloud &point_cloud, uint32_t update_flags)=0
virtual bool AddGeometry(const std::string &object_name, const ccHObject &geometry, const MaterialRecord &material, const std::string &downsampled_name="", size_t downsample_threshold=SIZE_MAX)=0
virtual void SetSunLight(const Eigen::Vector3f &direction, const Eigen::Vector3f &color, float intensity)=0
virtual void SetIndirectLightIntensity(float intensity)=0
virtual void UpdateLightColor(const std::string &light_name, const Eigen::Vector3f &color)=0
virtual bool SetIndirectLight(const std::string &ibl_name)=0
static const uint32_t kUpdateColorsFlag
virtual void SetGeometryCulling(const std::string &object_name, bool enable)=0
virtual void RenderToImage(std::function< void(std::shared_ptr< geometry::Image >)> callback)=0
Size of image is the size of the window.
virtual bool HasGeometry(const std::string &object_name) const =0
virtual void UpdateLightConeAngles(const std::string &light_name, float inner_cone_angle, float outer_cone_angle)=0
static const uint32_t kUpdateUv0Flag
virtual void UpdateLightPosition(const std::string &light_name, const Eigen::Vector3f &position)=0
virtual void AddCamera(const std::string &camera_name, std::shared_ptr< Camera > cam)=0
virtual bool AddSpotLight(const std::string &light_name, const Eigen::Vector3f &color, const Eigen::Vector3f &position, const Eigen::Vector3f &direction, float intensity, float falloff, float inner_cone_angle, float outer_cone_angle, bool cast_shadows)=0
virtual void ShowGeometry(const std::string &object_name, bool show)=0
virtual void EnableIndirectLight(bool enable)=0
virtual void SetSampleCount(int n)=0
virtual void SetColorGrading(const ColorGradingParams &color_grading)=0
virtual Camera * GetCamera() const =0
virtual void SetShadowing(bool enabled, ShadowType type)=0
virtual void SetAmbientOcclusion(bool enabled, bool ssct_enabled=false)=0
virtual void SetPostProcessing(bool enabled)=0
virtual void SetAntiAliasing(bool enabled, bool temporal=false)=0
std::shared_ptr< geometry::Image > RenderToImageWithoutWindow(rendering::CloudViewerScene *scene, int width, int height)
std::shared_ptr< geometry::Image > RenderToDepthImageWithoutWindow(rendering::CloudViewerScene *scene, int width, int height, bool z_in_view_space)
void InitializeForPython(std::string resource_path, bool headless)
REHandle< EntityType::Texture > TextureHandle
void pybind_rendering(py::module &m)
void pybind_rendering_classes(py::module &m_rendering)
Generic file read and write utility for python interface.
std::unordered_map< std::string, geometry::Image > generic_imgs
std::shared_ptr< geometry::Image > normal_img
std::shared_ptr< geometry::Image > clearcoat_roughness_img
Eigen::Vector3f absorption_color
std::shared_ptr< geometry::Image > clearcoat_img
std::shared_ptr< geometry::Image > albedo_img
std::shared_ptr< geometry::Image > ao_rough_metal_img
std::unordered_map< std::string, Eigen::Vector4f > generic_params
std::shared_ptr< geometry::Image > ao_img
float base_clearcoat_roughness
std::shared_ptr< geometry::Image > metallic_img
Eigen::Vector4f emissive_color
std::shared_ptr< Gradient > gradient
std::shared_ptr< geometry::Image > roughness_img
float absorption_distance
std::shared_ptr< geometry::Image > anisotropy_img
std::shared_ptr< geometry::Image > reflectance_img
Eigen::Vector4f base_color
unsigned int material_idx
std::shared_ptr< ccMesh > mesh
std::vector< MeshInfo > meshes_
std::vector< visualization::rendering::MaterialRecord > materials_