OpenVDB
1.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
version.h
Go to the documentation of this file.
1
2
//
3
// Copyright (c) 2012-2013 DreamWorks Animation LLC
4
//
5
// All rights reserved. This software is distributed under the
6
// Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
7
//
8
// Redistributions of source code must retain the above copyright
9
// and license notice and the following restrictions and disclaimer.
10
//
11
// * Neither the name of DreamWorks Animation nor the names of
12
// its contributors may be used to endorse or promote products derived
13
// from this software without specific prior written permission.
14
//
15
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
20
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
// IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
27
// LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
28
//
30
31
#ifndef OPENVDB_VERSION_HAS_BEEN_INCLUDED
32
#define OPENVDB_VERSION_HAS_BEEN_INCLUDED
33
34
#include "
Platform.h
"
35
#include <iosfwd>
// for std::istream
36
#include <string>
37
38
45
#define OPENVDB_VERSION_NAME v1_1
46
51
#ifdef OPENVDB_REQUIRE_VERSION_NAME
52
#define OPENVDB_USE_VERSION_NAMESPACE
53
#else
54
55
56
#define OPENVDB_USE_VERSION_NAMESPACE \
57
namespace OPENVDB_VERSION_NAME {} \
58
using namespace OPENVDB_VERSION_NAME;
59
#endif
60
61
62
namespace
openvdb {
63
OPENVDB_USE_VERSION_NAMESPACE
64
namespace
OPENVDB_VERSION_NAME
{
65
68
const
int32_t
OPENVDB_MAGIC
= 0x56444220;
69
70
const
uint32_t
71
OPENVDB_LIBRARY_MAJOR_VERSION
= 1,
72
OPENVDB_LIBRARY_MINOR_VERSION
= 1,
73
OPENVDB_LIBRARY_PATCH_VERSION
= 0;
74
78
const
uint32_t
OPENVDB_FILE_VERSION
= 222;
79
81
enum
{
82
OPENVDB_FILE_VERSION_ROOTNODE_MAP
= 213,
83
OPENVDB_FILE_VERSION_INTERNALNODE_COMPRESSION
= 214,
84
OPENVDB_FILE_VERSION_SIMPLIFIED_GRID_TYPENAME
= 215,
85
OPENVDB_FILE_VERSION_GRID_INSTANCING
= 216,
86
OPENVDB_FILE_VERSION_BOOL_LEAF_OPTIMIZATION
= 217,
87
OPENVDB_FILE_VERSION_BOOST_UUID
= 218,
88
OPENVDB_FILE_VERSION_NO_GRIDMAP
= 219,
89
OPENVDB_FILE_VERSION_NEW_TRANSFORM
= 219,
90
OPENVDB_FILE_VERSION_SELECTIVE_COMPRESSION
= 220,
91
OPENVDB_FILE_VERSION_FLOAT_FRUSTUM_BBOX
= 221,
92
OPENVDB_FILE_VERSION_NODE_MASK_COMPRESSION
= 222,
93
};
94
95
96
struct
VersionId
{ uint32_t first, second;
VersionId
(): first(0), second(0) {} };
97
98
namespace
io {
100
OPENVDB_API
uint32_t
getFormatVersion
(std::istream&);
102
OPENVDB_API
VersionId
getLibraryVersion
(std::istream&);
105
OPENVDB_API
std::string
getVersion
(std::istream&);
106
// Associate the current file format and library version numbers with the given input stream.
107
OPENVDB_API
void
setCurrentVersion
(std::istream&);
108
// Return a bitwise OR of compression option flags (COMPRESS_ZIP, COMPRESS_ACTIVE_MASK, etc.)
109
// specifying whether and how input data is compressed or output data should be compressed.
110
OPENVDB_API
uint32_t
getDataCompression
(std::ios_base&);
111
// Return the class (GRID_LEVEL_SET, GRID_UNKNOWN, etc.) of the grid
112
// currently being read from or written to the given stream.
113
OPENVDB_API
uint32_t
getGridClass
(std::ios_base&);
114
// Return a pointer to the background value of the grid currently being
115
// read from or written to the given stream.
116
OPENVDB_API
const
void
*
getGridBackgroundValuePtr
(std::ios_base&);
117
// Specify (a pointer to) the background value of the grid currently being
118
// read from or written to the given stream.
119
// The pointer must remain valid until the entire grid has been read or written.
120
OPENVDB_API
void
setGridBackgroundValuePtr
(std::ios_base&,
const
void
* background);
121
}
// namespace io
122
123
}
// namespace OPENVDB_VERSION_NAME
124
}
// namespace openvdb
125
126
#endif // OPENVDB_VERSION_HAS_BEEN_INCLUDED
127
128
// Copyright (c) 2012-2013 DreamWorks Animation LLC
129
// All rights reserved. This software is distributed under the
130
// Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
Generated on Wed Apr 10 2013 09:34:48 for OpenVDB by
1.8.1.2