---------------------------------------------------------------------
| 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 |
no test coverage detected