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


C++ IParamBlock2::AssignController方法代码示例

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


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

示例1: createCameraModifier

void createCameraModifier(const std::string& path,
                          const std::string& identifier, INode* pNode)
{
    ////Create the Camera modifier
    Modifier* pModifier =
        static_cast<Modifier*>(GET_MAX_INTERFACE()->CreateInstance(
                                   OSM_CLASS_ID, ALEMBIC_CAMERA_MODIFIER_CLASSID));

    TimeValue now = GET_MAX_INTERFACE()->GetTime();

    // Set the alembic id
    pModifier->GetParamBlockByID(0)->SetValue(
        GetParamIdByName(pModifier, 0, "path"), now,
        EC_UTF8_to_TCHAR(path.c_str()));
    pModifier->GetParamBlockByID(0)->SetValue(
        GetParamIdByName(pModifier, 0, "identifier"), now,
        EC_UTF8_to_TCHAR(identifier.c_str()));

    // Set the alembic id
    // pModifier->SetCamera(pCameraObj);

    // Add the modifier to the node
    GET_MAX_INTERFACE()->AddModifier(*pNode, *pModifier);

    // AlembicImport_ConnectTimeControl("$.modifiers[\"AlembicCameraProperties\"].time",
    // options );

    // printControllers(pModifier->GetParamBlockByID(0));

    IParamBlock2* pBlock = pModifier->GetParamBlockByID(0);
    if (pBlock) {
        pBlock->AssignController(
            createFloatController(path, identifier, "horizontalFOV"), 0);
        pBlock->AssignController(
            createFloatController(path, identifier, "verticalFOV"), 1);
        pBlock->AssignController(
            createFloatController(path, identifier, "FocalLength"), 2);
        pBlock->AssignController(
            createFloatController(path, identifier, "HorizontalAperture"), 3);
        pBlock->AssignController(
            createFloatController(path, identifier, "VerticalAperture"), 4);
        pBlock->AssignController(
            createFloatController(path, identifier, "HorizontalFilmOffset"), 5);
        pBlock->AssignController(
            createFloatController(path, identifier, "VerticalFilmOffset"), 6);
        pBlock->AssignController(
            createFloatController(path, identifier, "LensSqueezeRatio"), 7);
        pBlock->AssignController(
            createFloatController(path, identifier, "OverScanLeft"), 8);
        pBlock->AssignController(
            createFloatController(path, identifier, "OverScanRight"), 9);
        pBlock->AssignController(
            createFloatController(path, identifier, "OverScanTop"), 10);
        pBlock->AssignController(
            createFloatController(path, identifier, "OverScanBottom"), 11);
        pBlock->AssignController(createFloatController(path, identifier, "FStop"),
                                 12);
        pBlock->AssignController(
            createFloatController(path, identifier, "FocusDistance"), 13);
        pBlock->AssignController(
            createFloatController(path, identifier, "ShutterOpen"), 14);
        pBlock->AssignController(
            createFloatController(path, identifier, "ShutterClose"), 15);
        pBlock->AssignController(
            createFloatController(path, identifier, "NearClippingPlane"), 16);
        pBlock->AssignController(
            createFloatController(path, identifier, "FarClippingPlane"), 17);
    }
}
开发者ID:Exocortex,项目名称:ExocortexCrate,代码行数:69,代码来源:AlembicCameraUtilities.cpp


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