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


C++ Any::setName方法代码示例

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


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

示例1: toAny

Any Entity::toAny() const {
    Any a = m_sourceAny;
    debugAssert(! a.isNil());
    if (a.isNil()) {
        // Fallback for release mode failure
        return a;
    }

    if (m_movedSinceLoad) {
        a["frame"] = m_frame;
    }

    const shared_ptr<SplineTrack>& splineTrack = dynamic_pointer_cast<SplineTrack>(m_track);
    if (notNull(splineTrack) && splineTrack->changed()) {
        // Update the spline
        const PhysicsFrameSpline& spline = splineTrack->spline();
        if (spline.control.size() == 1) {
            // Write out in short form for the single control point
            const PhysicsFrame& p = spline.control[0];
            if (p.rotation == Quat()) {
                // No rotation
                a["track"] = p.translation;
            } else {
                // Full coordinate frame
                a["track"] = CFrame(p);
            }
        } else {
            // Write the full spline
            a["track"] = spline;
        }
    }

    a.setName("Entity");
    return a;
}
开发者ID:jackpoz,项目名称:G3D-backup,代码行数:35,代码来源:Entity.cpp

示例2: toAny

Any MarkerEntity::toAny() const {
    Any a = Entity::toAny();
    a.setName("MarkerEntity");
    a["color"] = m_color;
    a["osBoxArray"] = m_osBoxArray;

    return a;
}
开发者ID:jackpoz,项目名称:G3D-backup,代码行数:8,代码来源:MarkerEntity.cpp

示例3: toAny

Any PlayerEntity::toAny(const bool forceAll) const {
    Any a = VisibleEntity::toAny(forceAll);
    a.setName("PlayerEntity");

    a["velocity"] = m_velocity;

    return a;
}
开发者ID:elfprince13,项目名称:G3D10,代码行数:8,代码来源:PlayerEntity.cpp

示例4: toAny

Any VisibleEntity::toAny() const {
    Any a = Entity::toAny();
    a.setName("VisibleEntity");
    a.set("visible", m_visible);

    // Model and pose must already have been set, so no need to change anything
    return a;
}
开发者ID:jackpoz,项目名称:G3D-backup,代码行数:8,代码来源:VisibleEntity.cpp

示例5: toAny

Any PlayerEntity::toAny() const {
    Any a = VisibleEntity::toAny();
    a.setName("PlayerEntity");

    a["velocity"] = m_velocity;
    a["collisionSphere"] = m_collisionProxySphere;

    return a;
}
开发者ID:jackpoz,项目名称:G3D-backup,代码行数:9,代码来源:PlayerEntity.cpp

示例6: toAny

Any Camera::toAny() const {
    Any any = Entity::toAny();
    
    any.setName("Camera");

    any["projection"]           = m_projection;
    any["depthOfFieldSettings"] = m_depthOfFieldSettings;
    any["motionBlurSettings"]   = m_motionBlurSettings;
    any["filmSettings"]         = m_filmSettings;
    any["visualizationScale"]   = m_visualizationScale;
    return any;
}
开发者ID:jackpoz,项目名称:G3D-backup,代码行数:12,代码来源:Camera.cpp

示例7: toAny

Any VisibleEntity::toAny(const bool forceAll) const {
    Any a = Entity::toAny(forceAll);
    a.setName("VisibleEntity");

    AnyTableReader oldValues(a);
    bool visible;
    if (forceAll || (oldValues.getIfPresent("visible", visible) && visible != m_visible)) {
        a.set("visible", m_visible);
    }

    // Model and pose must already have been set, so no need to change anything
    return a;
}
开发者ID:elfprince13,项目名称:G3D10,代码行数:13,代码来源:VisibleEntity.cpp


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