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


C++ OnMarkedDirty函数代码示例

本文整理汇总了C++中OnMarkedDirty函数的典型用法代码示例。如果您正苦于以下问题:C++ OnMarkedDirty函数的具体用法?C++ OnMarkedDirty怎么用?C++ OnMarkedDirty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: OnMarkedDirty

void Drawable::SetZoneMask(unsigned mask)
{
    zoneMask_ = mask;
    // Mark dirty to reset cached zone
    OnMarkedDirty(node_);
    MarkNetworkUpdate();
}
开发者ID:WorldofOpenDev,项目名称:AtomicGameEngine,代码行数:7,代码来源:Drawable.cpp

示例2: OnMarkedDirty

void Zone::OnSetEnabled()
{
    // When a Zone is disabled, clear the cached zone from all drawables inside bounding box before removing from octree
    if (!IsEnabledEffective())
        OnMarkedDirty(node_);

    Drawable::OnSetEnabled();
}
开发者ID:gameogre,项目名称:Urho3D,代码行数:8,代码来源:Zone.cpp

示例3: Max

void Drawable2D::SetPixelsPerUnit(float pixelsPerUnit)
{
    pixelsPerUnit_ = Max(1.0f, pixelsPerUnit);
    verticesDirty_ = true;
    geometryDirty_ = true;
    OnMarkedDirty(node_);
    MarkNetworkUpdate();
}
开发者ID:reattiva,项目名称:Urho3D,代码行数:8,代码来源:Drawable2D.cpp

示例4: OnMarkedDirty

void StaticModelGroup::UpdateNumTransforms()
{
    worldTransforms_.Resize(instanceNodes_.Size());
    numWorldTransforms_ = 0; // Correct amount will be during world bounding box update
    nodeIDsDirty_ = true;

    OnMarkedDirty(GetNode());
    MarkNetworkUpdate();
}
开发者ID:tungsteen,项目名称:Urho3D,代码行数:9,代码来源:StaticModelGroup.cpp

示例5: offsetof

void Zone::OnSetAttribute(const AttributeInfo& attr, const Variant& src)
{
    Component::OnSetAttribute(attr, src);

    // If bounding box or priority changes, dirty the drawable as applicable
    if ((attr.offset_ >= offsetof(Zone, boundingBox_) && attr.offset_ < (offsetof(Zone, boundingBox_) + sizeof(BoundingBox))) ||
        attr.offset_ == offsetof(Zone, priority_))
        OnMarkedDirty(node_);
}
开发者ID:gameogre,项目名称:Urho3D,代码行数:9,代码来源:Zone.cpp

示例6: OnMarkedDirty

void Text3D::SetFaceCameraMode(FaceCameraMode mode)
{
    if (mode != faceCameraMode_)
    {
        faceCameraMode_ = mode;

        // Bounding box must be recalculated
        OnMarkedDirty(node_);
    }
}
开发者ID:Hevedy,项目名称:Urho3D,代码行数:10,代码来源:Text3D.cpp

示例7: OnMarkedDirty

void Drawable2D::SetZValue(float zValue)
{
    if (zValue == zValue_)
        return;

    zValue_ = zValue;
    verticesDirty_ = true;
    geometryDirty_ = true;
    OnMarkedDirty(node_);
    MarkNetworkUpdate();
}
开发者ID:reattiva,项目名称:Urho3D,代码行数:11,代码来源:Drawable2D.cpp

示例8: OnMarkedDirty

void Text3D::SetFixedScreenSize(bool enable)
{
    if (enable != fixedScreenSize_)
    {
        fixedScreenSize_ = enable;

        // Bounding box must be recalculated
        OnMarkedDirty(node_);
        MarkNetworkUpdate();
    }
}
开发者ID:03050903,项目名称:Urho3D,代码行数:11,代码来源:Text3D.cpp

示例9: UpdateMaterial

void Drawable2D::SetSprite(Sprite2D* sprite)
{
    if (sprite == sprite_)
        return;

    sprite_ = sprite;
    verticesDirty_ = true;
    geometryDirty_ = true;
    UpdateMaterial();
    OnMarkedDirty(node_);
    MarkNetworkUpdate();
}
开发者ID:reattiva,项目名称:Urho3D,代码行数:12,代码来源:Drawable2D.cpp

示例10: instanceWeak

