| RDB 2

dataTypes.inc
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright 2025 RIEGL Laser Measurement Systems
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * SPDX-License-Identifier: Apache-2.0
19 *
20 *******************************************************************************
21 */
22 /*!
23 *******************************************************************************
24 *
25 * \file dataTypes.inc
26 * \author RIEGL LMS GmbH, Austria
27 * \brief Point attribute access data types
28 * \version 2015-10-14/AW: Initial version
29 *
30 *******************************************************************************
31 */
32
33 //---< INCLUDES >---------------------------------------------------------------
34
35 #include <cstdlib>
36
37 #include "riegl/rdb/pointcloud/dataTypes.h"
38 #include "riegl/rdb/pointcloud/dataTypes.hpp"
39
40 //---< TOOLS >------------------------------------------------------------------
41
42 namespace {
43
44 //______________________________________________________________________________
45 /*!
46 * \brief Convert data type
47 *
48 * This function converts the given buffer data type from integer to enum.
49 */
50 riegl::rdb::pointcloud::DataType convertDataType(const std::uint32_t &value)
51 {
52 switch (value)
53 {
54 case RDBDataTypeUINT8: return riegl::rdb::pointcloud::UINT8;
55 case RDBDataTypeINT8: return riegl::rdb::pointcloud::INT8;
56 case RDBDataTypeUINT16: return riegl::rdb::pointcloud::UINT16;
57 case RDBDataTypeINT16: return riegl::rdb::pointcloud::INT16;
58 case RDBDataTypeUINT32: return riegl::rdb::pointcloud::UINT32;
59 case RDBDataTypeINT32: return riegl::rdb::pointcloud::INT32;
60 case RDBDataTypeUINT64: return riegl::rdb::pointcloud::UINT64;
61 case RDBDataTypeINT64: return riegl::rdb::pointcloud::INT64;
62 case RDBDataTypeSINGLE: return riegl::rdb::pointcloud::SINGLE;
63 case RDBDataTypeDOUBLE: return riegl::rdb::pointcloud::DOUBLE;
64 default: return riegl::rdb::pointcloud::NONE;
65 }
66 } // convertDataType()
67
68 } // anonymous namespace
riegl::rdb::pointcloud::INT64
64 bit signed integer
Definition: dataTypes.hpp:66
riegl::rdb::pointcloud::DataType
DataType
Point attribute access data type.
Definition: dataTypes.hpp:56
riegl::rdb::pointcloud::NONE
undefined data type
Definition: dataTypes.hpp:58
riegl::rdb::pointcloud::UINT8
8 bit unsigned integer
Definition: dataTypes.hpp:59
riegl::rdb::pointcloud::UINT64
64 bit unsigned integer
Definition: dataTypes.hpp:65
riegl::rdb::pointcloud::DOUBLE
64 bit double precision floating point value
Definition: dataTypes.hpp:68
riegl::rdb::pointcloud::INT8
8 bit signed integer
Definition: dataTypes.hpp:60
riegl::rdb::pointcloud::INT16
16 bit signed integer
Definition: dataTypes.hpp:62
riegl::rdb::pointcloud::SINGLE
32 bit single precision floating point value
Definition: dataTypes.hpp:67
riegl::rdb::pointcloud::INT32
32 bit signed integer
Definition: dataTypes.hpp:64
dataTypes.hpp
Point attribute access data types.
riegl::rdb::pointcloud::UINT16
16 bit unsigned integer
Definition: dataTypes.hpp:61
riegl::rdb::pointcloud::UINT32
32 bit unsigned integer
Definition: dataTypes.hpp:63