ICompositeContainer.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Container for sequence of composite meshes
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 #ifndef _ICOMPOSITECONTAINER_H_
11 #define _ICOMPOSITECONTAINER_H_
12 
13 #include <artec/sdk/base/Errors.h>
15 #include <artec/sdk/base/IRef.h>
16 #include <artec/sdk/base/Matrix.h>
17 
18 namespace artec { namespace sdk { namespace base
19 {
20 
21 class IBlob;
22 class ICompositeMesh;
23 class ICompositeContainer;
24 
25 extern "C"
26 {
27  /**
28  * Create new CompositeContainer
29  * @param pContainer - destination CompositeContainer
30  *
31  * @return
32  * error code
33  */
34  ErrorCode ABASESDK_LINK_SPEC createCompositeContainer(ICompositeContainer** pContainer);
35 
36  /**
37  * clone all CompositeContainer content
38  * @param out - destination CompositeContainer
39  * @param in - CompositeContainer to take elements from
40  *
41  * @return
42  * error code
43  */
44  ErrorCode ABASESDK_LINK_SPEC cloneCompositeContainer(ICompositeContainer* out, const ICompositeContainer* in);
45 }
46 
47 class ICompositeContainer : public IRef
48 {
49  /*
50  * This is a CompositeMesh container with transformation and some
51  * additional information on each surface
52  */
53 public:
54  // Element operations
55 
56  /// Element access. Index must be in range [0...getSize())
57  virtual ICompositeMesh* getElement(int index) const = 0;
58  virtual ErrorCode setElement(int index, ICompositeMesh* mesh) = 0;
59 
60  /// Add/remove composite mesh to container
61  virtual ErrorCode add(ICompositeMesh* mesh) = 0;
62  virtual ErrorCode add(ICompositeMesh* mesh, const Matrix4x4D& transformMatrix, IBlob* meshAttributes = NULL) = 0;
63  virtual ErrorCode remove(int index) = 0;
64 
65  /// Access composite mesh orientation by index
66  virtual const Matrix4x4D& getTransformation(int index) const = 0;
67  virtual ErrorCode setTransformation(int index, const Matrix4x4D& transformMatrix) = 0;
68 
69  /// Get composite mesh attributes by index
70  virtual IBlob* getAttributes(int index) const = 0;
71  virtual ErrorCode setAttributes(int index, IBlob* attributes) = 0;
72 
73 
74  // Container operations
75 
76  /// Get container transformation
77  virtual const Matrix4x4D& getContainerTransformation() const = 0;
78  virtual void setContainerTransformation(const Matrix4x4D& transformMatrix) = 0;
79 
80  /// Get container attributes by index
81  virtual IBlob* getContainerAttributes() const = 0;
82  virtual void setContainerAttributes(IBlob* attributes) = 0;
83 
84 
85  // Container operations
86 
87  /// Get element number in container
88  virtual int getSize() const = 0;
89 
90  /// Delete all container elements
91  virtual void clear() = 0;
92 };
93 
94 } } } // namespace artec::sdk::base
95 
96 #endif // _IPOLYSCAN_H_
virtual ErrorCode setAttributes(int index, IBlob *attributes)=0
ErrorCode ABASESDK_LINK_SPEC cloneCompositeContainer(ICompositeContainer *out, const ICompositeContainer *in)
virtual void setContainerAttributes(IBlob *attributes)=0
virtual IBlob * getAttributes(int index) const =0
Get composite mesh attributes by index.
virtual ErrorCode add(ICompositeMesh *mesh)=0
Add/remove composite mesh to container.
ErrorCode ABASESDK_LINK_SPEC createCompositeContainer(ICompositeContainer **pContainer)
virtual void clear()=0
Delete all container elements.
virtual IBlob * getContainerAttributes() const =0
Get container attributes by index.
virtual void setContainerTransformation(const Matrix4x4D &transformMatrix)=0
virtual int getSize() const =0
Get element number in container.
virtual const Matrix4x4D & getContainerTransformation() const =0
Get container transformation.
virtual ErrorCode setTransformation(int index, const Matrix4x4D &transformMatrix)=0
virtual const Matrix4x4D & getTransformation(int index) const =0
Access composite mesh orientation by index.
#define ABASESDK_LINK_SPEC
Definition: BaseSdkDefines.h:7
virtual ErrorCode setElement(int index, ICompositeMesh *mesh)=0
virtual ICompositeMesh * getElement(int index) const =0
Element access. Index must be in range [0...getSize())