LVRTextureMeshItem.cpp
Go to the documentation of this file.
1 
28 /*
29  * LVRTextureMeshItem.cpp
30  *
31  * Created on: Dec 10, 2014
32  * Author: twiemann
33  */
34 
35 #include "LVRTextureMeshItem.hpp"
36 
37 namespace lvr2
38 {
39 
41  : LVRMeshItem(ptr, parent)
42 {
43  // Super class ctor should insert mesh information, add texture
44  // information here
45  addSubItems();
46 }
47 
49 {
50  QIcon icon;
51  icon.addFile(QString::fromUtf8(":/qv_mesh_texture_icon.png"), QSize(), QIcon::Normal, QIcon::Off);
52 
53  // Add item to parent to display them on the same tree level
54  QTreeWidgetItem* item = new QTreeWidgetItem(m_parent);
55  item->setIcon(0, icon);
56  item->setText(0, "Textures");
57 
58 
59  // Add sub items containing statistics
60  QTreeWidgetItem* texNumItem = new QTreeWidgetItem(item);
61  QString numTextures;
62  texNumItem->setText(0, "Num Textures:");
63  texNumItem->setText(1, numTextures.setNum(m_meshBridge->getNumTextures()));
64  item->addChild(texNumItem);
65 
66  QTreeWidgetItem* colFaceItem = new QTreeWidgetItem(item);
67  QString numColFaces;
68  colFaceItem->setText(0, "Num Colored Tris:");
69  colFaceItem->setText(1, numColFaces.setNum(m_meshBridge->getNumColoredFaces()));
70  item->addChild(colFaceItem);
71 
72  QTreeWidgetItem* texFaceItem = new QTreeWidgetItem(item);
73  QString numTexFaces;
74  texFaceItem->setText(0, "Num Textured Tris:");
75  texFaceItem->setText(1, numTexFaces.setNum(m_meshBridge->getNumTexturedFaces()));
76  item->addChild(texFaceItem);
77 
78  m_parent->addChild(item);
79 }
80 
82 {
83  // TODO Auto-generated destructor stub
84 }
85 
86 } /* namespace lvr2 */
lvr2::MeshBufferBridgePtr
boost::shared_ptr< LVRMeshBufferBridge > MeshBufferBridgePtr
Definition: LVRMeshBufferBridge.hpp:106
lvr2::LVRTextureMeshItem::LVRTextureMeshItem
LVRTextureMeshItem(MeshBufferBridgePtr &ptr, QTreeWidgetItem *parent=0)
Definition: LVRTextureMeshItem.cpp:40
lvr2::LVRMeshItem
Definition: LVRMeshItem.hpp:45
lvr2::LVRMeshItem::m_meshBridge
MeshBufferBridgePtr m_meshBridge
Definition: LVRMeshItem.hpp:66
lvr2::LVRTextureMeshItem::addSubItems
virtual void addSubItems()
Definition: LVRTextureMeshItem.cpp:48
kfusion::device::Normal
float4 Normal
Definition: internal.hpp:13
LVRTextureMeshItem.hpp
lvr2::LVRTextureMeshItem::~LVRTextureMeshItem
virtual ~LVRTextureMeshItem()
Definition: LVRTextureMeshItem.cpp:81
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::LVRMeshItem::m_parent
QTreeWidgetItem * m_parent
Definition: LVRMeshItem.hpp:76


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24