fw4spl
MeshGetter.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWDATATOOLS_HELPER_MESHGETTER_HPP__
8 #define __FWDATATOOLS_HELPER_MESHGETTER_HPP__
9 
10 #include "fwDataTools/config.hpp"
11 #include "fwDataTools/helper/ArrayGetter.hpp"
12 
13 #include <fwData/Mesh.hpp>
14 
15 #include <fwMemory/BufferObject.hpp>
16 
17 #include <fwTools/Type.hpp>
18 
19 namespace fwDataTools
20 {
21 
22 namespace helper
23 {
24 
28 class FWDATATOOLS_CLASS_API MeshGetter
29 {
30 public:
31  FWDATATOOLS_API MeshGetter( ::fwData::Mesh::csptr mesh );
32 
33  FWDATATOOLS_API virtual ~MeshGetter();
34 
36  FWDATATOOLS_API ::fwData::Mesh::ConstPointsMultiArrayType getPoints() const;
38  FWDATATOOLS_API ::fwData::Mesh::ConstCellTypesMultiArrayType getCellTypes() const;
40  FWDATATOOLS_API ::fwData::Mesh::ConstCellDataMultiArrayType getCellData() const;
42  FWDATATOOLS_API ::fwData::Mesh::ConstCellDataOffsetsMultiArrayType getCellDataOffsets() const;
44  FWDATATOOLS_API ::fwData::Mesh::ConstPointColorsMultiArrayType getPointColors() const;
46  FWDATATOOLS_API ::fwData::Mesh::ConstCellColorsMultiArrayType getCellColors() const;
48  FWDATATOOLS_API ::fwData::Mesh::ConstPointNormalsMultiArrayType getPointNormals() const;
50  FWDATATOOLS_API ::fwData::Mesh::ConstCellNormalsMultiArrayType getCellNormals() const;
52  FWDATATOOLS_API ::fwData::Mesh::ConstPointTexCoordsMultiArrayType getPointTexCoords() const;
54  FWDATATOOLS_API ::fwData::Mesh::ConstCellTexCoordsMultiArrayType getCellTexCoords() const;
55 
57  FWDATATOOLS_API ::fwData::Mesh::csptr getMesh() const;
58 
63  FWDATATOOLS_API bool isClosed();
64 
65 protected:
66 
67  ::fwData::Mesh::csptr m_mesh;
68 
69  ::fwDataTools::helper::ArrayGetter::uptr m_helperPoints;
70  ::fwDataTools::helper::ArrayGetter::uptr m_helperCellTypes;
71  ::fwDataTools::helper::ArrayGetter::uptr m_helperCellData;
72  ::fwDataTools::helper::ArrayGetter::uptr m_helperCellDataOffsets;
73  ::fwDataTools::helper::ArrayGetter::uptr m_helperPointColors;
74  ::fwDataTools::helper::ArrayGetter::uptr m_helperCellColors;
75  ::fwDataTools::helper::ArrayGetter::uptr m_helperPointNormals;
76  ::fwDataTools::helper::ArrayGetter::uptr m_helperCellNormals;
77  ::fwDataTools::helper::ArrayGetter::uptr m_helperPointTexCoords;
78  ::fwDataTools::helper::ArrayGetter::uptr m_helperCellTexCoords;
79 
80 };
81 
82 
83 } // namespace helper
84 
85 } // namespace fwData
86 
87 #endif // __FWDATATOOLS_HELPER_MESHGETTER_HPP__
The namespace fwDataTools contains classes which provide helpers to manipulate fwData::Object. *.
Helper to manage Mesh. Lock the mesh buffer before to modify it.
Definition: MeshGetter.hpp:28