Fixed coding style
This commit is contained in:
parent
b376d7f8e9
commit
b51ce3426d
5 changed files with 8 additions and 7 deletions
|
@ -169,8 +169,8 @@ Color GodRaysSampler::apply(const Color &raw, const Color &atmosphered, const Ve
|
||||||
inline double GodRaysSampler::getCache(int x, int y, int z) {
|
inline double GodRaysSampler::getCache(int x, int y, int z) {
|
||||||
double *cache = data + z * samples_x * samples_y + y * samples_x + x;
|
double *cache = data + z * samples_x * samples_y + y * samples_x + x;
|
||||||
if (*cache < 0.0) {
|
if (*cache < 0.0) {
|
||||||
Vector3 location =
|
Vector3 location = Vector3(bounds->getStart().x + sampling_step * to_double(x),
|
||||||
Vector3(bounds->getStart().x + sampling_step * to_double(x), bounds->getStart().y + sampling_step * to_double(y),
|
bounds->getStart().y + sampling_step * to_double(y),
|
||||||
bounds->getStart().z + sampling_step * to_double(z));
|
bounds->getStart().z + sampling_step * to_double(z));
|
||||||
double unfiltered_power = getRawLight(location, false).getPower();
|
double unfiltered_power = getRawLight(location, false).getPower();
|
||||||
if (unfiltered_power == 0.0) {
|
if (unfiltered_power == 0.0) {
|
||||||
|
|
|
@ -32,7 +32,8 @@ struct paysages::software::RenderScanlines {
|
||||||
int right;
|
int right;
|
||||||
};
|
};
|
||||||
|
|
||||||
Rasterizer::Rasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id, const Color &color)
|
Rasterizer::Rasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id,
|
||||||
|
const Color &color)
|
||||||
: renderer(renderer), progress(progress), client_id(client_id) {
|
: renderer(renderer), progress(progress), client_id(client_id) {
|
||||||
this->color = new Color(color);
|
this->color = new Color(color);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
#include "VegetationRenderer.h"
|
#include "VegetationRenderer.h"
|
||||||
#include "RayCastingResult.h"
|
#include "RayCastingResult.h"
|
||||||
|
|
||||||
VegetationRasterizer::VegetationRasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id)
|
VegetationRasterizer::VegetationRasterizer(SoftwareRenderer *renderer, RenderProgress *progress,
|
||||||
|
unsigned short client_id)
|
||||||
: TerrainRasterizer(renderer, progress, client_id) {
|
: TerrainRasterizer(renderer, progress, client_id) {
|
||||||
setYOffset(0.5);
|
setYOffset(0.5);
|
||||||
setColor(Color(0.7, 1.0, 0.7, 0.5));
|
setColor(Color(0.7, 1.0, 0.7, 0.5));
|
||||||
|
|
|
@ -19,4 +19,3 @@ TEST(VegetationRasterizer, isUseful) {
|
||||||
|
|
||||||
EXPECT_TRUE(rast.isUseful());
|
EXPECT_TRUE(rast.isUseful());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue