A fused point cloud contains both geometric and color data of the scene captured by spatial mapping. More...
Types | |
typedef std::vector< size_t > | chunkList |
Functions | |
FusedPointCloud () | |
Default constructor which creates an empty FusedPointCloud. More... | |
~FusedPointCloud () | |
FusedPointCloud destructor. More... | |
PointCloudChunk & | operator[] (int index) |
Defines the [] operator to directly access the desired chunk. More... | |
size_t | getNumberOfPoints () |
Computes the total number of triangles stored in all chunks. More... | |
void | updateFromChunkList (chunkList IDs=chunkList()) |
Updates vertices / normals / colors from chunk data pointed by the given chunkList. More... | |
bool | save (String filename, MESH_FILE_FORMAT type=MESH_FILE_FORMAT::OBJ, chunkList IDs=chunkList()) |
Saves the current fused point cloud 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 |
std::vector< float4 > | vertices |
std::vector< float3 > | normals |
A fused point cloud contains both geometric and color data of the scene captured by spatial mapping.
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 fused point cloud is changed.
typedef std::vector<size_t> chunkList |
FusedPointCloud | ( | ) |
Default constructor which creates an empty FusedPointCloud.
~FusedPointCloud | ( | ) |
FusedPointCloud destructor.
PointCloudChunk& operator[] | ( | int | index | ) |
Defines the [] operator to directly access the desired chunk.
size_t getNumberOfPoints | ( | ) |
Computes the total number of triangles stored in all chunks.
bool save | ( | String | filename, |
MESH_FILE_FORMAT | type = MESH_FILE_FORMAT::OBJ , |
||
chunkList | IDs = chunkList() |
||
) |
Saves the current fused point cloud into a file.
filename | : the path and filename of the mesh. |
type | : defines the file type (extension). default : MESH_FILE_FORMAT::OBJ. |
IDs | : (by default empty) Specifies a set of chunks to be saved, if none provided all chunks are saved. default : (empty). |
bool load | ( | String | filename, |
bool | update_chunk_only = false |
||
) |
Loads the fused point cloud from a file.
filename | : the path and filename of the fused point cloud (do not forget the extension). |
update_chunk_only | : if set to false the fused point cloud data (vertices/normals) are updated otherwise only the chunk data is updated. default : false. |
void clear | ( | ) |
Clears all the data.
std::vector<PointCloudChunk> chunks |
contains the list of chunks
std::vector<float4> vertices |
Vertices are defined by colored 3D points {x, y, z, rgba}.
std::vector<float3> normals |
Normals are defined by three components, {nx, ny, nz}. Normals are defined for each vertex.