Artec 3D Scanning SDK  2.0
IArray.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Store various data types.
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _IARRAY_H_
12 #define _IARRAY_H_
13 
15 #include <artec/sdk/base/IRef.h>
16 #include <artec/sdk/base/Types.h>
17 #include <artec/sdk/base/Matrix.h>
18 #include <artec/sdk/base/IImage.h>
19 #include <artec/sdk/base/Uuid.h>
20 #include <artec/sdk/base/Errors.h>
21 
22 namespace artec { namespace sdk { namespace base
23 {
24 
25 class IArrayByte;
26 class IArrayInt;
27 class IArrayFloat;
28 class IArrayUVCoordinates;
29 class IArrayPoint3F;
30 class IArrayPoint3D;
31 class IArrayIndexTriplet;
32 class IArrayImage;
33 class IArrayMatrix4x4D;
34 class IArrayUuid;
35 
36 extern "C"
37 {
38 
40  createArrayByte (IArrayByte** pArray, int elementsCount, bool zeroFill = false);
42  createArrayInt (IArrayInt** pArray, int elementsCount, bool zeroFill = false);
44  createArrayFloat (IArrayFloat** pArray, int elementsCount, bool zeroFill = false);
46  createArrayUVCoordinates (IArrayUVCoordinates** pArray, int elementsCount, bool zeroFill = false);
48  createArrayPoint3F (IArrayPoint3F** pArray, int elementsCount, bool zeroFill = false);
50  createArrayPoint3D (IArrayPoint3D** pArray, int elementsCount, bool zeroFill = false);
52  createArrayIndexTriplet (IArrayIndexTriplet** pArray, int elementsCount, bool zeroFill = false);
54  createArrayImage (IArrayImage** pArray, int elementsCount);
56  createArrayMatrix4x4D (IArrayMatrix4x4D** pArray, int elementsCount);
58  createArrayUuid (IArrayUuid** pArray, int elementsCount);
59 }
60 
61 /// Interface for array of bytes with smart reference counting
62 class IArrayByte : public IRef
63 {
64 public:
65  typedef unsigned char elementType;
66 
67  /// Get number of array elements.
68  virtual int getSize() const = 0;
69 
70  /// Get data pointer for reading only.
71  virtual unsigned char* getPointer() const = 0;
72 };
73 
74 /**
75 * Interface for array of integer data
76 * that supports smart reference counting.
77 */
78 
79 class IArrayInt : public IRef
80 {
81 public:
82  typedef int elementType;
83 
84  /// Get Array element count.
85  virtual int getSize() const = 0;
86 
87  /// Get data pointer for reading only.
88  virtual int* getPointer() const = 0;
89 };
90 
91 /**
92 * Interface for array of float data
93 * that supports smart reference counting.
94 */
95 class IArrayFloat : public IRef
96 {
97 public:
98  typedef float elementType;
99 
100  /// Get Array element count.
101  virtual int getSize() const = 0;
102 
103  /// Get data pointer for reading only.
104  virtual float* getPointer() const = 0;
105 };
106 
107 /**
108 * Interface for array of texture coordinates
109 * that supports smart reference counting.
110 */
111 class IArrayUVCoordinates : public IRef
112 {
113 public:
115 
116  /// Get Array element count.
117  virtual int getSize() const = 0;
118 
119  /// Get data pointer for reading only.
120  virtual UVCoordinates* getPointer() const = 0;
121 };
122 
123 /**
124 * Interface for array of point positions (vertices and normal vectors);
125 * F for float type.
126 * It supports smart reference counting.
127 */
128 class IArrayPoint3F : public IRef
129 {
130 public:
132 
133  /// Get Array element count.
134  virtual int getSize() const = 0;
135 
136  /// Get data pointer for reading only.
137  virtual Point3F* getPointer() const = 0;
138 };
139 
140 /**
141 * Interface for array of point positions (vertices and normal vectors);
142 * D for double type.
143 * It supports smart reference counting.
144 */
145 class IArrayPoint3D : public IRef
146 {
147 public:
149 
150  /// Get Array element count.
151  virtual int getSize() const = 0;
152 
153  /// Get data pointer for reading only.
154  virtual Point3D* getPointer() const = 0;
155 };
156 
157 
158 /**
159 * Interface for array of triangles (relationship between vertices).
160 * It supports smart reference counting.
161 */
162 class IArrayIndexTriplet : public IRef
163 {
164 public:
166 
167  /// Get Array element count.
168  virtual int getSize() const = 0;
169 
170  /// Get data pointer for reading only.
171  virtual IndexTriplet* getPointer() const = 0;
172 };
173 
174 /**
175 * Interface for array of textures
176 * that supports smart reference counting.
177 */
178 class IArrayImage : public IRef
179 {
180 public:
182 
183  /// Get Array element count.
184  virtual int getSize() const = 0;
185 
186  /// Get pointer to the image
187  virtual const IImage* getElement(int index) const = 0;
188 
189  /// Set image to array
190  virtual ErrorCode setElement(int index, const IImage* image) = 0;
191 };
192 
193 /**
194 * Interface for array of matrices
195 * that is used in IScan and ICompositeContainer.
196 * It supports smart reference counting.
197 */
198 class IArrayMatrix4x4D : public IRef
199 {
200 public:
202 
203  /// Get Array element count.
204  virtual int getSize() const = 0;
205 
206  /// Get pointer to the string
207  virtual const Matrix4x4D& getElement(int index) const = 0;
208 
209  /// Set string to array
210  virtual ErrorCode setElement(int index, const Matrix4x4D& matrix) = 0;
211 };
212 
213 /**
214 * Interface for array of UUIDs
215 * that is used in IScan and ICompositeContainer.
216 * It supports smart reference counting.
217 */
218 class IArrayUuid : public IRef
219 {
220 public:
221  typedef Uuid elementType;
222 
223  /// Get Array element count.
224  virtual int getSize() const = 0;
225 
226  /// Get pointer to the string
227  virtual const Uuid& getElement(int index) const = 0;
228 
229  /// Set string to array
230  virtual ErrorCode setElement(int index, const Uuid& uuid) = 0;
231 };
232 
233 } } } // namespace artec::sdk::base
234 
235 #endif // _IARRAY_H_
ErrorCode ABASESDK_LINK_SPEC createArrayFloat(IArrayFloat **pArray, int elementsCount, bool zeroFill=false)
virtual int * getPointer() const =0
Get data pointer for reading only.
virtual float * getPointer() const =0
Get data pointer for reading only.
virtual int getSize() const =0
Get Array element count.
Interface for common raster image objects.
Definition: IImage.h:126
Transformation matrix.
Definition: Matrix.h:26
virtual ErrorCode setElement(int index, const Matrix4x4D &matrix)=0
Set string to array.
virtual int getSize() const =0
Get Array element count.
virtual int getSize() const =0
Get Array element count.
ErrorCode ABASESDK_LINK_SPEC createArrayIndexTriplet(IArrayIndexTriplet **pArray, int elementsCount, bool zeroFill=false)
virtual ErrorCode setElement(int index, const IImage *image)=0
Set image to array.
Interface for array of float data that supports smart reference counting.
Definition: IArray.h:95
ErrorCode ABASESDK_LINK_SPEC createArrayInt(IArrayInt **pArray, int elementsCount, bool zeroFill=false)
unsigned char elementType
Definition: IArray.h:65
virtual int getSize() const =0
Get Array element count.
Interface for array of point positions (vertices and normal vectors); D for double type...
Definition: IArray.h:145
virtual int getSize() const =0
Get Array element count.
virtual int getSize() const =0
Get Array element count.
virtual const IImage * getElement(int index) const =0
Get pointer to the image.
virtual const Matrix4x4D & getElement(int index) const =0
Get pointer to the string.
virtual ErrorCode setElement(int index, const Uuid &uuid)=0
Set string to array.
Interface for array of integer data that supports smart reference counting.
Definition: IArray.h:79
virtual Point3F * getPointer() const =0
Get data pointer for reading only.
virtual int getSize() const =0
Get Array element count.
ErrorCode ABASESDK_LINK_SPEC createArrayByte(IArrayByte **pArray, int elementsCount, bool zeroFill=false)
Interface for array of textures that supports smart reference counting.
Definition: IArray.h:178
virtual IndexTriplet * getPointer() const =0
Get data pointer for reading only.
Defines how triangle is formed from points.
Definition: Types.h:71
virtual int getSize() const =0
Get number of array elements.
ErrorCode ABASESDK_LINK_SPEC createArrayPoint3D(IArrayPoint3D **pArray, int elementsCount, bool zeroFill=false)
Interface for array of matrices that is used in IScan and ICompositeContainer.
Definition: IArray.h:198
Texture coordinates.
Definition: Types.h:37
Interface for array of bytes with smart reference counting.
Definition: IArray.h:62
ErrorCode ABASESDK_LINK_SPEC createArrayUuid(IArrayUuid **pArray, int elementsCount)
virtual int getSize() const =0
Get Array element count.
ErrorCode ABASESDK_LINK_SPEC createArrayImage(IArrayImage **pArray, int elementsCount)
Interface for array of texture coordinates that supports smart reference counting.
Definition: IArray.h:111
virtual const Uuid & getElement(int index) const =0
Get pointer to the string.
ErrorCode ABASESDK_LINK_SPEC createArrayMatrix4x4D(IArrayMatrix4x4D **pArray, int elementsCount)
Interface for array of UUIDs that is used in IScan and ICompositeContainer.
Definition: IArray.h:218
virtual Point3D * getPointer() const =0
Get data pointer for reading only.
virtual UVCoordinates * getPointer() const =0
Get data pointer for reading only.
ErrorCode ABASESDK_LINK_SPEC createArrayUVCoordinates(IArrayUVCoordinates **pArray, int elementsCount, bool zeroFill=false)
ErrorCode ABASESDK_LINK_SPEC createArrayPoint3F(IArrayPoint3F **pArray, int elementsCount, bool zeroFill=false)
#define ABASESDK_LINK_SPEC
virtual int getSize() const =0
Get Array element count.
virtual unsigned char * getPointer() const =0
Get data pointer for reading only.
Interface that implements reference counting and life-time management.
Definition: IRef.h:22
Interface for array of point positions (vertices and normal vectors); F for float type...
Definition: IArray.h:128
Interface for array of triangles (relationship between vertices).
Definition: IArray.h:162