![]() |
SCENE C++ API
2.0.31
|
Interface to access information and functionality of SCENE projects. More...
#include <lsproject.h>
Public Member Functions | |
~LSProject () | |
Destroys the workspace. More... | |
LSResult::Result | saveRevision (LSString commitMessage=L"", LSString author=L"", bool updateProjectPointCloud=false) |
Saves the current workspace state to a new revision within the loaded project. More... | |
LSString | getProjectName () const |
Gets the project name of this project. More... | |
LSString | getUuid () const |
Returns the unique id of this project. More... | |
LSString | getProjectPath () const |
Gets the file system path to the project folder of this project. More... | |
LSString | getProjectFilePath () const |
Gets the file system path to the project file of this project. More... | |
LSResult::Result | cleanRevisions () |
Creates a new base revision for the loaded project. More... | |
![]() | |
ref_ptr< LSObject > | getRootObject () const |
Gets the root object of the workspace object tree. More... | |
LSPod< std::vector< ref_ptr< LSScan > > > | getScans () const |
Convenience function to acquire a list of all scans which are part of the object tree. More... | |
bool | importData (const LSString &filePath) |
Imports data from a file into this workspace. More... | |
LSPod< std::vector< ref_ptr< LSObject > > > | getSelectedObjects () const |
Gets the current list of selected objects with this workspace. More... | |
ref_ptr< LSPointCloud > | getPointCloud () const |
Gets the project point cloud of this workspace. More... | |
LSResult::Result | createPointCloud () |
Creates a project point cloud of all scans in that workspace. More... | |
LSResult::Result | deletePointCloud () |
Deletes the project point cloud. More... | |
ref_ptr< LSPointSelection > | getPointSelection () const |
Gets the current spatial point selection of this workspace. More... | |
Static Public Member Functions | |
static LSResult::Result | createProject (LSString projectPath, LSString projectName) |
Creates a new project at the specified location. More... | |
static LSResult::Result | createProject (LSString projectPath, LSString projectName, LSString uuid) |
Creates a new project at the specified location. More... | |
static LSResult::Result | loadProject (LSString projectPath, ref_ptr< LSProject > &projectOut, bool readOnly=false) |
Opens the project at the specified location. More... | |
static LSPod< std::vector< ref_ptr< LSProjectMetadata > > > | listScannerProjects (const LSString &inputDirectory, bool recursive=true) |
Scan a given path and return metadata of all contained FARO projects. More... | |
static LSResult::Result | importScannerProject (const LSString &projectPath, const ref_ptr< LSProjectMetadata > &metadata) |
Import a scanner project into an existing project. More... | |
Additional Inherited Members | |
![]() | |
LSSignal< ref_ptr< LSWorkspaceEvent > > | onObjectSelectionChanged |
Dispatched when the object selection has changed. More... | |
LSSignal< ref_ptr< LSWorkspaceEvent > > | onPointSelectionChanged |
Dispatched when the point selection has changed. More... | |
![]() | |
void | ref () const |
Increments the internal reference counter. More... | |
void | unref () const |
Decrements the internal reference counter. More... | |
Interface to access information and functionality of SCENE projects.
~LSProject | ( | ) |
Destroys the workspace.
|
static |
Creates a new project at the specified location.
projectPath | The file system path to folder where the project will be created. |
projectName | The name of the project to be created. |
|
static |
Creates a new project at the specified location.
projectPath | The file system path to folder where the project will be created. |
projectName | The name of the project to be created. |
uuid | The UUID of the project to be created. The UUID is expected to be of the windows API GUID structure type (guiddef.h) If the UUID is empty a new UUID will be generated. If the provided UUID is not valid this call will fail and return with InvalidRequest. |
|
static |
Opens the project at the specified location.
When working with the Standalone API you should also call LSStandaloneContext::setCurrentWorkspace() after successfully loading a project. A compatibility issue may occur if the project to be loaded contains objects that are only available in a newer SCENE versions. The project can still be open as 'Read-Only'.
projectPath | The file system path to the project folder or project file to be loaded. |
projectOut | Out parameter in which the project instance is provided if the workspace was successfully loaded. |
readOnly | Whether the project should be loaded read-only. |
LSResult::Result saveRevision | ( | LSString | commitMessage = L"" , |
LSString | author = L"" , |
||
bool | updateProjectPointCloud = false |
||
) |
Saves the current workspace state to a new revision within the loaded project.
commitMessage | The commit message for the revision. |
author | The author of the revision. |
updateProjectPointCloud | Whether the project point cloud should be updated during the commit. |
LSString getProjectName | ( | ) | const |
Gets the project name of this project.
LSString getUuid | ( | ) | const |
Returns the unique id of this project.
LSString getProjectPath | ( | ) | const |
Gets the file system path to the project folder of this project.
LSString getProjectFilePath | ( | ) | const |
Gets the file system path to the project file of this project.
LSResult::Result cleanRevisions | ( | ) |
Creates a new base revision for the loaded project.
All previous revisions are either immediately deleted or marked as obsolete. Currently opened 2D views and 3D views get closed.
|
static |
Scan a given path and return metadata of all contained FARO projects.
This method is intended to list scan projects from Focus or Freestyle SD cards. However, it can also find and list normal SCENE projects. This method is restricted and only available with a corresponding API key.
inputDirectory | File system path to the input directory. |
recursive | If True all subdirectories will be scanned recursively. Default value is true. |
|
static |
Import a scanner project into an existing project.
The existing target project is specified by a path to the project file. The scanner project to be imported is specified by a meta data object created by LSProject::listScannerProjects(). This method is only intended for importing scanner projects from SD cards or USB sticks created by Freestyle and Focus devices. To import SCENE projects or workspaces use LSWorkspace::importData(). This method is restricted and only available with a corresponding API key.
projectPath | File system path to the target project folder or project file. The project has to be a valid SCENE project. |
metadata | The meta data container (obtained from LSProject::listScannerProjects()) defining the project to import. |