Artec 3D Scanning SDK  2.0
ITexture.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Reference counting. Base class for all interfaces.
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _ITEXTURE_H_
12 #define _ITEXTURE_H_
13 
15 #include <artec/sdk/base/IRef.h>
16 #include <artec/sdk/base/IArray.h>
17 #include <artec/sdk/base/IImage.h>
18 
19 namespace artec { namespace sdk { namespace base
20 {
21 
22 class IImage;
23 class ITexture;
24 
25 extern "C"
26 {
27 
29  createTexture(ITexture** texture, IImage* image = NULL, int trianglesIndexCount = 0, int UVIndexCount = 0, int UVCoordinatesCount = 0);
30 
31 }
32 
33 /**
34 * Common texture handling interface.
35 */
36 class ITexture : public IRef
37 {
38 public:
39  /** Get textured triangles
40  *
41  * @return
42  * Pointer to the array of triangle indices. Don't confuse them with vertex indices!
43  */
44  virtual IArrayInt* getTexturedTriangles() const = 0;
45 
46  /** Set the array of textured triangles.
47  *
48  * @param triangles Pointer to the array of triangle indices.
49  */
50  virtual void setTexturedTriangles(IArrayInt* triangles) = 0;
51 
52  /** Get triplets of UV coordinate indices for the textured triangles.
53  *
54  * @return
55  * Pointer to the array of IndexTriplet containing indices of the UV coordinates.
56  */
57  virtual IArrayIndexTriplet* getTrianglesUVIndices() const = 0;
58 
59  /** Set triplets of indices of UV coordinates for the textured triangles.
60  *
61  * @param index Pointer to the array of IndexTriplet containing indices of the UV coordinates.
62  */
63  virtual void setTrianglesUVIndices(IArrayIndexTriplet* index) = 0;
64 
65  /** Get UV (texture) coordinates.
66  *
67  * @return
68  * Pointer to the array of UVCoordinates (texture coordinates).
69  */
70  virtual IArrayUVCoordinates* getUVCoordinates() const = 0;
71 
72  /** Set UV (texture) coordinates.
73  *
74  * @param coords Pointer to the array of UVCoordinates (texture coordinates).
75  */
76  virtual void setUVCoordinates(IArrayUVCoordinates* coords) = 0;
77 
78  /** Get texture image.
79  *
80  * @return
81  * Pointer to the IImage object representing texture.
82  */
83  virtual IImage* getImage() const = 0;
84 
85  /** Set texture image.
86  *
87  * @param image Pointer to the IImage object.
88  */
89  virtual void setImage(IImage* image) = 0;
90 
91  /** Clear all texture contents. Release all Arrays and image.
92  */
93  virtual void clear() = 0;
94 
95  /** Check whether the texture is initialized.
96  */
97  virtual bool isEmpty() const = 0;
98 };
99 
100 } } } // namespace artec::sdk::base
101 
102 #endif // _ITEXTURE_H_
virtual IImage * getImage() const =0
Get texture image.
virtual void setTexturedTriangles(IArrayInt *triangles)=0
Set the array of textured triangles.
Interface for common raster image objects.
Definition: IImage.h:126
Common texture handling interface.
Definition: ITexture.h:36
virtual void setTrianglesUVIndices(IArrayIndexTriplet *index)=0
Set triplets of indices of UV coordinates for the textured triangles.
Interface for array of integer data that supports smart reference counting.
Definition: IArray.h:79
virtual void setUVCoordinates(IArrayUVCoordinates *coords)=0
Set UV (texture) coordinates.
virtual IArrayInt * getTexturedTriangles() const =0
Get textured triangles.
virtual void clear()=0
Clear all texture contents.
virtual IArrayUVCoordinates * getUVCoordinates() const =0
Get UV (texture) coordinates.
Interface for array of texture coordinates that supports smart reference counting.
Definition: IArray.h:111
virtual IArrayIndexTriplet * getTrianglesUVIndices() const =0
Get triplets of UV coordinate indices for the textured triangles.
virtual void setImage(IImage *image)=0
Set texture image.
virtual bool isEmpty() const =0
Check whether the texture is initialized.
#define ABASESDK_LINK_SPEC
Interface that implements reference counting and life-time management.
Definition: IRef.h:22
ErrorCode ABASESDK_LINK_SPEC createTexture(ITexture **texture, IImage *image=NULL, int trianglesIndexCount=0, int UVIndexCount=0, int UVCoordinatesCount=0)
Interface for array of triangles (relationship between vertices).
Definition: IArray.h:162