Beispiel #1
0
void EntityRenderer::doRenderUpdateSynchronous(const ScenePointer& scene, Transaction& transaction, const EntityItemPointer& entity) {
    DETAILED_PROFILE_RANGE(simulation_physics, __FUNCTION__);
    withWriteLock([&] {
        auto transparent = isTransparent();
        if (_prevIsTransparent && !transparent) {
            _isFading = false;
        }
        _prevIsTransparent = transparent;

        bool success = false;
        auto bound = entity->getAABox(success);
        if (success) {
            _bound = bound;
        }
        auto newModelTransform = entity->getTransformToCenter(success);
        if (success) {
            _modelTransform = newModelTransform;
        }

        _moving = entity->isMovingRelativeToParent();
        _visible = entity->getVisible();
        _canCastShadow = entity->getCanCastShadow();
        _cauterized = entity->getCauterized();
        _needsRenderUpdate = false;
    });
}