23#ifndef VCL_BASE_BASE_H
24#define VCL_BASE_BASE_H
37using ushort = uint16_t;
49constexpr uint
UINT_NULL = std::numeric_limits<uint>::max();
61constexpr uint
USHORT_NULL = std::numeric_limits<ushort>::max();
100 case PrimitiveType::CHAR:
return sizeof(char);
101 case PrimitiveType::UCHAR:
return sizeof(
unsigned char);
102 case PrimitiveType::SHORT:
return sizeof(int16_t);
103 case PrimitiveType::USHORT:
return sizeof(uint16_t);
104 case PrimitiveType::INT:
return sizeof(int32_t);
105 case PrimitiveType::UINT:
return sizeof(uint32_t);
106 case PrimitiveType::FLOAT:
return sizeof(float);
107 case PrimitiveType::DOUBLE:
return sizeof(double);
119constexpr typename std::underlying_type<E>::type toUnderlying(E e)
noexcept
121 return static_cast<typename std::underlying_type<E>::type
>(e);
140 T* operator->() {
return std::addressof(mValue); }
149template<
typename T,
size_t N>
150constexpr std::array<T, N> makeArray(T value)
A simple utility class to represent a pointer with a value.
Definition base.h:134
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:41
MatrixStorageType
A simple type that enumerates the main storage types for matrices (row or column major).
Definition base.h:89
PrimitiveType
A simple type that enumerates the main primitive types.
Definition base.h:71
constexpr uint UINT_NULL
The UINT_NULL value represent a null value of uint that is the maximum value that can be represented ...
Definition base.h:49
constexpr uint USHORT_NULL
The USHORT_NULL value represent a null value of ushort that is the maximum value that can be represen...
Definition base.h:61