Line | Branch | Exec | Source |
---|---|---|---|
1 | // Copyright Contributors to the OpenVDB Project | ||
2 | // SPDX-License-Identifier: MPL-2.0 | ||
3 | |||
4 | /// @file points/points.cc | ||
5 | |||
6 | #include "openvdb.h" | ||
7 | #include "PointDataGrid.h" | ||
8 | |||
9 | namespace openvdb { | ||
10 | OPENVDB_USE_VERSION_NAMESPACE | ||
11 | namespace OPENVDB_VERSION_NAME { | ||
12 | namespace points { | ||
13 | |||
14 | 2907 | template <typename ArrayT> struct RegisterArray { inline void operator()() { ArrayT::registerType(); } }; | |
15 | |||
16 | void | ||
17 | 323 | internal::initialize() | |
18 | { | ||
19 | AttributeTypes::foreach<RegisterArray>(); | ||
20 | |||
21 | // Register types associated with point data grids. | ||
22 |
2/4✓ Branch 1 taken 323 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 323 times.
✗ Branch 5 not taken.
|
323 | Metadata::registerType(typeNameAsString<PointDataIndex32>(), Int32Metadata::createMetadata); |
23 |
2/4✓ Branch 1 taken 323 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 323 times.
✗ Branch 5 not taken.
|
323 | Metadata::registerType(typeNameAsString<PointDataIndex64>(), Int64Metadata::createMetadata); |
24 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 323 times.
|
323 | if (!PointDataGrid::isRegistered()) PointDataGrid::registerGrid(); |
25 | 323 | } | |
26 | |||
27 | |||
28 | void | ||
29 | 342 | internal::uninitialize() | |
30 | { | ||
31 | 342 | AttributeArray::clearRegistry(); | |
32 | 342 | } | |
33 | |||
34 | } // namespace points | ||
35 | } // namespace OPENVDB_VERSION_NAME | ||
36 | } // namespace openvdb | ||
37 |