BIN

From CloudCompareWiki
Revision as of 15:10, 7 July 2011 by Daniel (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description of the BIN file format

(See the BinFilter class as an example of C++ code for reading/writing BIN files)

Header & data

Description Type Size (bits) Expected value
Number of clouds unsigned integer 32 generally <100
... for each cloud ...
Number of points unsigned integer 32 up to 4.294.967.296 :)
Flags unsigned char 8 See description below
... if cloud name flag is ON ...
Cloud name unsigned char [array] ? cloud name stops at the first byte equal to 0
... for each point ...
X float 32
Y float 32
Z float 32
... if color flag is ON ...
Red unsigned char 8 0-255
Green unsigned char 8 0-255
Blue unsigned char 8 0-255
... if normal flag is ON ...
Nx float 32 [-1.0;1.0]
Ny float 32 [-1.0;1.0]
Nz float 32 [-1.0;1.0]
... if scalar field flag is ON ...
Scalar value double 64

Flags

Bit Decimal value Description
1 1 always ON
2 2 colors
3 4 normals
4 8 scalar field
5 16 cloud name
6 32 Ignored
7 64 Ignored
8 128 Ignored