OpenVDB 7.0.0

Classes | Namespaces | Macros | Enumerations | Functions | Variables
version.h File Reference

Library and file format version numbers. More...

`#include "Platform.h"`
`#include <cstdint>`

Go to the source code of this file.

## Classes
struct | VersionId

## Namespaces
| openvdb
| openvdb::v7_0

## Macros
#define | OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER 7
#define | OPENVDB_LIBRARY_MINOR_VERSION_NUMBER 0
#define | OPENVDB_LIBRARY_PATCH_VERSION_NUMBER 0
#define | OPENVDB_VERSION_NAME
| The version namespace name for this library version. More...
#define | OPENVDB_LIBRARY_VERSION_STRING
| Library version number string of the form "<major>.<minor>.<patch>". More...
#define | OPENVDB_LIBRARY_ABI_VERSION_STRING
| Library version number string of the form "<major>.<minor>.<patch>abi<abi>". More...
#define | OPENVDB_LIBRARY_VERSION_NUMBER
| Library version number as a packed integer ("%02x%02x%04x", major, minor, patch) More...
#define | OPENVDB_USE_VERSION_NAMESPACE

## Enumerations
enum | { OPENVDB_FILE_VERSION_ROOTNODE_MAP = 213, OPENVDB_FILE_VERSION_INTERNALNODE_COMPRESSION = 214, OPENVDB_FILE_VERSION_SIMPLIFIED_GRID_TYPENAME = 215, OPENVDB_FILE_VERSION_GRID_INSTANCING = 216, OPENVDB_FILE_VERSION_BOOL_LEAF_OPTIMIZATION = 217, OPENVDB_FILE_VERSION_BOOST_UUID = 218, OPENVDB_FILE_VERSION_NO_GRIDMAP = 219, OPENVDB_FILE_VERSION_NEW_TRANSFORM = 219, OPENVDB_FILE_VERSION_SELECTIVE_COMPRESSION = 220, OPENVDB_FILE_VERSION_FLOAT_FRUSTUM_BBOX = 221, OPENVDB_FILE_VERSION_NODE_MASK_COMPRESSION = 222, OPENVDB_FILE_VERSION_BLOSC_COMPRESSION = 223, OPENVDB_FILE_VERSION_POINT_INDEX_GRID = 223, OPENVDB_FILE_VERSION_MULTIPASS_IO = 224 }
| Notable file format version numbers. More...

## Functions
constexpr const char * | getLibraryVersionString ()
| Return a library version number string of the form "<major>.<minor>.<patch>". More...
constexpr const char * | getLibraryAbiVersionString ()
| Return a library version number string of the form "<major>.<minor>.<patch>abi<abi>". More...

## Variables
const int32_t | OPENVDB_MAGIC = 0x56444220
| The magic number is stored in the first four bytes of every VDB file. More...
const uint32_t | OPENVDB_LIBRARY_MAJOR_VERSION = 7
const uint32_t | OPENVDB_LIBRARY_MINOR_VERSION = 0
const uint32_t | OPENVDB_LIBRARY_PATCH_VERSION = 0
const uint32_t | OPENVDB_LIBRARY_VERSION = (( 7 << 24) | (( 0 & 0xFF) << 16) | ( 0 & 0xFFFF))
| Library version number as a packed integer ("%02x%02x%04x", major, minor, patch) More...
const uint32_t | OPENVDB_ABI_VERSION = 7
const uint32_t | OPENVDB_FILE_VERSION = 224
| The current version number of the VDB file format. More...

## Detailed Description

Library and file format version numbers.

When the library is built with the latest ABI, its namespace has the form openvdb::vX_Y, where X and Y are the major and minor version numbers.

The library can be built using an older ABI by changing the value of the OPENVDB_ABI_VERSION_NUMBER macro (e.g., via `-DOPENVDB_ABI_VERSION_NUMBER=N`). In that case, the namespace has the form openvdb::vX_YabiN, where N is the ABI version number. The ABI version must be set consistently when building code that depends on OpenVDB.

