本文整理汇总了C++中Projector::IsOf方法的典型用法代码示例。如果您正苦于以下问题:C++ Projector::IsOf方法的具体用法?C++ Projector::IsOf怎么用?C++ Projector::IsOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projector
的用法示例。
在下文中一共展示了Projector::IsOf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalcRenderOrderRecurse
void OctLevel::CalcRenderOrderRecurse(const Vect &eye, const ViewClip &clip, MeshOrderInfo &meshOrder, OctNode *curNode, BOOL bFullyVisible)
{
OctNode *node = (curNode != NULL) ? curNode : objectTree->GetRoot();
DWORD i;
BOOL bCheckBounds = (node->numChildren > 1) || (node->Leaves.Num() > 0);
if(!bFullyVisible && bCheckBounds)
{
int testVal = clip.BoundsTest(node->bounds);
if(testVal == BOUNDS_INSIDE)
bFullyVisible = TRUE;
else if(testVal == BOUNDS_OUTSIDE)
return;
}
if(node->numChildren)
{
for(i=0; i<8; i++)
{
if(!node->children[i])
continue;
OctNode *child = node->children[i];
CalcRenderOrderRecurse(eye, clip, meshOrder, child, bFullyVisible);
}
}
for(i=0; i<node->Leaves.Num(); i++)
{
LevelObject *leaf = node->Leaves[i];
if(!bFullyVisible && !clip.BoundsVisible(leaf->bounds))
continue;
if(leaf->type == ObjectType_Entity)
{
if(leaf->ent->IsOf(GetClass(MeshEntity)))
{
MeshEntity *meshEnt = (MeshEntity*)leaf->ent;
if(meshEnt->bRenderable)
{
EntityVisible(meshEnt) = TRUE;
meshOrder.AddEntity(meshEnt);
}
}
else if(leaf->ent->IsOf(GetClass(Projector)))
{
Projector *projector = (Projector*)leaf->ent;
if(projector->bRenderable)
{
if(projector->IsOf(GetClass(LitDecal)))
renderLitDecals << (LitDecal*)projector;
else
renderProjectors << projector;
EntityVisible(projector) = TRUE;
}
}
else if(leaf->ent->IsOf(GetClass(Light)))
{
Light *light = (Light*)leaf->ent;
if(light->IsOf(GetClass(SpotLight)))
{
SpotLight *spotLight = (SpotLight*)light;
if(spotLight->IsLightmapped() && !spotLight->NumLitEntities())
continue;
renderSpotLights << spotLight;
}
else if(light->IsOf(GetClass(PointLight)))
{
PointLight *pointLight = (PointLight*)light;
if(pointLight->IsLightmapped() && !pointLight->NumLitEntities())
continue;
renderPointLights << pointLight;
}
}
else
{
Entity *ent = leaf->ent;
if(ent->bRenderable)
{
EntityVisible(ent) = TRUE;
renderEntities << ent;
}
}
}
else if(leaf->type == ObjectType_Brush)
{
Brush *brush = leaf->brush;
brush->bVisible = TRUE;
renderBrushes << brush;
}
}
}