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/Errors.h>
20 
21 namespace artec { namespace sdk { namespace base
22 {
23 
24 class IArrayByte;
25 class IArrayInt;
26 class IArrayFloat;
27 class IArrayUVCoordinates;
28 class IArrayPoint3F;
29 class IArrayPoint3D;
30 class IArrayIndexTriplet;
31 class IArrayString;
32 class IArrayImage;
33 class IArrayMatrix4x4D;
34 
35 extern "C"
36 {
37 
39  createArrayByte (IArrayByte** pArray, int elementsCount, bool zeroFill = false);
41  createArrayInt (IArrayInt** pArray, int elementsCount, bool zeroFill = false);
43  createArrayFloat (IArrayFloat** pArray, int elementsCount, bool zeroFill = false);
45  createArrayUVCoordinates (IArrayUVCoordinates** pArray, int elementsCount, bool zeroFill = false);
47  createArrayPoint3F (IArrayPoint3F** pArray, int elementsCount, bool zeroFill = false);
49  createArrayPoint3D (IArrayPoint3D** pArray, int elementsCount, bool zeroFill = false);
51  createArrayIndexTriplet (IArrayIndexTriplet** pArray, int elementsCount, bool zeroFill = false);
53  createArrayString (IArrayString** pArray, int elementsCount);
55  createArrayImage (IArrayImage** pArray, int elementsCount);
57  createArrayMatrix4x4D (IArrayMatrix4x4D** pArray, int elementsCount);
58 
59 }
60 
61 class IArrayByte : public IRef
62 {
63 public:
64  typedef unsigned char elementType;
65 
66  /// Get Array elements count.
67  virtual int getSize() const = 0;
68 
69  /// Get data pointer for reading only.
70  virtual unsigned char* getPointer() const = 0;
71 };
72 
73 class IArrayInt : public IRef
74 {
75 public:
76  typedef int elementType;
77 
78  /// Get Array elements count.
79  virtual int getSize() const = 0;
80 
81  /// Get data pointer for reading only.
82  virtual int* getPointer() const = 0;
83 };
84 
85 class IArrayFloat : public IRef
86 {
87 public:
88  typedef float elementType;
89 
90  /// Get Array elements count.
91  virtual int getSize() const = 0;
92 
93  /// Get data pointer for reading only.
94  virtual float* getPointer() const = 0;
95 };
96 
97 class IArrayUVCoordinates : public IRef
98 {
99 public:
101 
102  /// Get Array elements count.
103  virtual int getSize() const = 0;
104 
105  /// Get data pointer for reading only.
106  virtual UVCoordinates* getPointer() const = 0;
107 };
108 
109 class IArrayPoint3F : public IRef
110 {
111 public:
113 
114  /// Get Array elements count.
115  virtual int getSize() const = 0;
116 
117  /// Get data pointer for reading only.
118  virtual Point3F* getPointer() const = 0;
119 };
120 
121 class IArrayPoint3D : public IRef
122 {
123 public:
125 
126  /// Get Array elements count.
127  virtual int getSize() const = 0;
128 
129  /// Get data pointer for reading only.
130  virtual Point3D* getPointer() const = 0;
131 };
132 
133 class IArrayIndexTriplet : public IRef
134 {
135 public:
137 
138  /// Get Array elements count.
139  virtual int getSize() const = 0;
140 
141  /// Get data pointer for reading only.
142  virtual IndexTriplet* getPointer() const = 0;
143 };
144 
145 class IArrayString : public IRef
146 {
147 public:
148  /// Get Array elements count.
149  virtual int getSize() const = 0;
150 
151  /// Get pointer to the string
152  virtual const wchar_t* getElement(int index) const = 0;
153 
154  /// set string to array
155  virtual void setElement(int index, const wchar_t* string) = 0;
156 };
157 
158 class IArrayImage : public IRef
159 {
160 public:
162 
163  /// Get Array elements count.
164  virtual int getSize() const = 0;
165 
166  /// Get pointer to the image
167  virtual const IImage* getElement(int index) const = 0;
168 
169  /// set image to array
170  virtual void setElement(int index, const IImage* image) = 0;
171 };
172 
173 class IArrayMatrix4x4D : public IRef
174 {
175 public:
177 
178  /// Get Array elements count.
179  virtual int getSize() const = 0;
180 
181  /// Get pointer to the string
182  virtual Matrix4x4D getElement(int index) const = 0;
183 
184  /// set string to array
185  virtual void setElement(int index, Matrix4x4D matrix) = 0;
186 };
187 
188 } } } // namespace artec::sdk::base
189 
190 #endif // _IARRAY_H_
virtual Point3D * getPointer() const =0
Get data pointer for reading only.
virtual IndexTriplet * getPointer() const =0
Get data pointer for reading only.
ErrorCode ABASESDK_LINK_SPEC createArrayFloat(IArrayFloat **pArray, int elementsCount, bool zeroFill=false)
virtual int getSize() const =0
Get Array elements count.
virtual int getSize() const =0
Get Array elements count.
ErrorCode ABASESDK_LINK_SPEC createArrayIndexTriplet(IArrayIndexTriplet **pArray, int elementsCount, bool zeroFill=false)
virtual int getSize() const =0
Get Array elements count.
virtual void setElement(int index, const IImage *image)=0
set image to array
ErrorCode ABASESDK_LINK_SPEC createArrayInt(IArrayInt **pArray, int elementsCount, bool zeroFill=false)
virtual Matrix4x4D getElement(int index) const =0
Get pointer to the string.
unsigned char elementType
Definition: IArray.h:64
virtual int getSize() const =0
Get Array elements count.
virtual int getSize() const =0
Get Array elements count.
virtual int getSize() const =0
Get Array elements count.
ErrorCode ABASESDK_LINK_SPEC createArrayByte(IArrayByte **pArray, int elementsCount, bool zeroFill=false)
virtual int getSize() const =0
Get Array elements count.
virtual void setElement(int index, const wchar_t *string)=0
set string to array
virtual void setElement(int index, Matrix4x4D matrix)=0
set string to array
virtual float * getPointer() const =0
Get data pointer for reading only.
virtual Point3F * getPointer() const =0
Get data pointer for reading only.
ErrorCode ABASESDK_LINK_SPEC createArrayPoint3D(IArrayPoint3D **pArray, int elementsCount, bool zeroFill=false)
virtual int getSize() const =0
Get Array elements count.
virtual int getSize() const =0
Get Array elements count.
virtual int getSize() const =0
Get Array elements count.
virtual int * getPointer() const =0
Get data pointer for reading only.
ErrorCode ABASESDK_LINK_SPEC createArrayImage(IArrayImage **pArray, int elementsCount)
ErrorCode ABASESDK_LINK_SPEC createArrayMatrix4x4D(IArrayMatrix4x4D **pArray, int elementsCount)
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
Definition: BaseSdkDefines.h:7
virtual const IImage * getElement(int index) const =0
Get pointer to the image.
virtual unsigned char * getPointer() const =0
Get data pointer for reading only.
virtual const wchar_t * getElement(int index) const =0
Get pointer to the string.
ErrorCode ABASESDK_LINK_SPEC createArrayString(IArrayString **pArray, int elementsCount)