MCPcopy Create free account
hub / github.com/axmolengine/axmol / visit

Method visit

core/2d/ParticleBatchNode.cpp:132–160  ·  view source on GitHub ↗

override visit. Don't call visit on it's children

Source from the content-addressed store, hash-verified

130// override visit.
131// Don't call visit on it's children
132void ParticleBatchNode::visit(Renderer* renderer, const Mat4& parentTransform, uint32_t parentFlags)
133{
134 // CAREFUL:
135 // This visit is almost identical to Node#visit
136 // with the exception that it doesn't call visit on it's children
137 //
138 // The alternative is to have a void Sprite#visit, but
139 // although this is less maintainable, is faster
140 //
141 if (!_visible)
142 {
143 return;
144 }
145
146 uint32_t flags = processParentFlags(parentTransform, parentFlags);
147
148 if (isVisitableByVisitingCamera())
149 {
150 // IMPORTANT:d
151 // To ease the migration to v3.0, we still support the Mat4 stack,
152 // but it is deprecated and your code should not rely on it
153 _director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
154 _director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);
155
156 draw(renderer, _modelViewTransform, flags);
157
158 _director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
159 }
160}
161
162// override addChild:
163void ParticleBatchNode::addChild(Node* aChild, int zOrder, int tag)

Callers

nothing calls this directly

Calls 4

drawFunction · 0.85
pushMatrixMethod · 0.80
loadMatrixMethod · 0.80
popMatrixMethod · 0.80

Tested by

no test coverage detected