ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
ecvNormalCompressor.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// - CloudViewer: www.cloudViewer.org -
3
// ----------------------------------------------------------------------------
4
// Copyright (c) 2018-2024 www.cloudViewer.org
5
// SPDX-License-Identifier: MIT
6
// ----------------------------------------------------------------------------
7
8
#pragma once
9
10
#include "
CV_db.h
"
11
12
// Local
13
#include "
ecvBasicTypes.h
"
14
16
class
CV_DB_LIB_API
ccNormalCompressor
{
17
public
:
19
21
static
const
unsigned
char
QUANTIZE_LEVEL =
22
9;
// 2097152 normals * 12 bytes = 24 Mb of memory
23
25
static
const
unsigned
MAX_VALID_NORM_CODE =
26
(1 << (QUANTIZE_LEVEL * 2 + 3)) - 1;
28
static
const
unsigned
NULL_NORM_CODE = MAX_VALID_NORM_CODE + 1;
29
31
static
unsigned
Compress(
const
PointCoordinateType
N[3]);
32
34
static
void
Decompress(
unsigned
index,
35
PointCoordinateType
N[3],
36
unsigned
char
level = QUANTIZE_LEVEL);
37
39
static
void
InvertNormal(
CompressedNormType
&code);
40
};
ccNormalCompressor
Normal compressor.
Definition:
ecvNormalCompressor.h:16
CompressedNormType
unsigned int CompressedNormType
Compressed normals type.
Definition:
ecvBasicTypes.h:16
CV_db.h
CV_DB_LIB_API
#define CV_DB_LIB_API
Definition:
CV_db.h:15
PointCoordinateType
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition:
CVTypes.h:16
ecvBasicTypes.h
libs
CV_db
include
ecvNormalCompressor.h
Generated on Wed Nov 18 2026 14:48:06 for ACloudViewer by
1.8.17