OpenVDB 11.0.0

Loading...
Searching...
No Matches
PointDelete.h
Go to the documentation of this file.
1// Copyright Contributors to the OpenVDB Project
2// SPDX-License-Identifier: MPL-2.0
3
4/// @author Nick Avramoussis, Francisco Gochez, Dan Bailey
5///
6/// @file PointDelete.h
7///
8/// @brief Methods for deleting points based on group membership
9
10#ifndef OPENVDB_POINTS_POINT_DELETE_HAS_BEEN_INCLUDED
11#define OPENVDB_POINTS_POINT_DELETE_HAS_BEEN_INCLUDED
12
13#include "PointDataGrid.h"
14#include "PointGroup.h"
15#include "IndexIterator.h"
16#include "IndexFilter.h"
17
18#include <openvdb/tools/Prune.h>
19#include <openvdb/tree/LeafManager.h>
20
21#include <memory>
22#include <string>
23#include <vector>
24
25 namespace openvdb {
26 OPENVDB_USE_VERSION_NAMESPACE
27 namespace OPENVDB_VERSION_NAME {
28 namespace points {
29
30/// @brief Delete points that are members of specific groups
31///
32/// @details This method will delete points which are members of any of the supplied groups and
33/// will optionally drop the groups from the tree. An invert flag can be used to
34/// delete points that belong to none of the groups.
35///
36/// @param pointTree the point tree
37/// @param groups the groups from which to delete points
38/// @param invert if enabled, points not belonging to any of the groups will be deleted
39/// @param drop if enabled and invert is disabled, the groups will be dropped from the tree
40///
41/// @note If the invert flag is true, none of the groups will be dropped after deleting points
42/// regardless of the value of the drop parameter.
43
44 template <typename PointDataTreeT>
45 inline void deleteFromGroups(PointDataTreeT& pointTree,
46 const std::vector<std::string>& groups,
47 bool invert = false,
48 bool drop = true);
49
50/// @brief Delete points that are members of a group
51///
52/// @details This method will delete points which are members of the supplied group and will
53/// optionally drop the group from the tree. An invert flag can be used to
54/// delete points that belong to none of the groups.
55///
56/// @param pointTree the point tree with the group to delete
57/// @param group the name of the group to delete
58/// @param invert if enabled, points not belonging to any of the groups will be deleted
59/// @param drop if enabled and invert is disabled, the group will be dropped from the tree
60///
61/// @note If the invert flag is true, the group will not be dropped after deleting points
62/// regardless of the value of the drop parameter.
63
64 template <typename PointDataTreeT>
65 inline void deleteFromGroup(PointDataTreeT& pointTree,
66 const std::string& group,
67 bool invert = false,
68 bool drop = true);
69
70} // namespace points
71} // namespace OPENVDB_VERSION_NAME
72} // namespace openvdb
73
74#include "impl/PointDeleteImpl.h"
75
76#endif // OPENVDB_POINTS_POINT_DELETE_HAS_BEEN_INCLUDED
IndexFilter.h
Index filters primarily designed to be used with a FilterIndexIter.
IndexIterator.h
Index Iterators.
LeafManager.h
A LeafManager manages a linear array of pointers to a given tree's leaf nodes, as well as optional au...
PointDataGrid.h
Attribute-owned data structure for points. Point attributes are stored in leaf nodes and ordered by v...
PointDeleteImpl.h
PointGroup.h
Point group manipulation in a VDB Point Grid.
Prune.h
Defined various multi-threaded utility functions for trees.
openvdb::v11_0::points::deleteFromGroups
void deleteFromGroups(PointDataTreeT &pointTree, const std::vector< std::string > &groups, bool invert=false, bool drop=true)
Delete points that are members of specific groups.
Definition PointDeleteImpl.h:136
openvdb::v11_0::points::deleteFromGroup
void deleteFromGroup(PointDataTreeT &pointTree, const std::string &group, bool invert=false, bool drop=true)
Delete points that are members of a group.
Definition PointDeleteImpl.h:191
openvdb
Definition Exceptions.h:13
OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
OPENVDB_USE_VERSION_NAMESPACE
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:212