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


C++ OgreWorldPtr::get方法代码示例

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


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

示例1: addPoint

void OcclusionDebugRenderer::addPoint(const Umbra::Vector3& pt, const Umbra::Vector4& color)
{
    OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
    if(!ogreWorld.get())
        return;

    // Nothing to do here
    float3 point = Vector3ToFloat3(pt);
    ogreWorld->DebugDrawSphere(point, 0.1f, 6, Color::Red);
}
开发者ID:Adminotech,项目名称:meshmoon-plugins,代码行数:10,代码来源:EC_MeshmoonCulling.cpp

示例2: addLine

void OcclusionDebugRenderer::addLine(const Umbra::Vector3& start, const Umbra::Vector3& end, const Umbra::Vector4& color)
{
    OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
    if(!ogreWorld.get())
        return;

    float3 start_ = Vector3ToFloat3(start);
    float3 end_ = Vector3ToFloat3(end);

    ogreWorld->DebugDrawLine(start_, end_, Color::Yellow);
}
开发者ID:Adminotech,项目名称:meshmoon-plugins,代码行数:11,代码来源:EC_MeshmoonCulling.cpp

示例3: addAABB

void OcclusionDebugRenderer::addAABB(const Umbra::Vector3& mn, const Umbra::Vector3& mx, const Umbra::Vector4& color)
{
    OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
    if(!ogreWorld.get())
        return;

    float3 mn_ = Vector3ToFloat3(mn);
    float3 mx_ = Vector3ToFloat3(mx);
    Color color_ = Vector4ToColor(color);

    AABB aabb(mn_, mx_);
    ogreWorld->DebugDrawAABB(aabb, color_);
}
开发者ID:Adminotech,项目名称:meshmoon-plugins,代码行数:13,代码来源:EC_MeshmoonCulling.cpp

示例4: addQuad

void OcclusionDebugRenderer::addQuad(const Umbra::Vector3& x0y0, const Umbra::Vector3& x0y1, const Umbra::Vector3& x1y1, const Umbra::Vector3& x1y0, const Umbra::Vector4& color)
{
    OgreWorldPtr ogreWorld = renderer_->GetActiveOgreWorld();
    if(!ogreWorld.get())
        return;

    // Nothing to do here
    float3 x0y0_, x0y1_, x1y0_, x1y1_;
    x0y0_ = Vector3ToFloat3(x0y0);
    x0y1_ = Vector3ToFloat3(x0y1);
    x1y0_ = Vector3ToFloat3(x1y0);
    x1y1_ = Vector3ToFloat3(x1y1);

    ogreWorld->DebugDrawLine(x0y0_, x1y0_, Color::Yellow);
    ogreWorld->DebugDrawLine(x1y0_, x1y1_, Color::Yellow);
    ogreWorld->DebugDrawLine(x1y1_, x0y1_, Color::Yellow);
    ogreWorld->DebugDrawLine(x0y1_, x0y0_, Color::Yellow);
}
开发者ID:Adminotech,项目名称:meshmoon-plugins,代码行数:18,代码来源:EC_MeshmoonCulling.cpp

示例5: DrawDebugGeometry

void PhysicsWorld::DrawDebugGeometry()
{
    if (!IsDebugGeometryEnabled())
        return;

    PROFILE(PhysicsModule_DrawDebugGeometry);
    
    // Draw debug only for the active (visible) scene
    OgreWorldPtr ogreWorld = scene_.lock()->GetWorld<OgreWorld>();
    cachedOgreWorld_ = ogreWorld.get();
    if (!ogreWorld)
        return;
    if (!ogreWorld->IsActive())
        return;
    
    // Get all lines of the physics world
    world_->debugDrawWorld();
}
开发者ID:katik,项目名称:naali,代码行数:18,代码来源:PhysicsWorld.cpp


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