void StaticModelGroup::RemoveInstanceNode(Node* node)
{
    if (!node)
        return;

    WeakPtr<Node> instanceWeak(node);
    node->RemoveListener(this);
    instanceNodes_.Remove(instanceWeak);
    
    UpdateNodeIDs();
    OnMarkedDirty(GetNode());
    MarkNetworkUpdate();
}
开发者ID:LuisAntonRebollo,项目名称:Urho3D,代码行数:13,代码来源:StaticModelGroup.cpp

示例11: UpdateNodeIDs

void StaticModelGroup::RemoveAllInstanceNodes()
{
    for (unsigned i = 0; i < instanceNodes_.Size(); ++i)
    {
        Node* node = instanceNodes_[i];
        if (node)
            node->RemoveListener(this);
    }
    
    instanceNodes_.Clear();
    
    UpdateNodeIDs();
    OnMarkedDirty(GetNode());
    MarkNetworkUpdate();
}
开发者ID:LuisAntonRebollo,项目名称:Urho3D,代码行数:15,代码来源:StaticModelGroup.cpp

示例12: OnMarkedDirty

void Drawable2D::SetTexture(Texture2D* texture)
{
    if (texture == texture_)
        return;

    texture_ = texture;

    verticesDirty_ = true;
    material_ = 0;
    if (renderer_)
        renderer_->MarkMaterialDirty(this);

    OnMarkedDirty(node_);

    MarkNetworkUpdate();
}
开发者ID:zhzhxtrrk,项目名称:Urho3D,代码行数:16,代码来源:Drawable2D.cpp

示例13: GetScene

void StaticModelGroup::ApplyAttributes()
{
    if (!nodeIDsDirty_)
        return;
    
    // Remove all old instance nodes before searching for new. Can not call RemoveAllInstances() as that would modify
    // the ID list on its own
    for (unsigned i = 0; i < instanceNodes_.Size(); ++i)
    {
        Node* node = instanceNodes_[i];
        if (node)
            node->RemoveListener(this);
    }
    
    instanceNodes_.Clear();
    
    Scene* scene = GetScene();
    
    if (scene)
    {
        // The first index stores the number of IDs redundantly. This is for editing
        for (unsigned i = 1; i < nodeIDsAttr_.Size(); ++i)
        {
            Node* node = scene->GetNode(nodeIDsAttr_[i].GetUInt());
            if (node)
            {
                WeakPtr<Node> instanceWeak(node);
                node->AddListener(this);
                instanceNodes_.Push(instanceWeak);
            }
        }
    }
    
    worldTransforms_.Resize(instanceNodes_.Size());
    nodeIDsDirty_ = false;
    OnMarkedDirty(GetNode());
}
开发者ID:LuisAntonRebollo,项目名称:Urho3D,代码行数:37,代码来源:StaticModelGroup.cpp

示例14: GetScene

void StaticModelGroup::ApplyAttributes()
{
    if (!nodesDirty_)
        return;

    // Remove all old instance nodes before searching for new
    for (unsigned i = 0; i < instanceNodes_.Size(); ++i)
    {
        Node* node = instanceNodes_[i];
        if (node)
            node->RemoveListener(this);
    }

    instanceNodes_.Clear();

    Scene* scene = GetScene();
    if (scene)
    {
        // The first index stores the number of IDs redundantly. This is for editing
        for (unsigned i = 1; i < nodeIDsAttr_.Size(); ++i)
        {
            Node* node = scene->GetNode(nodeIDsAttr_[i].GetUInt());
            if (node)
            {
                WeakPtr<Node> instanceWeak(node);
                node->AddListener(this);
                instanceNodes_.Push(instanceWeak);
            }
        }
    }

    worldTransforms_.Resize(instanceNodes_.Size());
    numWorldTransforms_ = 0; // Correct amount will be found during world bounding box update
    nodesDirty_ = false;

    OnMarkedDirty(GetNode());
}
开发者ID:tungsteen,项目名称:Urho3D,代码行数:37,代码来源:StaticModelGroup.cpp

示例15: Max

void Light::SetRange(float range)
{
    range_ = Max(range, 0.0f);
    OnMarkedDirty(node_);
    MarkNetworkUpdate();
}
开发者ID:caivega,项目名称:AtomicGameEngine,代码行数:6,代码来源:Light.cpp


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