FnUsdAbstractionLib 0.6.0
|
A class representing a primvar attribute. This has extra methods for dealing with indices, flattening values and so on. More...
#include <Primvar.h>
Public Member Functions | |
Primvar (const Prim &prim, const Token &name) | |
Construct primvar with the existing attribute named by the given name. | |
Primvar (const Prim &prim, const Attribute &attr) | |
Construct primvar with the given attribute. | |
Primvar (Prim &prim, const Token &name, const Value::Type &typeName) | |
Create primvar with the given name and type. | |
bool | isValid () const |
Returns true if the primvar is valid. | |
operator bool () const | |
Attribute & | attribute () |
Returns the primvar attribute. | |
void | blockIndices () |
Block the indices that were previously set. | |
Attribute & | indicesAttribute () |
Returns the primvar indices attribute if it exists. | |
bool | setInterpolation (const Token &interpolation) |
Sets the interpolation for this attribute. | |
Token | getInterpolation () const |
Gets the interpolation for this attribute. | |
bool | setElementSize (const int elementSize) |
Sets the elementSize for this attribute. | |
int | getElementSize () const |
Gets the elementSize for this attribute. | |
template<class T > | |
bool | computeFlattened (Array< T > &flattenedValues, fdk::TimeValue time=fdk::defaultTimeValue()) const |
Computes the flattened primver attributes from the attribute and its indices. If there are no indices, just returns the straight values. | |
Static Public Member Functions | |
static Token | makeNamespaced (const Token &name) |
Gets the attribute name from primvar name like "displayColor" -> "primvars:displayColor". | |
Protected Attributes | |
Prim | _prim |
Attribute | _attr |
Attribute | _indicesAttr |
A class representing a primvar attribute. This has extra methods for dealing with indices, flattening values and so on.
©2025 The Foundry Visionmongers, Ltd. All Rights Reserved. |