Data Structures

Geometry

Output types from scan integration and mesh/union generation.

struct PointCloud

Non-organized point cloud.

Subclassed by phoim::Scan

Public Functions

inline bool Export(const std::string &file_path) const

Save point cloud to a file.

Note

Supported output file extensions: .ply.

Parameters:

file_path – Full directory including filename and file extension.

Returns:

Return true if the point cloud was successfully exported, false otherwise.

struct Mesh

Non-organized point cloud with faces.

Public Functions

inline bool Export(const std::string &file_path) const

Save mesh to a file.

Note

Supported output file extensions: .stl, .fbx, .ply.

Parameters:

file_path – Full directory including filename and file extension.

Returns:

Return true if the mesh was successfully exported, false otherwise.

struct Scan : public phoim::PointCloud

Organized point cloud with defined resolution (3D scan). The ordering of points is row-major.

Cropping Volumes

Spatial filters passed to SetCroppingVolume and GetMesh.

class CroppingVolume

Abstract class for cropping volumes. It provides the interface for cropping operations on scene. Concrete implementations of cropping volumes are derived from this class, they can be found below this class. Currently supported implementations are Axis-Aligned Bounding Box (AABB) and Sphere. Adding additional types of cropping volumes is not supported.

Subclassed by phoim::CroppingAabb, phoim::CroppingSphere

class CroppingAabb : public phoim::CroppingVolume

Axis-Aligned Bounding Box.

class CroppingSphere : public phoim::CroppingVolume

Shpere.

Scan Batches

Used with AddScanBatch for coupled multi-device scanning.

struct ScanFromBatch

One scan in a batch of scans. Contains all needed information for AddScanBatch function.

Public Members

DeviceId device_id

ID of the device from which the scan originates.

pho::api::PFrame frame

Scan data.

glm::mat4 transformation = INVALID_MATRIX

Complete transformation from camera space of this device to the mesh space. It should consist of relative transformation from camera space of this device to the batch space and optionally also to the mesh space (e.g. robot transformation). In case no robot transformations are available, enter the relative transformation just in the first batch of scans and use INVALID_MATRIX in the following batches and make sure that tracking is enabled.

using phoim::ScanBatch = std::vector<ScanFromBatch>

A series of scans where each scan is obtained from one device from the corresponding device batch simultaneously. These scans are tracked together, resulting in only one transformation for all of them (defined in the space of the first scan).