本文整理汇总了C++中RenderAction类的典型用法代码示例。如果您正苦于以下问题:C++ RenderAction类的具体用法?C++ RenderAction怎么用?C++ RenderAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RenderAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderEnter
Action::ResultE ChunkOverrideGroup::renderEnter(Action *action)
{
RenderAction *pAction = dynamic_cast<RenderAction *>(action);
if(pAction != NULL)
{
pAction->pushState();
ChunkBlock *pBlock = this->finalize(pAction->getRenderProperties());
if(pBlock == NULL)
return Inherited::renderEnter(action);
MFUnrecStateChunkPtr::const_iterator chIt = pBlock->beginChunks();
MFUnrecStateChunkPtr::const_iterator chEnd = pBlock->endChunks ();
UInt32 uiSlot = 0;
while(chIt != chEnd)
{
if(*chIt != NULL && (*chIt)->getIgnore() == false)
pAction->addOverride(uiSlot, *chIt);
++uiSlot;
++chIt;
}
}
return Inherited::renderEnter(action);
}
示例2: renderLeave
ActionBase::ResultE MaterialChunkOverrideGroup::renderLeave(Action *action)
{
RenderAction *pAction = dynamic_cast<RenderAction *>(action);
Material *pMaterial = this->getMaterial();
if(pAction != NULL && pMaterial != NULL)
{
pMaterial = pMaterial->finalize(pAction->getRenderProperties(),
pAction->getWindow ());
if(pMaterial != NULL)
{
ChunkMaterial *pChunkMaterial =
dynamic_cast<ChunkMaterial*>(pMaterial);
if(pChunkMaterial != NULL)
{
ChunkBlockUnrecPtr pBlock = this->finalize(0x0000);
if(pBlock != NULL)
pBlock->clearChunks();
}
return Inherited::renderLeave(action);
}
else
{
pAction->overrideMaterial(NULL, pAction->getActNode());
}
}
return Group::renderLeave(action);
}
示例3: display
// redraw the window
void display(void)
{
WindowPtr win = mgr->getWindow();
//mgr->redraw();
win->activate();
win->frameInit();
//RenderAction *rAct = (RenderAction*)mgr->getAction();
if (multipass)
{
RenderAction *rAct = RenderAction::create();
fbo_vp->setParent(win);
rAct->setWindow(get_pointer(win));
fbo_vp->render(rAct);
fbo_vp->setParent(NullFC);
delete rAct;
//multipass = false;
}
win->getPort(0)->render(dynamic_cast<RenderAction *>(mgr->getAction()));
//win->renderAllViewports(rAct);
win->swap();
win->frameExit();
win->deactivate();
}
示例4: FDEBUG_GV
ActionBase::ResultE TestMultiPartitionStage::renderLeave(Action *action)
{
#ifdef OSG_DUMP_TRAVERSAL
FDEBUG_GV(("Leave TestMultiPartStage %p\n", &(*pCore)));
#endif
RenderAction *a =
dynamic_cast<RenderAction *>(action);
#ifdef OSG_DEBUGX
if(this != NULL && this->getMessage().size() != 0)
{
fprintf(stderr, "StartLeave MPTS %s\n",
this->getMessage().c_str());
}
#endif
/*StageValidator::ValidationStatus eStatus = */ this->validateOnLeave(a);
#ifdef OSG_DEBUGX
a->dumpPartitionList();
#endif
return ActionBase::Continue;
}
示例5: renderActionEnterHandler
Action::ResultE MaterialDrawable::renderActionEnterHandler(Action *action)
{
RenderAction *a = dynamic_cast<RenderAction *>(action);
Material *m = a->getMaterial();
PrimeMaterial *pPrimeMat = NULL;
if(m == NULL)
{
if(this->getMaterial() != NULL)
{
pPrimeMat =
this->getMaterial()->finalize(a->getRenderProperties(),
a->getWindow() );
}
}
else
{
pPrimeMat = m->finalize(a->getRenderProperties(),
a->getWindow ());
}
if(pPrimeMat == NULL)
{
pPrimeMat = getDefaultMaterial();
FNOTICE(("MaterialDrawable::render: no Material!?!\n"));
}
UInt32 uiNPasses = pPrimeMat->getNPasses();
for(UInt32 uiPass = 0; uiPass < uiNPasses; ++uiPass)
{
State *st = pPrimeMat->getState(uiPass);
if(st != NULL)
{
a->dropFunctor(_drawFunc,
st,
pPrimeMat->getSortKey() + uiPass);
}
else
{
FINFO(("%s: Material %p has NULL state for pass %d\n",
OSG_FUNCNAME_MACRO, pPrimeMat, uiPass));
}
}
if(a->pushVisibility())
{
if(a->selectVisibles() == 0)
{
a->popVisibility();
return Action::Skip;
}
}
return Action::Continue;
}
示例6: renderActionLeaveHandler
Action::ResultE MaterialDrawable::renderActionLeaveHandler(Action *action)
{
RenderAction *a = dynamic_cast<RenderAction *>(action);
a->popVisibility();
return Action::Continue;
}
示例7: renderLeave
Action::ResultE ScreenGroup::renderLeave(Action *action)
{
RenderAction *pAction = dynamic_cast<RenderAction *>(action);
pAction->popMatrix();
return Action::Continue;
}
示例8: renderLeave
Action::ResultE Group::renderLeave(Action *action)
{
RenderAction *ra = dynamic_cast<RenderAction *>(action);
ra->popVisibility();
return Action::Continue;
}
示例9: renderLeave
Action::ResultE IconLabel::renderLeave(Action *action)
{
RenderAction *pAction =
dynamic_cast<RenderAction *>(action);
pAction->popVisibility();
return Action::Continue;
}
示例10: renderEnter
Action::ResultE TextLabel::renderEnter(Action *action)
{
RenderAction *pAction =
dynamic_cast<RenderAction *>(action);
pAction->pushVisibility();
return Action::Continue;
}
示例11: renderEnter
Action::ResultE StackedTransform::renderEnter(Action *action)
{
RenderAction *pAction = dynamic_cast<RenderAction *>(action);
pAction->pushVisibility();
pAction->pushMatrix(this->_mTransformation);
return Action::Continue;
}
示例12: renderLeave
Action::ResultE StackedTransform::renderLeave(Action *action)
{
RenderAction *pAction = dynamic_cast<RenderAction *>(action);
pAction->popVisibility();
pAction->popMatrix();
return Action::Continue;
}
示例13: renderEnter
ActionBase::ResultE MaterialChunkOverrideGroup::renderEnter(Action *action)
{
RenderAction *pAction = dynamic_cast<RenderAction *>(action);
Material *pMaterial = this->getMaterial();
if(pAction != NULL && pMaterial != NULL)
{
pMaterial = pMaterial->finalize(pAction->getRenderProperties(),
pAction->getWindow ());
if(pMaterial)
{
ChunkMaterial *pChunkMaterial =
dynamic_cast<ChunkMaterial*>(pMaterial);
if(pChunkMaterial != NULL)
{
const MFUnrecStateChunkPtr *chunks =
pChunkMaterial->getMFChunks();
const MFInt32 *slots =
pChunkMaterial->getMFSlots();
for(unsigned int i = 0; i < chunks->size(); ++i)
{
int slot = i < slots->size() ?
(*slots)[i] :
State::AutoSlotReplace;
StateChunk *chunk = (*chunks)[i];
if(chunk != NULL)
this->addChunk(chunk, slot);
}
return Inherited::renderEnter(action);
}
else
{
Action::ResultE r = Group::renderEnter(action);
// ok all children are culled away so we leave
// immediately and don't set the material!
if(r == Action::Skip)
return r;
pAction->overrideMaterial(pMaterial, pAction->getActNode());
return r;
}
}
}
return Group::renderEnter(action);
}
示例14: renderLeave
ActionBase::ResultE Joint::renderLeave(Action *action)
{
RenderAction *pAction =
dynamic_cast<RenderAction *>(action);
pAction->popVisibility();
pAction->popMatrix();
return ActionBase::Continue;
}
示例15: drop
static void drop(DrawActionBase *action, const BoxVolume &volume, Color3f col)
#endif
{
VolumeDrawWrapper * vdw = new VolumeDrawWrapper(volume, col);
Material::DrawFunctor func;
func = osgTypedMethodFunctor1ObjPtr(vdw, &VolumeDrawWrapper::draw);
RenderAction *ra = dynamic_cast<RenderAction*>(action);
ra->dropFunctor(func, getCPtr(getDefaultUnlitMaterial()));
}