Class representing a fused point cloud and containing the geometric and color data of the scene captured by the spatial mapping module. More...
Types | |
typedef std::vector< size_t > | chunkList |
Vector of chunks id. More... | |
Functions | |
FusedPointCloud () | |
Default constructor. More... | |
~FusedPointCloud () | |
Default destructor. More... | |
PointCloudChunk & | operator[] (int index) |
Defines the [] operator to directly access the desired chunk. More... | |
size_t | getNumberOfPoints () |
Computes the total number of points stored in all chunks. More... | |
void | updateFromChunkList (chunkList IDs=chunkList()) |
Updates vertices and normals from chunk data pointed by the given sl::Mesh::chunkList. More... | |
bool | save (String filename, MESH_FILE_FORMAT type=MESH_FILE_FORMAT::OBJ, chunkList IDs=chunkList()) |
Saves the current sl::FusedPointCloud into a file. More... | |
bool | load (String filename, bool update_chunk_only=false) |
Loads the fused point cloud from a file. More... | |
void | clear () |
Clears all the data. More... | |
Attributes | |
std::vector< PointCloudChunk > | chunks |
List of chunks constituting the sl::FusedPointCloud. More... | |
std::vector< float4 > | vertices |
Vector of vertices. More... | |
std::vector< float3 > | normals |
Vector of normals. More... | |
Class representing a fused point cloud and containing the geometric and color data of the scene captured by the spatial mapping module.
By default the fused point cloud is defined as a set of point cloud chunks.
This way we update only the required data, avoiding a time consuming remapping process every time a small part of the sl::FusedPointCloud cloud is changed.
typedef std::vector<size_t> chunkList |
Vector of chunks id.
FusedPointCloud | ( | ) |
Default constructor.
Creates an empty sl::FusedPointCloud.
~FusedPointCloud | ( | ) |
Default destructor.
PointCloudChunk& operator[] | ( | int | index | ) |
Defines the [] operator to directly access the desired chunk.
size_t getNumberOfPoints | ( | ) |
Computes the total number of points stored in all chunks.
Updates vertices and normals from chunk data pointed by the given sl::Mesh::chunkList.
IDs | : Indices of chunks which will be concatenated. Default: (empty). |
bool save | ( | String | filename, |
MESH_FILE_FORMAT | type = MESH_FILE_FORMAT::OBJ , |
||
chunkList | IDs = chunkList() |
||
) |
Saves the current sl::FusedPointCloud into a file.
filename | : Path of the file to store the fused point cloud in. |
type | : File extension type. Default: sl::MESH_FILE_FORMAT::OBJ. |
IDs | : Set of chunks to be saved. Default: (empty) (all chunks are saved) |
bool load | ( | String | filename, |
bool | update_chunk_only = false |
||
) |
Loads the fused point cloud from a file.
filename | : Path of the file to load the fused point cloud from. |
update_chunk_only | : Whether to only load data in chunks (and not vertices / normals). Default: false. |
void clear | ( | ) |
Clears all the data.
std::vector<PointCloudChunk> chunks |
List of chunks constituting the sl::FusedPointCloud.
std::vector<float4> vertices |
Vector of vertices.
Vertices are defined by a colored 3D point {x, y, z, rgba}
.
std::vector<float3> normals |
Vector of normals.
Normals are defined by three components {nx, ny, nz}
.