Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef PLY_PLY_H
00042 #define PLY_PLY_H
00043
00044 #include <pcl/io/boost.h>
00045 #include <pcl/io/ply/byte_order.h>
00046
00053 namespace pcl
00054 {
00055 namespace io
00056 {
00057 namespace ply
00058 {
00059 typedef boost::int8_t int8;
00060 typedef boost::int16_t int16;
00061 typedef boost::int32_t int32;
00062 typedef boost::uint8_t uint8;
00063 typedef boost::uint16_t uint16;
00064 typedef boost::uint32_t uint32;
00065
00066 typedef float float32;
00067 typedef double float64;
00068
00069 template <typename ScalarType>
00070 struct type_traits;
00071
00072 #ifdef PLY_TYPE_TRAITS
00073 # error
00074 #endif
00075
00076 #define PLY_TYPE_TRAITS(TYPE, NAME, OLD_NAME) \
00077 template <> \
00078 struct type_traits<TYPE> \
00079 { \
00080 typedef TYPE type; \
00081 static const char* name() { return NAME; } \
00082 static const char* old_name() { return OLD_NAME; } \
00083 }
00084
00085 PLY_TYPE_TRAITS(int8, "int8", "char");
00086 PLY_TYPE_TRAITS(int16, "int16", "short");
00087 PLY_TYPE_TRAITS(int32, "int32", "int");
00088 PLY_TYPE_TRAITS(uint8, "uint8", "uchar");
00089 PLY_TYPE_TRAITS(uint16, "uint16", "ushort");
00090 PLY_TYPE_TRAITS(uint32, "uint32", "uint");
00091 PLY_TYPE_TRAITS(float32, "float32", "float");
00092 PLY_TYPE_TRAITS(float64, "float64", "double");
00093
00094 #undef PLY_TYPE_TRAITS
00095
00096 typedef int format_type;
00097 enum format { ascii_format, binary_little_endian_format, binary_big_endian_format, unknown };
00098 }
00099 }
00100 }
00101 #endif // PCL_IO_PLY_PLY_H