OpenVDB  12.1.0
Public Types | Public Attributes | Protected Types | Protected Attributes | List of all members
EllipsoidSettings< AttributeTs, RadiusAttributeT, FilterT > Struct Template Reference

Anisotropic point rasterization based on the principal component analysis of point neighbours. See the struct member documentation for detailed behavior. More...

#include <openvdb/points/PointRasterizeSDF.h>

Inherits SphereSettings< 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

std::string rotation = "rotation"
 
std::string pws = ""
 

Protected Types

using RadiusScaleT = typename PromoteType< RadiusAttributeT >::Highest
 

Protected Attributes

std::string radius = ""
 
RadiusScaleT radiusScale = RadiusScaleT(1.0)
 
Real halfband = LEVEL_SET_HALF_WIDTH
 
math::Transform::Ptr transform = nullptr
 
std::vector< std::string > attributes
 
const FilterT * filter = nullptr
 
util::NullInterrupterinterrupter = nullptr
 

Detailed Description

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

Anisotropic point rasterization based on the principal component analysis of point neighbours. See the struct member documentation for detailed behavior.

This rasterization technique is typically used with the accompanying PCA tools in PrincipalComponentAnalysis.h which initializes the required attributes. These attributes define the rotational and affine transformations which can be used to construct ellipsoids for each point. Typically (for our intended surfacing) these transformations are built by analysing each points neighbourhood distributions and constructing tight ellipsoids that orient themselves to follow these point distributions.

Note
Protected inheritance prevents accidental struct slicing

Member Typedef Documentation

using BaseT = SphereSettings<AttributeTs, RadiusAttributeT, FilterT>
using FilterType = typename BaseT::FilterType
using RadiusScaleT = typename PromoteType<RadiusAttributeT>::Highest
inherited
Parameters
radiusScalethe 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

std::vector<std::string> attributes
inherited
Parameters
attributeslist 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"};

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.
const FilterT* filter = nullptr
inherited
Parameters
filtera 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.
Real halfband = LEVEL_SET_HALF_WIDTH
inherited
Parameters
halfbandthe half band width of the generated surface.
util::NullInterrupter* interrupter = nullptr
inherited
Parameters
interrupteroptional interrupter
std::string pws = ""
Parameters
pwsAn optional attribute which represents the world space position of a point.

This can be useful to override the position of a point in index space. If it exists, it must be a Vec3d type.

std::string radius = ""
inherited
Parameters
radiusthe 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.

RadiusScaleT radiusScale = RadiusScaleT(1.0)
inherited
std::string rotation = "rotation"
Parameters
rotationthe attribute containing each points orthogonal rotation matrix.

This attribute must exist and represents the rotation of each points ellipse. Must be a Mat3s type.

math::Transform::Ptr transform = nullptr
inherited
Parameters
transformthe target transform for the surface. Most surfacing operations impose linear restrictions on the target transform.