2015-09-29 20:31:25 +00:00
|
|
|
#ifndef GODRAYSRESULT_H
|
|
|
|
#define GODRAYSRESULT_H
|
|
|
|
|
|
|
|
#include "software_global.h"
|
|
|
|
|
|
|
|
#include "Color.h"
|
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace software {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Result of god rays computation.
|
|
|
|
*/
|
2015-11-09 21:30:46 +00:00
|
|
|
class SOFTWARESHARED_EXPORT GodRaysResult {
|
|
|
|
public:
|
2015-09-29 23:08:15 +00:00
|
|
|
typedef struct {
|
|
|
|
double penetration;
|
|
|
|
double resistance;
|
|
|
|
double boost;
|
|
|
|
} GodRaysParams;
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
public:
|
2015-09-29 20:31:25 +00:00
|
|
|
GodRaysResult() = default;
|
|
|
|
GodRaysResult(double inside_length, double full_length);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Apply the result on a base color.
|
|
|
|
*/
|
2015-09-29 23:08:15 +00:00
|
|
|
Color apply(const Color &raw, const Color &atmosphered, const GodRaysParams ¶ms);
|
2015-09-29 20:31:25 +00:00
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
private:
|
2015-09-29 20:31:25 +00:00
|
|
|
double inside_length;
|
|
|
|
double full_length;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // GODRAYSRESULT_H
|