-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompressedVector.h
44 lines (34 loc) · 1.31 KB
/
CompressedVector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright (C) fastman92 <[email protected]>, website: http://fastman92.com
* Licensed under the MIT License, see LICENSE at top level directory.
*
*/
#pragma once
#include <Assertions.h>
#include <Endianness\Endianness.h>
#include <stdint.h>
template<template<class> class Wrapper, typename T> class CompressedVector2D_templateForSingleType
{
public:
Wrapper<T> x;
Wrapper<T> y;
};
template<template<class> class Wrapper, typename T> class CompressedVector_templateForSingleType
{
public:
Wrapper<T> x;
Wrapper<T> y;
Wrapper<T> z;
};
template <template<class> class Wrapper>
using CompressedVector2D_template = CompressedVector2D_templateForSingleType<Wrapper, int16_t>;
template <template<class> class Wrapper>
using CompressedVector2D_extended_template = CompressedVector2D_templateForSingleType<Wrapper, int32_t>;
template <template<class> class Wrapper>
using CompressedVector_template = CompressedVector_templateForSingleType<Wrapper, int16_t>;
template <template<class> class Wrapper>
using CompressedVector_extended_template = CompressedVector_templateForSingleType<Wrapper, int32_t>;
DEFINE_ENDIAN_STRUCTURE_DEFAULT(CompressedVector2D);
DEFINE_ENDIAN_STRUCTURE_DEFAULT(CompressedVector2D_extended);
DEFINE_ENDIAN_STRUCTURE_DEFAULT(CompressedVector_extended);
DEFINE_ENDIAN_STRUCTURE_DEFAULT(CompressedVector);