MCPcopy Create free account
hub / github.com/OGRECave/ogre / processVisibleObject

Method processVisibleObject

OgreMain/src/OgreRenderQueue.cpp:252–283  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

250
251 //---------------------------------------------------------------------
252 void RenderQueue::processVisibleObject(MovableObject* mo,
253 Camera* cam,
254 bool onlyShadowCasters,
255 VisibleObjectsBoundsInfo* visibleBounds)
256 {
257 // receiveShadows is a material property, so we can query it before LOD
258 bool receiveShadows = getQueueGroup(mo->getRenderQueueGroup())->getShadowsEnabled() && mo->getReceivesShadows();
259
260 if(onlyShadowCasters && !mo->getCastShadows() && !receiveShadows)
261 return;
262
263 mo->_notifyCurrentCamera(cam);
264 if (!mo->isVisible())
265 return;
266
267 const auto& bbox = mo->getWorldBoundingBox(true);
268 const auto& bsphere = mo->getWorldBoundingSphere(true);
269
270 if (!onlyShadowCasters || mo->getCastShadows())
271 {
272 mo->_updateRenderQueue(this);
273 if (visibleBounds)
274 {
275 visibleBounds->merge(bbox, bsphere, cam, receiveShadows);
276 }
277 }
278 // not shadow caster, receiver only?
279 else if (receiveShadows)
280 {
281 visibleBounds->mergeNonRenderedButInFrustum(bbox, bsphere, cam);
282 }
283 }
284
285}
286

Callers 3

processVisibleLeafMethod · 0.80
_addToRenderQueueMethod · 0.80
_findVisibleObjectsMethod · 0.80

Calls 9

getShadowsEnabledMethod · 0.80
getRenderQueueGroupMethod · 0.80
getReceivesShadowsMethod · 0.80
getCastShadowsMethod · 0.80
_notifyCurrentCameraMethod · 0.45
isVisibleMethod · 0.45
_updateRenderQueueMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected