HighMap library (C++)
Loading...
Searching...
No Matches
shadows.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
19#pragma once
20
21#include "highmap/array.hpp"
22#include "macrologger.h"
23
24namespace hmap
25{
26
52Array hillshade(const Array &z,
53 float azimuth,
54 float zenith,
55 float talus_ref = 1.f);
56
68Array shadow_grid(const Array &z, float shadow_talus);
69
83Array shadow_heightmap(const Array &z,
84 float azimuth = 180.f,
85 float zenith = 45.f,
86 float distance = 0.2f);
87
112Array topographic_shading(const Array &z,
113 float azimuth,
114 float zenith,
115 float talus_ref = 1.f);
116
117} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Definition algebra.hpp:28
Array topographic_shading(const Array &z, float azimuth, float zenith, float talus_ref=1.f)
Compute the topographic shadow intensity in the range [-1, 1].
Definition shadows.cpp:33
Array shadow_grid(const Array &z, float shadow_talus)
Compute the shadow intensity using a grid-based technique.
Definition shadows.cpp:50
float distance(const Point &p1, const Point &p2)
Calculates the distance between two points.
Definition points.cpp:93
Array shadow_heightmap(const Array &z, float azimuth=180.f, float zenith=45.f, float distance=0.2f)
Compute crude shadows from a heightmap.
Definition shadows.cpp:67
Array hillshade(const Array &z, float azimuth, float zenith, float talus_ref=1.f)
Compute the shaded relief map (hillshading) from a heightmap.
Definition shadows.cpp:18