Artec 3D Scanning SDK  2.0
IFrameMesh.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 _IFRAMEMESH_H_
12 #define _IFRAMEMESH_H_
13 
15 #include <artec/sdk/base/IMesh.h>
16 
17 namespace artec { namespace sdk { namespace base
18 {
19 
20 class IFrameMesh;
21 
22 extern "C"
23 {
24 /**
25 * @brief Create frame mesh.
26 * @param mesh Frame mesh to return.
27 * @param vertexCount Number of points (vertices) to pre-allocate.
28 * @param triangleCount Number of triangles (index triplets) to pre-allocate.
29 */
31  createFrameMesh(IFrameMesh** mesh, int vertexCount = 0, int triangleCount = 0);
32 
33 }
34 
35 /**
36 * @brief Indexed triangle mesh with optional texture.
37 *
38 * @details Designed to store triangulated captured frame. It may contain only one texture.
39 * Note that the texture is applied through the operation of simple projection (unwrapping isn't possible).
40 * @nosubgrouping
41 */
42 class IFrameMesh : public IMesh
43 {
44 public:
45  /**
46  * @brief Check the presence of texture.
47  * @return True if the texture is present.
48  */
49  virtual bool isTextured() const = 0;
50 
51  /// @{ @name Texture access functions
52  /**
53  * @brief Get texture image.
54  * @return Pointer to the Image interface.
55  */
56  virtual IImage* getImage() const = 0;
57 
58  /**
59  * @brief Set texture image.
60  * @param image Pointer to the Image interface.
61  */
62  virtual void setImage(IImage* image) = 0;
63  /// @}
64 
65  /// @{ @name Texture coordinate access functions
66  /**
67  * @brief Get texture coordinate array.
68  * @return Pointer to the texture coordinate array.
69  */
70  virtual IArrayUVCoordinates* getUVCoordinates() const = 0;
71 
72  /**
73  * @brief Set texture coordinate array.
74  * @param coords Pointer to the texture coordinate array.
75  */
76  virtual void setUVCoordinates(IArrayUVCoordinates* coords) = 0;
77  /// @}
78 
79  /**
80  * @brief Map texture on the mesh.
81  * @details Calculate texture coordinates through projection.
82  * @param matrix Projection (calibration) matrix.
83  */
84  virtual ErrorCode mapTexture(const Matrix3x4D& matrix) = 0;
85 };
86 
87 } } } // namespace artec::sdk::base
88 
89 #endif // _IFRAMEMESH_H_
Indexed triangle mesh.
Definition: IMesh.h:32
virtual IArrayUVCoordinates * getUVCoordinates() const =0
Get texture coordinate array.
ErrorCode ABASESDK_LINK_SPEC createFrameMesh(IFrameMesh **mesh, int vertexCount=0, int triangleCount=0)
Create frame mesh.
Interface for common raster image objects.
Definition: IImage.h:126
Indexed triangle mesh with optional texture.
Definition: IFrameMesh.h:42
Matrix of unspecified size.
Definition: GenericMatrix.h:30
virtual ErrorCode mapTexture(const Matrix3x4D &matrix)=0
Map texture on the mesh.
virtual bool isTextured() const =0
Check the presence of texture.
virtual IImage * getImage() const =0
Get texture image.
Interface for array of texture coordinates that supports smart reference counting.
Definition: IArray.h:111
virtual void setImage(IImage *image)=0
Set texture image.
#define ABASESDK_LINK_SPEC
virtual void setUVCoordinates(IArrayUVCoordinates *coords)=0
Set texture coordinate array.