本文整理汇总了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();
}
示例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();
}
示例3: Max
void Drawable2D::SetPixelsPerUnit(float pixelsPerUnit)
{
pixelsPerUnit_ = Max(1.0f, pixelsPerUnit);
verticesDirty_ = true;
geometryDirty_ = true;
OnMarkedDirty(node_);
MarkNetworkUpdate();
}
示例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();
}
示例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_);
}
示例6: OnMarkedDirty
void Text3D::SetFaceCameraMode(FaceCameraMode mode)
{
if (mode != faceCameraMode_)
{
faceCameraMode_ = mode;
// Bounding box must be recalculated
OnMarkedDirty(node_);
}
}
示例7: OnMarkedDirty
void Drawable2D::SetZValue(float zValue)
{
if (zValue == zValue_)
return;
zValue_ = zValue;
verticesDirty_ = true;
geometryDirty_ = true;
OnMarkedDirty(node_);
MarkNetworkUpdate();
}
示例8: OnMarkedDirty
void Text3D::SetFixedScreenSize(bool enable)
{
if (enable != fixedScreenSize_)
{
fixedScreenSize_ = enable;
// Bounding box must be recalculated
OnMarkedDirty(node_);
MarkNetworkUpdate();
}
}
示例9: UpdateMaterial
void Drawable2D::SetSprite(Sprite2D* sprite)
{
if (sprite == sprite_)
return;
sprite_ = sprite;
verticesDirty_ = true;
geometryDirty_ = true;
UpdateMaterial();
OnMarkedDirty(node_);
MarkNetworkUpdate();
}
示例10: instanceWeak
void StaticModelGroup::RemoveInstanceNode(Node* node)
{
if (!node)
return;
WeakPtr<Node> instanceWeak(node);
node->RemoveListener(this);
instanceNodes_.Remove(instanceWeak);
UpdateNodeIDs();
OnMarkedDirty(GetNode());
MarkNetworkUpdate();
}
示例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();
}
示例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();
}
示例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());
}
示例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());
}
示例15: Max
void Light::SetRange(float range)
{
range_ = Max(range, 0.0f);
OnMarkedDirty(node_);
MarkNetworkUpdate();
}