1 #ifndef LVR2_CHUNKED_MESH_BRIDGE_HPP_ 2 #define LVR2_CHUNKED_MESH_BRIDGE_HPP_ 11 #include <vtkSmartPointer.h> 13 #include <vtkActorCollection.h> 14 #include <vtkRenderer.h> 15 #include <vtkCamera.h> 27 #include <condition_variable> 29 #include <vtkWeakPointer.h> 48 typedef std::unordered_map<size_t, vtkSmartPointer<vtkActor> >
actorMap;
59 bool operator()(std::pair<float,T> p1, std::pair<float,T> p2)
61 return p1.first > p2.first;
71 std::vector<std::string> layers,
size_t cache_size = 1000);
72 void getActors(
double planes[24],
74 std::vector<size_t >& indices);
80 std::unordered_map<size_t, vtkSmartPointer<vtkActor>>
getHighResActors() {
return m_highResActors; }
81 std::unordered_map<size_t, vtkSmartPointer<vtkActor>>
getLowResActors() {
return m_chunkActors; }
83 void addInitialActors(vtkSmartPointer<vtkRenderer> renderer);
86 std::vector<size_t> indices,
96 void computeMeshActors();
97 inline vtkSmartPointer<vtkActor> computeMeshActor(
size_t&
id,
MeshBufferPtr& chunk);
118 void highResWorker();
120 std::unordered_map<size_t, MeshBufferPtr>
m_chunks;
125 std::unique_ptr<MeshOctree<BaseVector<float> > >
m_oct;
std::condition_variable mw_cond
lvr2::ChunkManager m_chunkManager
std::vector< BaseVector< float > > m_lastCentroids
std::unordered_map< size_t, vtkSmartPointer< vtkActor > > getHighResActors()
std::vector< size_t > m_highResIndices
std::shared_ptr< MeshBuffer > MeshBufferPtr
BoundingBox< BaseVector< float > > m_lastRegion
BoundingBox< BaseVector< float > > m_region
std::unordered_map< size_t, vtkSmartPointer< vtkActor > > actorMap
A dynamic bounding box class.
vtkSmartPointer< vtkRenderer > m_renderer
std::unique_ptr< MeshOctree< BaseVector< float > > > m_oct
std::vector< std::string > m_layers
bool operator()(std::pair< float, T > p1, std::pair< float, T > p2)
std::unordered_map< size_t, MeshBufferPtr > m_chunks
std::condition_variable cond_
std::unordered_map< size_t, MeshBufferPtr > m_highRes
std::unordered_map< size_t, vtkSmartPointer< vtkActor > > m_highResActors
std::unordered_map< size_t, vtkSmartPointer< vtkActor > > getLowResActors()
std::vector< size_t > m_lastIndices
std::unordered_map< size_t, vtkSmartPointer< vtkActor > > m_chunkActors
boost::shared_ptr< LVRChunkedMeshBridge > ChunkedMeshBridgePtr
std::vector< BaseVector< float > > m_highResCentroids
double getHighResDistance()