当前位置: 首页>>代码示例>>C++>>正文


C++ Assembly::volumes方法代码示例

本文整理汇总了C++中Assembly::volumes方法的典型用法代码示例。如果您正苦于以下问题:C++ Assembly::volumes方法的具体用法?C++ Assembly::volumes怎么用?C++ Assembly::volumes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assembly的用法示例。


在下文中一共展示了Assembly::volumes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: collect_relations_from_assembly

    void collect_relations_from_assembly(Assembly& assembly)
    {
        collect_relations_from(assembly.colors());
        collect_relations_from(assembly.textures());
        collect_relations_from(assembly.texture_instances());
        collect_relations_from(assembly.shader_groups());
        collect_relations_from(assembly.assembly_instances());

        collect_relations_from(assembly.bsdfs());
        collect_relations_from(assembly.bssrdfs());
        collect_relations_from(assembly.edfs());
        collect_relations_from(assembly.surface_shaders());
        collect_relations_from(assembly.materials());
        collect_relations_from(assembly.lights());
        collect_relations_from(assembly.objects());
        collect_relations_from(assembly.object_instances());
        collect_relations_from(assembly.volumes());

        for (auto& child_assembly : assembly.assemblies())
            collect_relations_from_assembly(child_assembly);

        // Lights are implicitly referenced by their parent assembly.
        for (auto& light : assembly.lights())
        {
            const InputBinder::ReferencedEntity referenced_entity(assembly.lights(), &light);
            insert_relation(referenced_entity, assembly);
        }

        // Object instances are implicitly referenced by their parent assembly.
        for (auto& object_instance : assembly.object_instances())
        {
            const InputBinder::ReferencedEntity referenced_entity(assembly.object_instances(), &object_instance);
            insert_relation(referenced_entity, assembly);
        }

        // Assembly instances are implicitly referenced by their parent assembly.
        for (auto& assembly_instance : assembly.assembly_instances())
        {
            const InputBinder::ReferencedEntity referenced_entity(assembly.assembly_instances(), &assembly_instance);
            insert_relation(referenced_entity, assembly);
        }
    }
开发者ID:appleseedhq,项目名称:appleseed,代码行数:42,代码来源:projecttracker.cpp

示例2: remove_unused_entities_from_assembly

    void remove_unused_entities_from_assembly(Assembly& assembly)
    {
        remove_unused_entities_from(assembly.colors());
        remove_unused_entities_from(assembly.textures());
        remove_unused_entities_from(assembly.texture_instances());
        remove_unused_entities_from(assembly.shader_groups());
        remove_unused_entities_from(assembly.assembly_instances());

        remove_unused_entities_from(assembly.bsdfs());
        remove_unused_entities_from(assembly.bssrdfs());
        remove_unused_entities_from(assembly.edfs());
        remove_unused_entities_from(assembly.surface_shaders());
        remove_unused_entities_from(assembly.materials());
        remove_unused_entities_from(assembly.lights());
        remove_unused_entities_from(assembly.objects());
        remove_unused_entities_from(assembly.object_instances());
        remove_unused_entities_from(assembly.volumes());

        for (auto& child_assembly : assembly.assemblies())
            remove_unused_entities_from_assembly(child_assembly);
    }
开发者ID:appleseedhq,项目名称:appleseed,代码行数:21,代码来源:projecttracker.cpp

示例3: ObjectCollectionItem

AssemblyItem::AssemblyItem(
    EntityEditorContext&    editor_context,
    Assembly&               assembly,
    BaseGroup&              parent,
    BaseGroupItem*          parent_item)
  : BaseGroupItem(editor_context, g_class_uid, assembly)
  , m_assembly(assembly)
  , m_assembly_uid(assembly.get_uid())
  , m_parent(parent)
  , m_parent_item(parent_item)
{
    set_title(QString::fromAscii(assembly.get_name()));

    set_allow_edition(false);

    insertChild(
        3,
        m_bsdf_collection_item = add_multi_model_collection_item<BSDF>(assembly.bsdfs()));

    insertChild(
        4,
        m_bssrdf_collection_item = add_multi_model_collection_item<BSSRDF>(assembly.bssrdfs()));

    insertChild(
        5,
        m_edf_collection_item = add_multi_model_collection_item<EDF>(assembly.edfs()));

    insertChild(
        6,
        m_surface_shader_collection_item = add_multi_model_collection_item<SurfaceShader>(assembly.surface_shaders()));

    insertChild(
        7,
        m_material_collection_item = new MaterialCollectionItem(
            m_editor_context,
            assembly.materials(),
            assembly,
            this));

    insertChild(
        8,
        m_light_collection_item = add_multi_model_collection_item<Light>(assembly.lights()));

    insertChild(
        9,
        m_object_collection_item =
            new ObjectCollectionItem(
                m_editor_context,
                assembly.objects(),
                assembly,
                this));

    insertChild(
        10,
        m_object_instance_collection_item =
            new ObjectInstanceCollectionItem(
                m_editor_context,
                new_guid(),
                EntityTraits<ObjectInstance>::get_human_readable_collection_type_name(),
                assembly));
    m_object_instance_collection_item->add_items(assembly.object_instances());

    insertChild(
        11,
        m_volume_collection_item = add_multi_model_collection_item<Volume>(assembly.volumes()));

    m_editor_context.m_item_registry.insert(m_assembly, this);
}
开发者ID:sriravic,项目名称:appleseed,代码行数:68,代码来源:assemblyitem.cpp


注:本文中的Assembly::volumes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。