MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / operator[]

Method operator[]

Source/Falcor/Core/Program/ProgramReflection.cpp:50–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48TypedShaderVarOffset::TypedShaderVarOffset(const ReflectionType* pType, ShaderVarOffset offset) : ShaderVarOffset(offset), mpType(pType) {}
49
50TypedShaderVarOffset TypedShaderVarOffset::operator[](std::string_view name) const
51{
52 if (!isValid())
53 return *this;
54
55 auto pType = getType();
56
57 if (auto pStructType = pType->asStructType())
58 {
59 if (auto pMember = pStructType->findMember(name))
60 {
61 return TypedShaderVarOffset(pMember->getType(), (*this) + pMember->getBindLocation());
62 }
63 }
64
65 FALCOR_THROW("No member named '{}' found.", name);
66}
67
68TypedShaderVarOffset TypedShaderVarOffset::operator[](size_t index) const
69{

Callers

nothing calls this directly

Calls 6

asStructTypeMethod · 0.80
isValidFunction · 0.70
getTypeFunction · 0.70
findMemberMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected