Beispiel #1
0
void InputBinder::bind(const Scene& scene)
{
    try
    {
        // Build the symbol table of the scene.
        SymbolTable scene_symbols;
        build_scene_symbol_table(scene, scene_symbols);

        // Bind all inputs of all entities in the scene.
        bind_scene_entities_inputs(scene, scene_symbols);

        // Bind all inputs of all entities in all assemblies.
        for (const_each<AssemblyContainer> i = scene.assemblies(); i; ++i)
        {
            assert(m_assembly_info.empty());
            bind_assembly_entities_inputs(scene, scene_symbols, *i);
        }
    }
    catch (const ExceptionUnknownEntity& e)
    {
        RENDERER_LOG_ERROR(
            "while binding inputs of \"%s\": could not locate entity \"%s\".",
            e.get_context_path().c_str(),
            e.string());
        ++m_error_count;
    }
}
Beispiel #2
0
void InputBinder::bind(const Scene& scene)
{
    // Build the symbol table of the scene.
    SymbolTable scene_symbols;
    build_scene_symbol_table(
        scene,
        scene_symbols);

    // Bind all inputs of all entities in the scene.
    bind_scene_entities_inputs(
        scene,
        scene_symbols);

    // Bind inputs of all entities in assemblies.
    for (const_each<AssemblyContainer> i = scene.assemblies(); i; ++i)
    {
        // Retrieve the assembly.
        const Assembly& assembly = *i;

        // Build the symbol table of the assembly.
        SymbolTable assembly_symbols;
        build_assembly_symbol_table(
            assembly,
            assembly_symbols);

        // Bind all inputs of all entities in the assembly.
        bind_assembly_entities_inputs(
            scene,
            scene_symbols,
            assembly,
            assembly_symbols);
    }
}