本文整理汇总了C++中OnMarkedDirty函数的典型用法代码示例。如果您正苦于以下问题:C++ OnMarkedDirty函数的具体用法?C++ OnMarkedDirty怎么用?C++ OnMarkedDirty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OnMarkedDirty函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OnMarkedDirty
void TerrainPatch::SetBoundingBox(const BoundingBox& box)
{
boundingBox_ = box;
OnMarkedDirty(node_);
}
开发者ID:LuisAntonRebollo,项目名称:Urho3D,代码行数:5,代码来源:TerrainPatch.cpp
示例17: ATOMIC_PROFILE
void CustomGeometry::Commit()
{
ATOMIC_PROFILE(CommitCustomGeometry);
unsigned totalVertices = 0;
boundingBox_.Clear();
for (unsigned i = 0; i < vertices_.Size(); ++i)
{
totalVertices += vertices_[i].Size();
for (unsigned j = 0; j < vertices_[i].Size(); ++j)
boundingBox_.Merge(vertices_[i][j].position_);
}
// Make sure world-space bounding box will be updated
OnMarkedDirty(node_);
// Resize (recreate) the vertex buffer only if necessary
if (vertexBuffer_->GetVertexCount() != totalVertices || vertexBuffer_->GetElementMask() != elementMask_ ||
vertexBuffer_->IsDynamic() != dynamic_)
vertexBuffer_->SetSize(totalVertices, elementMask_, dynamic_);
if (totalVertices)
{
unsigned char* dest = (unsigned char*)vertexBuffer_->Lock(0, totalVertices, true);
if (dest)
{
unsigned vertexStart = 0;
for (unsigned i = 0; i < vertices_.Size(); ++i)
{
unsigned vertexCount = 0;
for (unsigned j = 0; j < vertices_[i].Size(); ++j)
{
*((Vector3*)dest) = vertices_[i][j].position_;
dest += sizeof(Vector3);
if (elementMask_ & MASK_NORMAL)
{
*((Vector3*)dest) = vertices_[i][j].normal_;
dest += sizeof(Vector3);
}
if (elementMask_ & MASK_COLOR)
{
*((unsigned*)dest) = vertices_[i][j].color_;
dest += sizeof(unsigned);
}
if (elementMask_ & MASK_TEXCOORD1)
{
*((Vector2*)dest) = vertices_[i][j].texCoord_;
dest += sizeof(Vector2);
}
if (elementMask_ & MASK_TANGENT)
{
*((Vector4*)dest) = vertices_[i][j].tangent_;
dest += sizeof(Vector4);
}
++vertexCount;
}
geometries_[i]->SetVertexBuffer(0, vertexBuffer_);
geometries_[i]->SetDrawRange(primitiveTypes_[i], 0, 0, vertexStart, vertexCount);
vertexStart += vertexCount;
}
vertexBuffer_->Unlock();
}
else
ATOMIC_LOGERROR("Failed to lock custom geometry vertex buffer");
}
else
{
for (unsigned i = 0; i < geometries_.Size(); ++i)
{
geometries_[i]->SetVertexBuffer(0, vertexBuffer_);
geometries_[i]->SetDrawRange(primitiveTypes_[i], 0, 0, 0, 0);
}
}
vertexBuffer_->ClearDataLost();
}
开发者ID:JimMarlowe,项目名称:AtomicGameEngine,代码行数:84,代码来源:CustomGeometry.cpp
示例18: Clamp
void Light::SetFov(float fov)
{
fov_ = Clamp(fov, 0.0f, M_MAX_FOV);
OnMarkedDirty(node_);
MarkNetworkUpdate();
}
开发者ID:caivega,项目名称:AtomicGameEngine,代码行数:6,代码来源:Light.cpp
示例19: OnMarkedDirty
void Light::SetLightType(LightType type)
{
lightType_ = type;
OnMarkedDirty(node_);
MarkNetworkUpdate();
}
开发者ID:caivega,项目名称:AtomicGameEngine,代码行数:6,代码来源:Light.cpp
示例20: OnMarkedDirty
void StaticModel::SetBoundingBox(const BoundingBox& box)
{
boundingBox_ = box;
OnMarkedDirty(node_);
}
开发者ID:ezhangle,项目名称:AtomicGameEngine,代码行数:5,代码来源:StaticModel.cpp
注:本文中的OnMarkedDirty函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论