RDB 2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dataTypes.inc
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  *
4  * Copyright 2021 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 "riegl/rdb/pointcloud/dataTypes.h"
37 
38 //---< TOOLS >------------------------------------------------------------------
39 
40 namespace {
41 
42 //______________________________________________________________________________
43 /*!
44  * \brief Convert data type
45  *
46  * This function converts the given buffer data type from integer to enum.
47  */
48 riegl::rdb::pointcloud::DataType convertDataType(const uint32_t &value)
49 {
50  switch (value)
51  {
52  case RDBDataTypeUINT8: return riegl::rdb::pointcloud::UINT8;
53  case RDBDataTypeINT8: return riegl::rdb::pointcloud::INT8;
54  case RDBDataTypeUINT16: return riegl::rdb::pointcloud::UINT16;
55  case RDBDataTypeINT16: return riegl::rdb::pointcloud::INT16;
56  case RDBDataTypeUINT32: return riegl::rdb::pointcloud::UINT32;
57  case RDBDataTypeINT32: return riegl::rdb::pointcloud::INT32;
58  case RDBDataTypeUINT64: return riegl::rdb::pointcloud::UINT64;
59  case RDBDataTypeINT64: return riegl::rdb::pointcloud::INT64;
60  case RDBDataTypeSINGLE: return riegl::rdb::pointcloud::SINGLE;
61  case RDBDataTypeDOUBLE: return riegl::rdb::pointcloud::DOUBLE;
62  default: return riegl::rdb::pointcloud::NONE;
63  }
64 } // convertDataType()
65 
66 } // anonymous namespace
64 bit signed integer
Definition: dataTypes.hpp:65
DataType
Point attribute access data type.
Definition: dataTypes.hpp:55
undefined data type
Definition: dataTypes.hpp:57
8 bit unsigned integer
Definition: dataTypes.hpp:58
64 bit unsigned integer
Definition: dataTypes.hpp:64
64 bit double precision floating point value
Definition: dataTypes.hpp:67
8 bit signed integer
Definition: dataTypes.hpp:59
16 bit signed integer
Definition: dataTypes.hpp:61
32 bit single precision floating point value
Definition: dataTypes.hpp:66
32 bit signed integer
Definition: dataTypes.hpp:63
Point attribute access data types.
16 bit unsigned integer
Definition: dataTypes.hpp:60
32 bit unsigned integer
Definition: dataTypes.hpp:62