MCPcopy Create free account
hub / github.com/9miao/CrossApp / insertQuadFromView

Method insertQuadFromView

CrossApp/view/CABatchView.cpp:497–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495}
496
497void CABatchView::insertQuadFromView(CrossApp::CAView *view, unsigned int index)
498{
499 CCAssert( view != NULL, "Argument must be non-NULL");
500
501 while(index >= m_pobImageAtlas->getCapacity() || m_pobImageAtlas->getCapacity() == m_pobImageAtlas->getTotalQuads())
502 {
503 this->increaseAtlasCapacity();
504 }
505 view->setBatch(this);
506 view->setAtlasIndex(index);
507
508 ccV3F_C4B_T2F_Quad quad = view->getQuad();
509 m_pobImageAtlas->insertQuad(&quad, index);
510
511 view->setDirty(true);
512 view->updateTransform();
513}
514
515void CABatchView::updateQuadFromView(CrossApp::CAView *view, unsigned int index)
516{

Callers

nothing calls this directly

Calls 6

increaseAtlasCapacityMethod · 0.95
getCapacityMethod · 0.80
getTotalQuadsMethod · 0.80
setBatchMethod · 0.80
insertQuadMethod · 0.80
updateTransformMethod · 0.80

Tested by

no test coverage detected