Lagrange
|
Helper class to select which attributes to interpolate. More...
#include <lagrange/subdivision/mesh_subdivision.h>
Public Types | |
enum class | SelectionType { All , None , Selected } |
Selection tag. | |
Public Member Functions | |
void | set_all () |
Sets selection to all. | |
void | set_none () |
Sets selection to none. | |
void | set_selected (std::vector< AttributeId > smooth, std::vector< AttributeId > linear={}) |
Set selection to a specific list of attribte ids. More... | |
Static Public Member Functions | |
static InterpolatedAttributes | all () |
Interpolate all compatible attribute. More... | |
static InterpolatedAttributes | none () |
Do not interpolate any attribute. More... | |
static InterpolatedAttributes | selected (std::vector< AttributeId > smooth, std::vector< AttributeId > linear={}) |
Only interpolate the specified attributes. More... | |
Public Attributes | |
SelectionType | selection_type = SelectionType::All |
Selection type. | |
std::vector< AttributeId > | smooth_attributes |
List of per-vertex or indexed attributes ids to smoothly interpolate (in OpenSubdiv terms, this corresponds to "vertex" weights for per-vertex attributes, and "face-varying" weights for indexed attributes). More... | |
std::vector< AttributeId > | linear_attributes |
List of per-vertex attributes ids to linearly interpolate (in OpenSubdiv terms, this corresponds to "varying" weights). | |
Helper class to select which attributes to interpolate.
By default, all compatible attributes will be smoothly interpolated (i.e. using "vertex" weights for per-vertex attributes, and using "face-varying" weights for indexed attributes).
An attribute can be interpolated if:
float
or double
.
|
inlinestatic |
Interpolate all compatible attribute.
|
inlinestatic |
Do not interpolate any attribute.
|
inlinestatic |
Only interpolate the specified attributes.
Will raise an error if a selected attribute cannot be interpolated (because of an incompatible value type or element type).
[in] | smooth | Per-vertex or indexed attribute ids to smoothly interpolate. |
[in] | linear | Per-vertex attribute ids to smoothly interpolate. |
|
inline |
Set selection to a specific list of attribte ids.
[in] | smooth | Per-vertex or indexed attribute ids to smoothly interpolate. |
[in] | linear | Per-vertex attribute ids to smoothly interpolate. |
std::vector<AttributeId> smooth_attributes |
List of per-vertex or indexed attributes ids to smoothly interpolate (in OpenSubdiv terms, this corresponds to "vertex" weights for per-vertex attributes, and "face-varying" weights for indexed attributes).
If selection_type is All, all attributes not specifically present in linear_attributes are considered "smooth".