OpenVDB 12.1.0

Loading...
Searching...
No Matches
SmoothSphereSettings< AttributeTs, RadiusAttributeT, FilterT > Struct Template Reference

Smoothed point distribution based sphere stamping with a uniform radius or varying radius and optionally with closest point attribute transfer of arbitrary attributes. See the struct member documentation for detailed behavior. More...

`#include <openvdb/points/PointRasterizeSDF.h>`

Inheritance diagram for SmoothSphereSettings< AttributeTs, RadiusAttributeT, FilterT >:

## Public Types
using | BaseT = SphereSettings<AttributeTs, RadiusAttributeT, FilterT>
using | AttributeTypes = typename BaseT::AttributeTypes
using | RadiusAttributeType = typename BaseT::RadiusAttributeType
using | FilterType = typename BaseT::FilterType

## Public Attributes
Real | searchRadius = 1.0
std::string | radius
RadiusScaleT | radiusScale
Real | halfband
math::Transform::Ptr | transform
std::vector< std::string > | attributes
const FilterT * | filter
util::NullInterrupter * | interrupter

## Protected Types
using | RadiusScaleT

## Detailed Description

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>
struct openvdb::v12_1::points::SmoothSphereSettings< AttributeTs, RadiusAttributeT, FilterT >

Smoothed point distribution based sphere stamping with a uniform radius or varying radius and optionally with closest point attribute transfer of arbitrary attributes. See the struct member documentation for detailed behavior.

Note
  Protected inheritance prevents accidental struct slicing

## Member Typedef Documentation

## ◆ AttributeTypes

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

using AttributeTypes = typename BaseT::AttributeTypes

## ◆ BaseT

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

using BaseT = SphereSettings<AttributeTs, RadiusAttributeT, FilterT>

## ◆ FilterType

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

using FilterType = typename BaseT::FilterType

## ◆ RadiusAttributeType

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

using RadiusAttributeType = typename BaseT::RadiusAttributeType

## ◆ RadiusScaleT

using RadiusScaleT
| inherited

Parameters

  radiusScale | the scale applied to every world space radius value

Note
  If no radius attribute is provided, this is used as the uniform world space radius for every point. Most surfacing operations will perform faster if they are able to assume a uniform radius (so use this value instead of setting the radius parameter if radii are uniform).
  Type of the scale is always double precision (the Promote exists as this could be a vector scale - see EllipsoidSettings).

## Member Data Documentation

## ◆ attributes

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

std::vector<std::string> attributes

Parameters

  attributes | list of attributes to transfer

if the attributes vector is empty, only the surface is built. Otherwise, every voxel's closest point is used to transfer each attribute in the attributes parameter to a new grid of matching topology. The built surface is always the first grid returned from the surfacing operation, followed by attribute grids in the order that they appear in this vector.

The AttributeTs template parameter should be a TypeList of the required or possible attributes types. Example:

// compile support for int, double and Vec3f attribute transferring
using SupportedTypes = TypeList<int, double, Vec3f>;
SphereSettings<SupportedTypes> s;
// Produce 4 additional grids from the "v", "Cd", "id" and "density"
// attributes. Their attribute value types must be available in the
// provided TypeList
s.attributes = {"v", "Cd", "id", "density"};
openvdb::v12_1::TypeList
A list of types (not necessarily unique)
Definition TypeList.h:578
openvdb::v12_1::points::SphereSettings
Generic settings for narrow band spherical stamping with a uniform or varying radius and optionally w...
Definition PointRasterizeSDF.h:157
openvdb::v12_1::points::SphereSettings::attributes
std::vector< std::string > attributes
Definition PointRasterizeSDF.h:216

A runtime error will be thrown if no equivalent type for a given attribute is found in the AttributeTs TypeList.

Note
  The destination types of these grids is equal to the ValueConverter result of the attribute type applied to the PointDataGridT.

## ◆ filter

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

const FilterT* filter

Parameters

  filter | a filter to apply to points. Only points that evaluate to true using this filter are rasterized, regardless of any other filtering derived schemes may use.

## ◆ halfband

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

Real halfband

Warning
  The width of the exterior half band may be smaller than the specified half band if the search radius is less than the equivalent world space halfband distance.

## ◆ interrupter

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

util::NullInterrupter* interrupter

Parameters

  interrupter | optional interrupter

## ◆ radius

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

std::string radius

Parameters

  radius | the attribute containing the world space radius

if the radius parameter is an empty string then the radiusScale parameter is used as a uniform world space radius to generate a fixed surface mask. Otherwise, a point attribute representing the world space radius of each point of type RadiusAttributeT is expected to exist and radii are scaled by the radiusScale parameter.

## ◆ radiusScale

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

RadiusScaleT radiusScale

Note
  See also the searchRadius parameter for SmoothSpehere rasterization.

## ◆ searchRadius

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

Real searchRadius = 1.0

Parameters

  searchRadius | the maximum search distance of every point

The search radius is each points points maximum contribution to the target level set. It should always have a value equal to or larger than the point radius. Both this and the radiusScale parameters are given in world space units and are applied to every point to generate a surface mask.

Warning
  If this value is less than the sum of the maximum particle radius and the half band width, the exterior half band width may be smaller than desired. In these cases, consider running a levelset renormalize or a levelset rebuild.

## ◆ transform

template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = float, typename FilterT = NullFilter>

math::Transform::Ptr transform

Parameters

  transform | the target transform for the surface. Most surfacing operations impose linear restrictions on the target transform.