|
Bifrost SDK
Bifrost SDK documentation
|
Functions | |
| BIFROST_GEOMETRY_DECL Amino::Ptr< Amino::Array< Amino::Ptr< Bifrost::Object > > > | Bifrost::Geometry::getGeometryTypes () |
| Return a list of geometry prototypes, ordered from most to least specific. Can be used to find the type of an object, for example using the helper function Bifrost::Geometry::resolveType. More... | |
| template<typename Prototypes > | |
| decltype(auto) | Bifrost::Geometry::findPrototype (Bifrost::Object const &obj, Prototypes const &prototypes) |
| Finds the first prototype in the given prototypes such that the given object satisfies this prototype. More... | |
| Common::GeometryType | Bifrost::Geometry::resolveType (Bifrost::Object const &obj) |
| Determine the type of an object. More... | |
Functions for querying the "type" of a geometry.
| decltype(auto) Bifrost::Geometry::findPrototype | ( | Bifrost::Object const & | obj, |
| Prototypes const & | prototypes | ||
| ) |
Finds the first prototype in the given prototypes such that the given object satisfies this prototype.
Definition at line 65 of file Primitives.h.
References Bifrost::Object::isA().
Referenced by Bifrost::Geometry::resolveType().
| BIFROST_GEOMETRY_DECL Amino::Ptr< Amino::Array< Amino::Ptr< Bifrost::Object > > > Bifrost::Geometry::getGeometryTypes | ( | ) |
Return a list of geometry prototypes, ordered from most to least specific. Can be used to find the type of an object, for example using the helper function Bifrost::Geometry::resolveType.
The ordering of types is (from most to least specific)
Referenced by Bifrost::Geometry::resolveType().
|
inline |
Determine the type of an object.
Simply traverses all the geometry prototypes and returns the first one that matches.
Definition at line 76 of file Primitives.h.
References Bifrost::Geometry::findPrototype(), Bifrost::Geometry::getGeometryTypes(), and Bifrost::Geometry::Common::not_a_geometry.