MeshLib C++ Docs
Loading...
Searching...
No Matches
MRPythonScene.h
Go to the documentation of this file.
1#pragma once
2
4#include "MRMesh/MRBitSet.h"
6#include "MRMesh/MRMesh.h"
7#include "MRMesh/MRObject.h"
9#include "MRMesh/MRPolyline.h"
10#ifndef MESHLIB_NO_VOXELS
12#endif
13
14#include <memory>
15#include <string>
16#include <vector>
17
19{
20
22void addMeshToScene( const Mesh& mesh, const std::string& name );
23
25void addPointCloudToScene( const PointCloud& points, const std::string& name );
26
28void addLinesToScene( const Polyline3& lines, const std::string& name );
29
31void addDistanceMapToScene( const DistanceMap& distancemap, const std::string& name, const AffineXf3f& dmap_to_local_xf );
32
34void modifySelectedMesh( const Mesh& mesh );
35
37[[nodiscard]] std::vector<FaceBitSet> getSelectedMeshFaces();
38
40[[nodiscard]] std::vector<UndirectedEdgeBitSet> getSelectedMeshEdges();
41
43[[nodiscard]] std::vector<VertBitSet> getSelectedPointCloudPoints();
44
46void setSelectedMeshFaces( const std::vector<FaceBitSet>& bitsets );
47
49void setSelectedMeshEdges( const std::vector<UndirectedEdgeBitSet>& bitsets );
50
52void setSelectedPointCloudPoints( const std::vector<VertBitSet>& bitsets );
53
56
58void selectByName( const std::string& objectName );
59
62void selectByType( const std::string& typeName );
63
66
67[[nodiscard]] std::vector<std::shared_ptr<Object>> getSelectedObjects();
68
70[[nodiscard]] std::vector<Mesh> getSelectedMeshes();
71
73[[nodiscard]] std::vector<PointCloud> getSelectedPointClouds();
74
76[[nodiscard]] std::vector<Polyline3> getSelectedPolylines();
77
79[[nodiscard]] std::vector<DistanceMap> getSelectedDistanceMaps();
80
81#ifndef MESHLIB_NO_VOXELS
83void addVoxelsToScene( const VdbVolume& voxels, const std::string& name );
84
86[[nodiscard]] std::vector<VdbVolume> getSelectedVoxels();
87#endif
88
89}
Definition MRDistanceMap.h:24
Definition MRPythonScene.h:19
void selectByName(const std::string &objectName)
select objects in scene tree with given name, unselect others
std::vector< UndirectedEdgeBitSet > getSelectedMeshEdges()
Get selected edge bitsets of the selected mesh objects.
void setSelectedPointCloudPoints(const std::vector< VertBitSet > &bitsets)
Set selected point bitsets of the selected point cloud objects.
void addDistanceMapToScene(const DistanceMap &distancemap, const std::string &name, const AffineXf3f &dmap_to_local_xf)
Add given distance map to scene tree.
std::vector< Polyline3 > getSelectedPolylines()
Get copies of all selected polylines in the scene.
void unselectAll()
unselect all objects in scene tree
void setSelectedMeshEdges(const std::vector< UndirectedEdgeBitSet > &bitsets)
Set selected edge bitsets of the selected mesh objects.
std::vector< PointCloud > getSelectedPointClouds()
Get copies of all selected point clouds in the scene.
void selectByType(const std::string &typeName)
void addMeshToScene(const Mesh &mesh, const std::string &name)
Add given mesh to scene tree.
std::vector< DistanceMap > getSelectedDistanceMaps()
Get copies of all selected voxel grids in the scene.
void modifySelectedMesh(const Mesh &mesh)
Assign a new mesh to the selected mesh object. Exactly one object must be selected.
void clearScene()
remove all objects from scene tree
void addPointCloudToScene(const PointCloud &points, const std::string &name)
Add given point cloud to scene tree.
void setSelectedMeshFaces(const std::vector< FaceBitSet > &bitsets)
Set selected face bitsets of the selected mesh objects.
std::vector< std::shared_ptr< Object > > getSelectedObjects()
std::vector< FaceBitSet > getSelectedMeshFaces()
Get selected face bitsets of the selected mesh objects.
std::vector< Mesh > getSelectedMeshes()
Get copies of all selected meshes in the scene.
std::vector< VertBitSet > getSelectedPointCloudPoints()
Get selected point bitsets of the selected point cloud objects.
void addLinesToScene(const Polyline3 &lines, const std::string &name)
Add given lines to scene tree.
std::vector< VdbVolume > getSelectedVoxels()
Get copies of all selected voxel grids in the scene.
void addVoxelsToScene(const VdbVolume &voxels, const std::string &name)
Add given voxels to scene tree.
Definition MRMesh.h:24
Definition MRPointCloud.h:17