Bifrost SDK
Bifrost SDK documentation
GeoProperty Target

Functions

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. More...
 
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. More...
 
Amino::String BIFROST_GEOMETRY_DECL Bifrost::Geometry::getGeoPropTargetName (const Bifrost::Object &geoProp)
 Get the name of the target for the specified geo property. More...
 
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. More...
 
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. More...
 

Detailed Description

Functions for querying and setting the target of a geo property.

Function Documentation

◆ getGeoPropTarget()

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.

Parameters
[in]objectGeometry object. The target will be fetched from this object.
[in]geoPropProperty that contains the target field.
Returns
A reference counted pointer to the target property found in object. The reference counted pointer secures access to the data

◆ getGeoPropTargetName() [1/2]

Amino::String BIFROST_GEOMETRY_DECL Bifrost::Geometry::getGeoPropTargetName ( const Bifrost::Object geoProp)

Get the name of the target for the specified geo property.

Parameters
[in]geoPropThe geo property to query.
Returns
The target of the specified geo property, or an empty string on error.

◆ getGeoPropTargetName() [2/2]

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.

Parameters
[in]objectGeometry object.
[in]geoPropThe geo property to query.
Returns
The target of the specified geo property, or an empty string on error.

◆ getTargetChain()

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.

Parameters
[in]objectThe object to query.
[in]geoPropThe geo property to query.
Returns
The ranges in-between the geo property and the geo component. The array may be empty if no ranges exists, or if errors occur.

◆ getTargetComponent()

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.

Parameters
[in]objectThe object to query.
[in]geoPropThe geo property within the object to query.
Returns
The name of the component that the geo property is defined over, or an empty string on error.