6 #ifndef MATERIALX_SHADERGEN_UTIL_H
7 #define MATERIALX_SHADERGEN_UTIL_H
16 #include <unordered_set>
MX_GENSHADER_API vector< TypedElementPtr > findRenderableMaterialNodes(ConstDocumentPtr doc)
shared_ptr< Output > OutputPtr
A shared pointer to an Output.
#define MATERIALX_NAMESPACE_BEGIN
vector< string > StringVec
A vector of strings.
shared_ptr< const Value > ConstValuePtr
A shared pointer to a const Value.
MX_GENSHADER_API InputPtr getNodeDefInput(InputPtr nodeInput, const string &target)
MATERIALX_NAMESPACE_BEGIN MX_CORE_API const string EMPTY_STRING
MX_GENSHADER_API vector< TypedElementPtr > findRenderableElements(ConstDocumentPtr doc)
shared_ptr< const TypedElement > ConstTypedElementPtr
A shared pointer to a const TypedElement.
GLsizei GLsizei GLchar * source
MX_GENSHADER_API void mapValueToColor(ConstValuePtr value, Color4 &color)
shared_ptr< Input > InputPtr
A shared pointer to an Input.
MX_GENSHADER_API bool elementRequiresShading(ConstTypedElementPtr element)
Determine if a given element requires shading / lighting for rendering.
MX_GENSHADER_API bool hasElementAttributes(OutputPtr output, const StringVec &attributes)
MX_GENSHADER_API NodePtr connectsToWorldSpaceNode(OutputPtr output)
std::unordered_map< string, string > StringMap
An unordered map with strings as both keys and values.
MX_GENSHADER_API bool isTransparentSurface(ElementPtr element, const string &target=EMPTY_STRING)
MX_GENSHADER_API bool requiresImplementation(ConstNodeDefPtr nodeDef)
Return whether a nodedef requires an implementation.
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
#define MATERIALX_NAMESPACE_END
shared_ptr< const NodeDef > ConstNodeDefPtr
A shared pointer to a const NodeDef.
MX_GENSHADER_API vector< Vector2 > getUdimCoordinates(const StringVec &udimIdentifiers)
shared_ptr< const Document > ConstDocumentPtr
A shared pointer to a const Document.
MX_GENSHADER_API void tokenSubstitution(const StringMap &substitutions, string &source)
MX_GENSHADER_API void getUdimScaleAndOffset(const vector< Vector2 > &udimCoordinates, Vector2 &scaleUV, Vector2 &offsetUV)
shared_ptr< Node > NodePtr
A shared pointer to a Node.