SCENE C++ API  2.0.22
Public Member Functions | Static Public Member Functions | List of all members
LSProject Class Reference

Interface to access information and functionality of SCENE projects. More...

#include <lsproject.h>

+ Inheritance diagram for LSProject:

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 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...
 
- Public Member Functions inherited from LSWorkspace
ref_ptr< LSObjectgetRootObject () 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< LSPointCloudgetPointCloud () 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< LSPointSelectiongetPointSelection () 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 loadProject (LSString projectPath, ref_ptr< LSProject > &projectOut, bool readOnly=false)
 Opens the project at the specified location. More...
 

Additional Inherited Members

- Public Attributes inherited from LSWorkspace
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...
 
- Protected Member Functions inherited from LSRefType
void ref () const
 Increments the internal reference counter. More...
 
void unref () const
 Decrements the internal reference counter. More...
 

Detailed Description

Interface to access information and functionality of SCENE projects.

Version
SCENE API Version 2.0.0.

Constructor & Destructor Documentation

◆ ~LSProject()

~LSProject ( )

Destroys the workspace.

Version
SCENE API Version 2.0.0.

Member Function Documentation

◆ createProject()

static LSResult::Result createProject ( LSString  projectPath,
LSString  projectName 
)
static

Creates a new project at the specified location.

Parameters
projectPathThe file system path to folder where the project will be created.
projectNameThe name of the project to be created.
Returns
An LSResult result code.
Version
SCENE API Version 2.0.0.

◆ loadProject()

static LSResult::Result loadProject ( LSString  projectPath,
ref_ptr< LSProject > &  projectOut,
bool  readOnly = false 
)
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'.

Parameters
projectPathThe file system path to the project folder or project file to be loaded.
projectOutOut parameter in which the project instance is provided if the workspace was successfully loaded.
readOnlyWhether the project should be loaded read-only.
Returns
An LSResult result code.
Version
SCENE API Version 2.0.0.

◆ saveRevision()

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.

Parameters
commitMessageThe commit message for the revision.
authorThe author of the revision.
updateProjectPointCloudWhether the project point cloud should be updated during the commit.
Returns
An LSResult result code.
Version
SCENE API Version 2.0.0.

◆ getProjectName()

LSString getProjectName ( ) const

Gets the project name of this project.

Version
SCENE API Version 2.0.0.

◆ getProjectPath()

LSString getProjectPath ( ) const

Gets the file system path to the project folder of this project.

Version
SCENE API Version 2.0.0.

◆ getProjectFilePath()

LSString getProjectFilePath ( ) const

Gets the file system path to the project file of this project.

Version
SCENE API Version 2.0.0.

◆ cleanRevisions()

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.

Returns
An LSResult result code. InvalidRequest is returned when there are unsaved changes.
Version
SCENE API Version 2.0.19.