light.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * 3D Engine
  3. * light.h:
  4. * Based on pikuma.com 3D software renderer in C
  5. * Copyright (c) 2021 986-Studio. All rights reserved.
  6. *
  7. * Created by Manoël Trapier on 06/03/2021.
  8. */
  9. #ifndef THREEDENGINE_SOURCE_INCLUDE_LIGHT_H
  10. #define THREEDENGINE_SOURCE_INCLUDE_LIGHT_H
  11. #include <vector.h>
  12. #include <display.h>
  13. /***********************************************************************************************************************
  14. * Data types
  15. **********************************************************************************************************************/
  16. typedef struct light_t
  17. {
  18. vec3_t direction;
  19. } light_t;
  20. /***********************************************************************************************************************
  21. * Prototypes
  22. **********************************************************************************************************************/
  23. void createLight(light_t *light, vec3_t direction);
  24. colour_t applyLight(colour_t c, double lightLevel);
  25. #endif /* THREEDENGINE_SOURCE_INCLUDE_LIGHT_H */