The ABI version number defaults to the library major version number, which gets incremented whenever changes are made to the ABI of the Grid class or related classes (Tree, Transform, Metadata, etc.). Setting the ABI version number to an earlier library version number disables grid ABI changes made since that library version. The OpenVDB 1.x ABI is no longer supported, and support for other old ABIs might also eventually be dropped.

The library minor version number gets incremented whenever a change is made to any aspect of the public API (not just the grid API) that necessitates changes to client code. Changes to APIs in private or internal namespaces do not trigger a minor version number increment; such APIs should not be used in client code.

A patch version number increment indicates a change—usually a new feature or a bug fix—that does not necessitate changes to client code but rather only recompilation of that code (because the library namespace incorporates the version number).

The file format version number gets incremented when it becomes possible to write files that cannot safely be read with older versions of the library. Not all files written in a newer format are incompatible with older libraries, however. And in general, files containing grids of unknown type can be read safely, although the unknown grids will not be accessible.

## Macro Definition Documentation

## ◆ OPENVDB_LIBRARY_ABI_VERSION_STRING

#define OPENVDB_LIBRARY_ABI_VERSION_STRING

Library version number string of the form "<major>.<minor>.<patch>abi<abi>".

This is a macro rather than a static constant because we typically want the compile-time version number, not the runtime version number (although the two are usually the same).

## ◆ OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER

#define OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER 7

## ◆ OPENVDB_LIBRARY_MINOR_VERSION_NUMBER

#define OPENVDB_LIBRARY_MINOR_VERSION_NUMBER 0

## ◆ OPENVDB_LIBRARY_PATCH_VERSION_NUMBER

#define OPENVDB_LIBRARY_PATCH_VERSION_NUMBER 0

## ◆ OPENVDB_LIBRARY_VERSION_NUMBER

#define OPENVDB_LIBRARY_VERSION_NUMBER

Value:
((OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER << 24) | \
((OPENVDB_LIBRARY_MINOR_VERSION_NUMBER & 0xFF) << 16) | \
(OPENVDB_LIBRARY_PATCH_VERSION_NUMBER & 0xFFFF))

Library version number as a packed integer ("%02x%02x%04x", major, minor, patch)

## ◆ OPENVDB_LIBRARY_VERSION_STRING

#define OPENVDB_LIBRARY_VERSION_STRING

Library version number string of the form "<major>.<minor>.<patch>".

This is a macro rather than a static constant because we typically want the compile-time version number, not the runtime version number (although the two are usually the same).

## ◆ OPENVDB_USE_VERSION_NAMESPACE

#define OPENVDB_USE_VERSION_NAMESPACE

By default, the OPENVDB_REQUIRE_VERSION_NAME macro is undefined, and symbols from the version namespace are promoted to the top-level namespace so that, for example, openvdb::v5_0::io::File can be referred to simply as openvdb::io::File.

When OPENVDB_REQUIRE_VERSION_NAME is defined, symbols must be fully namespace-qualified.

## ◆ OPENVDB_VERSION_NAME

#define OPENVDB_VERSION_NAME

The version namespace name for this library version.

When the ABI version number matches the library major version number, symbols are named as in the following examples:

- openvdb::vX_Y::Vec3i
- openvdb::vX_Y::io::File
- openvdb::vX_Y::tree::Tree

where X and Y are the major and minor version numbers.

When the ABI version number does not match the library major version number, symbol names include the ABI version:

- openvdb::vX_YabiN::Vec3i
- openvdb::vX_YabiN::io::File
- openvdb::vX_YabiN::tree::Tree

where X, Y and N are the major, minor and ABI version numbers, respectively.

OPENVDB_LIBRARY_PATCH_VERSION_NUMBER
#define OPENVDB_LIBRARY_PATCH_VERSION_NUMBER
Definition: version.h:52
OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER
#define OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER
Definition: version.h:50
OPENVDB_LIBRARY_MINOR_VERSION_NUMBER
#define OPENVDB_LIBRARY_MINOR_VERSION_NUMBER
Definition: version.h:51