# namespace cogs::conversions

## Overview

    namespace conversions {

    // global functions

    glm::vec3 PclToPosition(const pcl::PointXYZINormal& point);
    glm::vec3 PclToNormal(const pcl::PointXYZINormal& point);
    float PclToIntensity(const pcl::PointXYZINormal& point);
    COGS_API pcl::PointCloud<pcl::PointXYZINormal> CogsScanToPcl(const cogs::Scan& scan);
    COGS_API void PclToCogsPointCloud(const pcl::PointCloud<pcl::PointXYZINormal>& pcl_cloud, std::optional<utils::SpaceDefinition> space_definition, cogs::PointCloud& out_cloud);
    COGS_API bool PclToCogsScan(const pcl::PointCloud<pcl::PointXYZINormal>& pcl_cloud, utils::SpaceDefinition camera_space_definition, const cogs::ScanCameraParams& camera_params, cogs::Scan& out_scan);

    } // namespace conversions

## Detailed Documentation

### Global Functions

    glm::vec3 PclToPosition(const pcl::PointXYZINormal& point)

Extract position from pcl point.

    glm::vec3 PclToNormal(const pcl::PointXYZINormal& point)

Extract normal vector from pcl point.

    float PclToIntensity(const pcl::PointXYZINormal& point)

Extract intensity from pcl point.

    COGS_API pcl::PointCloud<pcl::PointXYZINormal> CogsScanToPcl(const cogs::Scan& scan)

Convert cogs::Scan to pcl::PointCloud.

    COGS_API void PclToCogsPointCloud(const pcl::PointCloud<pcl::PointXYZINormal>& pcl_cloud, std::optional<utils::SpaceDefinition> space_definition, cogs::PointCloud& out_cloud)

Converts pcl::PointCloud to cogs::PointCloud.

    COGS_API bool PclToCogsScan(const pcl::PointCloud<pcl::PointXYZINormal>& pcl_cloud, utils::SpaceDefinition camera_space_definition, const cogs::ScanCameraParams& camera_params, cogs::Scan& out_scan)

Converts pcl::PointCloud to cogs::Scan.