ICompositeMesh.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: 3D mesh interface implementation - geometry only and textured.
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _ICOMPOSITEMESH_H_
12 #define _ICOMPOSITEMESH_H_
13 
15 #include <artec/sdk/base/IMesh.h>
16 
17 namespace artec { namespace sdk { namespace base
18 {
19 
20 class ITexture;
21 class ICompositeMesh;
22 
23 extern "C"
24 {
25 
27  createCompositeMesh(ICompositeMesh** mesh, int vertexCount = 0, int triangleCount = 0);
28 
29 }
30 
31 class ICompositeMesh : public IMesh
32 {
33 public:
34  /**
35  * Textures access
36  */
37  virtual bool isTextured() const = 0;
38  virtual int getTexturesCount() const = 0;
39 
40  virtual void addTexture(ITexture* texture) = 0;
41  virtual ITexture* getTexture(int index) const = 0;
42 
43  /**
44  * Texture index related functions
45  * Return texture status for i'th triangle of the mesh
46  */
47  virtual bool isTriangleTextured(int i) const = 0;
48 
49  /// Return texture for i'th triangle of the mesh.
50  /// @return For untextured triangles return empty ITexture object without IImage and UV coordinates
51  virtual const ITexture* getTriangleTexture(int i) const = 0;
52 
53  /// Return triple texture coordinates for i'th triangle of the texture
54  virtual TriangleUV getTriangleUV(int i) const = 0;
55 
56  /// Access other data
57  virtual void getTexturedTriangles(const IArrayInt** triangleIndices, const IArrayInt** textureIndices) const = 0;
58  virtual const IArrayInt* getUntexturedTriangles() const = 0;
59 
60  /// Collect textured triangles indices.
61  /// @param clearEmpty - delete texture if UV coordinates or texture image empty.
62  virtual ErrorCode validateTextures(bool clearEmpty = true) = 0;
63 };
64 
65 } } } // namespace artec::sdk::base
66 
67 #endif // _IPOLYMESH_H_
virtual TriangleUV getTriangleUV(int i) const =0
Return triple texture coordinates for i'th triangle of the texture.
virtual bool isTriangleTextured(int i) const =0
virtual ITexture * getTexture(int index) const =0
ErrorCode ABASESDK_LINK_SPEC createCompositeMesh(ICompositeMesh **mesh, int vertexCount=0, int triangleCount=0)
virtual bool isTextured() const =0
virtual const IArrayInt * getUntexturedTriangles() const =0
virtual const ITexture * getTriangleTexture(int i) const =0
virtual ErrorCode validateTextures(bool clearEmpty=true)=0
virtual void addTexture(ITexture *texture)=0
virtual int getTexturesCount() const =0
#define ABASESDK_LINK_SPEC
Definition: BaseSdkDefines.h:7
virtual void getTexturedTriangles(const IArrayInt **triangleIndices, const IArrayInt **textureIndices) const =0
Access other data.