background.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright 2011-2013 Blender Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef __BACKGROUND_H__
  17. #define __BACKGROUND_H__
  18. #include "graph/node.h"
  19. #include "util/util_types.h"
  20. CCL_NAMESPACE_BEGIN
  21. class Device;
  22. class DeviceScene;
  23. class Scene;
  24. class Shader;
  25. class Background : public Node {
  26. public:
  27. NODE_DECLARE
  28. float ao_factor;
  29. float ao_distance;
  30. bool use_shader;
  31. bool use_ao;
  32. uint visibility;
  33. Shader *shader;
  34. bool transparent;
  35. bool transparent_glass;
  36. float transparent_roughness_threshold;
  37. bool need_update;
  38. Background();
  39. ~Background();
  40. void device_update(Device *device, DeviceScene *dscene, Scene *scene);
  41. void device_free(Device *device, DeviceScene *dscene);
  42. bool modified(const Background &background);
  43. void tag_update(Scene *scene);
  44. };
  45. CCL_NAMESPACE_END
  46. #endif /* __BACKGROUND_H__ */