|
Bifrost SDK
Bifrost SDK documentation
|
Functions for querying and setting the target of a geo property.
| Amino::Ptr< Bifrost::Object > BIFROST_GEOMETRY_DECL Bifrost::Geometry::getGeoPropTarget | ( | const Bifrost::Object & | object, |
| const Bifrost::Object & | geoProp | ||
| ) |
Get referenced counted pointer of the target of a specified geometry property.
| [in] | object | Geometry object. The target will be fetched from this object. |
| [in] | geoProp | Property that contains the target field. |
| Amino::String BIFROST_GEOMETRY_DECL Bifrost::Geometry::getGeoPropTargetName | ( | const Bifrost::Object & | geoProp | ) |
Get the name of the target for the specified geo property.
| [in] | geoProp | The geo property to query. |
| Amino::String BIFROST_GEOMETRY_DECL Bifrost::Geometry::getGeoPropTargetName | ( | const Bifrost::Object & | object, |
| Amino::StringView | geoProp | ||
| ) |
Get the name of the target for the specified geo property.
| [in] | object | Geometry object. |
| [in] | geoProp | The geo property to query. |
| Amino::Array< Amino::String > BIFROST_GEOMETRY_DECL Bifrost::Geometry::getTargetChain | ( | const Bifrost::Object & | object, |
| Amino::StringView | geoProp | ||
| ) |
Walks the target chain from the given geo property to the terminal geo component property.
This is typically used to determine the indexing of a data geo property. If the returned target array is empty, the data geo property maps 1:1 to the topological components its defined over. If the returned target array contains one element, that element will be the name of a range geo property that maps topological component indices to indices within the specified data geo property's data array. Note that Bifrost geometry validators enforce just one level of indirection.
For example, in a mesh if normals target the vertices directly, this function will return an empty array. However if normals target the face vertices, then this function will return an array of one element, which will be the name of the range geo property that contains the per-face indices that index into the array of normals.
| [in] | object | The object to query. |
| [in] | geoProp | The geo property to query. |
| Amino::String BIFROST_GEOMETRY_DECL Bifrost::Geometry::getTargetComponent | ( | const Bifrost::Object & | object, |
| Amino::StringView | geoProp | ||
| ) |
Determines the topological component that the specified geometry property is defined over.
In most cases this will return the same value as getGeoPropTargetName(). However if the geo property is indexed, that function will return the name of the geo property that contains the indices, whereas this function will resolve to the final topological component that the data is defined over.
| [in] | object | The object to query. |
| [in] | geoProp | The geo property within the object to query. |