62 lines
1.6 KiB
C
Raw Normal View History

2026-03-10 23:59:59 +08:00
#ifndef POINT_CLOUD_LOADER_H
#define POINT_CLOUD_LOADER_H
#include "../../include/VZNL_Types.h"
#include "../../src/ErrorCodes.h"
/**
* @brief Load point cloud from TXT file
*
* @param [in] filename Path to TXT file
* @param [out] outPoints Output point array (allocated by function)
* @param [out] outRows Output row count
* @param [out] outCols Output column count
* @param [out] errCode Error code output
* @return 0 on success, non-zero on error
*
* @pre filename != nullptr
* @pre outPoints != nullptr
* @pre outRows != nullptr
* @pre outCols != nullptr
* @pre errCode != nullptr
*
* @post If return value is 0, outPoints contains allocated array
* @post Caller must free outPoints using delete[]
*/
int LoadTxtFile(
const char* filename,
SVzNLPointXYZ** outPoints,
int* outRows,
int* outCols,
int* errCode
);
/**
* @brief Load point cloud from PCD file
*
* @param [in] filename Path to PCD file
* @param [out] outPoints Output point array (allocated by function)
* @param [out] outRows Output row count
* @param [out] outCols Output column count
* @param [out] errCode Error code output
* @return 0 on success, non-zero on error
*
* @pre filename != nullptr
* @pre outPoints != nullptr
* @pre outRows != nullptr
* @pre outCols != nullptr
* @pre errCode != nullptr
*
* @post If return value is 0, outPoints contains allocated array
* @post Caller must free outPoints using delete[]
*/
int LoadPcdFile(
const char* filename,
SVzNLPointXYZ** outPoints,
int* outRows,
int* outCols,
int* errCode
);
#endif // POINT_CLOUD_LOADER_H