Artec 3D Scanning SDK  2.0
IProject.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Interface to load/save Arteс Studio projects
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 #pragma once
11 
12 #include <stddef.h>
15 
16 #include <artec/sdk/base/Errors.h>
17 #include <artec/sdk/base/IRef.h>
18 
19 namespace artec { namespace sdk { namespace base {
20 
21 class IJob;
22 class IString;
23 
24 } } }
25 
26 namespace artec { namespace sdk { namespace project {
27 
28 using namespace artec::sdk::base::errors;
29 
32 
33 class IProject;
34 
35 struct ProjectSettings;
36 struct ProjectLoaderSettings;
37 struct ProjectSaverSettings;
38 struct ProjectDeleterSettings;
39 struct ProjectCopierSettings;
40 
41 extern "C"
42 {
43 
44 /**
45 * @brief Create a new project
46 * @param pProject Destination project
47 * @param settings Project creation parameters, e.g. path
48 * @return Error code
49 */
50 ErrorCode APROJECT_LINK_SPEC createNewProject(IProject** pProject, ProjectSettings* settings);
51 
52 /**
53 * @brief Open an existing project
54 * @param pProject Destination project
55 * @param path Project path
56 * @return Error code
57 */
58 ErrorCode APROJECT_LINK_SPEC openProject(IProject** pProject, const wchar_t* path);
59 
60 /// @brief Get maximum supported project version
61 /// @return All projects wits smaller or equal version will be read correctly
62 /// @note If the project version exceeds this value, the project can still be read. Some data, however, might be missing.
64 
65 }
66 
67 
68 /**
69 * @brief Interface for loading/saving Artec Studio projects
70 * @details Use it to fetch scans and ICompositeMesh's objects from Arteс Studio projects, assemble projects from scans and
71 * models (composite meshes) and save them in Arteс Studio format.
72 */
74 {
75 public:
76  /// @brief Get current project version
77  /// @return Current project version
78  virtual int getProjectVersion() = 0;
79 
80  /// @{ @name Functions to create asynchronous job
81 
82  /// @brief Create a job that loads project entries
83  /// @param pLoader A load job to be created
84  /// @param settings Settings for a load operation
85  /// @return Error code
86  virtual ErrorCode createLoader(IJob** pLoader, ProjectLoaderSettings* settings) = 0;
87  /// @brief Create a job that saves the project
88  /// @param pSaver A save job to be created
89  /// @param settings Settings for a save operation
90  /// @return Error code
91  virtual ErrorCode createSaver(IJob** pSaver, ProjectSaverSettings* settings) = 0;
92  /// @brief Create a job that deletes the project
93  /// @note Not implemented yet
94  /// @param pDeleter A delete job to be created
95  /// @param settings Settings for a delete operation
96  /// @return Error code
97  virtual ErrorCode createDeleter(IJob** pDeleter, ProjectDeleterSettings* settings) = 0;
98  /// @brief Create a job that copies the project
99  /// @note Not implemented yet
100  /// @param pCopier a copy job to be created
101  /// @param settings settings for a copy operation
102  /// @return Error code
103  virtual ErrorCode createCopier(IJob** pCopier, ProjectCopierSettings* settings) = 0;
104 
105  /// @}
106 
107 
108  /// @{ @name Functions to manipulate project entry
109 
110  /// @brief Get the number of entries (scans/models) available in the project
111  /// @return A total number of entries (as stated in metadata) available in the project
112  virtual int getEntryCount() const = 0;
113  /// @brief Get an information structure for an entry specified by an index
114  /// @param entryIndex A zero-based entry index [0,..,N-1]
115  /// @param entry An entry structure to be filled in
116  /// @param entryName An entry name to be filled in. Can be NULL if the name is not necessary
117  /// @return Error code
118  virtual ErrorCode getEntry(int entryIndex, EntryInfo* entry, IString** entryName = NULL) const = 0;
119 
120  /// @}
121 }; // class IProject
122 
123 } } }
#define APROJECT_LINK_SPEC
ErrorCode APROJECT_LINK_SPEC openProject(IProject **pProject, const wchar_t *path)
Open an existing project.
Interface for loading/saving Artec Studio projects.
Definition: IProject.h:73
Interface for string with smart reference counting.
Definition: IString.h:33
Interface that represents a basic multithreaded work item; Used by executeJob and launchJob...
Definition: IJob.h:51
ErrorCode APROJECT_LINK_SPEC createNewProject(IProject **pProject, ProjectSettings *settings)
Create a new project.
Point2< Type > project(const Point3< Type > &point, const GenericMatrix< 3, 4, Type > &m)
Definition: Matrix.h:759
Interface that implements reference counting and life-time management.
Definition: IRef.h:22
Information on project entry (scan or model), e.g. its type and identifier.
Definition: EntryInfo.h:11
int APROJECT_LINK_SPEC getMaximumSupportedProjectVersion()
Get maximum supported project version.