本文整理汇总了C++中ActionNode::GetArgument方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionNode::GetArgument方法的具体用法?C++ ActionNode::GetArgument怎么用?C++ ActionNode::GetArgument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionNode
的用法示例。
在下文中一共展示了ActionNode::GetArgument方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RegisterNode
void SlGeneratorInstance::RegisterNode(Node* node)
{
// if registration of node already began
if(registeredNodes.find(node) != registeredNodes.end())
{
// if node is not registered yet
if(nodeInitIndices.find(node) == nodeInitIndices.end())
// than it's a loop
THROW("Node cyclic dependency");
// else it's ok, it's just another use of node
return;
}
// register node
registeredNodes.insert(node);
switch(node->GetType())
{
case Node::typeFloatConst:
case Node::typeIntConst:
break;
case Node::typeAttribute:
{
if(shaderType != ShaderTypes::vertex)
THROW("Only vertex shader can have attribute nodes");
attributes.push_back(fast_cast<AttributeNode*>(node));
}
break;
case Node::typeUniform:
{
UniformNode* uniformNode = fast_cast<UniformNode*>(node);
uniforms.push_back(std::make_pair(uniformNode->GetGroup(), uniformNode));
}
break;
case Node::typeSampler:
samplers.push_back(fast_cast<SamplerNode*>(node));
break;
case Node::typeReadUniform:
RegisterNode(fast_cast<ReadUniformNode*>(node)->GetUniformNode());
break;
case Node::typeIndexUniformArray:
{
IndexUniformArrayNode* indexUniformArrayNode = fast_cast<IndexUniformArrayNode*>(node);
RegisterNode(indexUniformArrayNode->GetUniformNode());
RegisterNode(indexUniformArrayNode->GetIndexNode());
}
break;
case Node::typeTransformed:
transformedNodes.push_back(fast_cast<TransformedNode*>(node));
break;
case Node::typeInterpolate:
{
InterpolateNode* interpolateNode = fast_cast<InterpolateNode*>(node);
interpolateNodes.push_back(interpolateNode);
RegisterNode(interpolateNode->GetNode());
}
break;
case Node::typeSequence:
{
SequenceNode* sequenceNode = fast_cast<SequenceNode*>(node);
RegisterNode(sequenceNode->GetA());
RegisterNode(sequenceNode->GetB());
}
break;
case Node::typeSwizzle:
RegisterNode(fast_cast<SwizzleNode*>(node)->GetA());
break;
case Node::typeOperation:
{
OperationNode* operationNode = fast_cast<OperationNode*>(node);
int argumentsCount = operationNode->GetArgumentsCount();
for(int i = 0; i < argumentsCount; ++i)
RegisterNode(operationNode->GetArgument(i));
}
break;
case Node::typeAction:
{
ActionNode* actionNode = fast_cast<ActionNode*>(node);
int argumentsCount = actionNode->GetArgumentsCount();
for(int i = 0; i < argumentsCount; ++i)
RegisterNode(actionNode->GetArgument(i));
}
break;
case Node::typeSample:
{
SampleNode* sampleNode = fast_cast<SampleNode*>(node);
RegisterNode(sampleNode->GetSamplerNode());
RegisterNode(sampleNode->GetCoordsNode());
ValueNode* lodNode = sampleNode->GetLodNode();
if(lodNode)
RegisterNode(lodNode);
ValueNode* biasNode = sampleNode->GetBiasNode();
if(biasNode)
RegisterNode(biasNode);
ValueNode* gradXNode = sampleNode->GetGradXNode();
if(gradXNode)
//.........这里部分代码省略.........