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>
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
struct openvdb::v13_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. Example:
auto vs =
points->voxelSize()[0];
Definition AttributeArray.h:42
void pca(PointDataGridT &points, const PcaSettings &settings, const PcaAttributes &attrs)
Calculate ellipsoid transformations from the local point distributions as described in Yu and Turk's ...
GridPtrVec rasterizeSdf(const PointDataGridT &points, const SettingsT &settings)
Perform point rasterzation to produce a signed distance field.
math::Vec3< float > Vec3f
Definition Types.h:55
Anisotropic point rasterization based on the principal component analysis of point neighbours....
Definition PointRasterizeSDF.h:310
RadiusScaleT radiusScale
Definition PointRasterizeSDF.h:182
std::string xform
Definition PointRasterizeSDF.h:334
std::string pws
Definition PointRasterizeSDF.h:340
The persistent attributes created by the PCA methods.
Definition PrincipalComponentAnalysis.h:165
std::string positionWS
Definition PrincipalComponentAnalysis.h:207
XformOutput xformOutput
Definition PrincipalComponentAnalysis.h:183
std::string xform
Definition PrincipalComponentAnalysis.h:198
@ COMBINED_TRANSFORM
Definition PrincipalComponentAnalysis.h:171
Various settings for the neighborhood analysis of point distributions.
Definition PrincipalComponentAnalysis.h:68
float nonAnisotropicStretch
Definition PrincipalComponentAnalysis.h:104
float searchRadius
Definition PrincipalComponentAnalysis.h:83
- Note
- Protected inheritance prevents accidental struct slicing
◆ AttributeTypes
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
◆ BaseT
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
◆ FilterType
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
◆ RadiusAttributeType
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
◆ RadiusScaleT
- 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).
◆ attributes
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, 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:
A list of types (not necessarily unique)
Definition TypeList.h:576
Generic settings for narrow band spherical stamping with a uniform or varying radius and optionally w...
Definition PointRasterizeSDF.h:159
std::vector< std::string > attributes
Definition PointRasterizeSDF.h:218
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 = Vec3f, typename FilterT = NullFilter>
- 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 = Vec3f, typename FilterT = NullFilter>
- Parameters
-
| halfband | the half band width of the generated surface. |
◆ interrupter
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
- Parameters
-
| interrupter | optional interrupter |
◆ pws
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
- Parameters
-
| pws | An 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.
◆ radius
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
- Note
- For ellipsoid rasterization, the radius attribute and scale need to be Vec3f types (RadiusAttributeT defaults to this). This represents each ellipsoids stretch and squash coefficients.
◆ radiusScale
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
◆ rotation
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
| std::string rotation = "" |
Old style "xform" attribute which has since been renamed and ONLY supported rotation. If set, will be prioritised and infered to only hold a rotation. This will be removed and should not be used.
- Deprecated
- "Use EllipsoidSettings::xform"
◆ transform
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
- Parameters
-
| transform | the target transform for the surface. Most surfacing operations impose linear restrictions on the target transform. |
◆ xform
template<typename AttributeTs = TypeList<>, typename RadiusAttributeT = Vec3f, typename FilterT = NullFilter>
| std::string xform = "xform" |
- Parameters
-
| xform | the attribute containing each points transformation |
This attribute must exist and represents the xform of each points ellipse. Must be a Mat3s (float) or Quatf type. Note that if it is a matrix type, any scale represented by the matrix is combined with the radius and radiusScale values (and is interpreted in world space).