ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
drawablegeometry.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
9 
11 
12 namespace cloudViewer {
13 namespace t {
14 namespace geometry {
15 
16 void pybind_drawable_geometry(py::module& m) {
17  py::class_<DrawableGeometry, std::shared_ptr<DrawableGeometry>>
18  drawable_geometry(m, "DrawableGeometry",
19  "Base class for visualizable geometry.");
20  drawable_geometry.def("has_valid_material", &DrawableGeometry::HasMaterial,
21  "Returns true if the geometry's material is valid.");
22  drawable_geometry.def_property(
23  "material", py::overload_cast<>(&DrawableGeometry::GetMaterial),
25 }
26 
27 } // namespace geometry
28 } // namespace t
29 } // namespace cloudViewer
bool HasMaterial() const
Check if a material has been applied to this Geometry with SetMaterial.
void SetMaterial(const visualization::rendering::Material &material)
Set the material properties associate with this Geometry.
visualization::rendering::Material & GetMaterial()
Get material associated with this Geometry.
void pybind_drawable_geometry(py::module &m)
Generic file read and write utility for python interface.