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
23namespace hmap
24{
25
51Array hillshade(const Array &z,
52 float azimuth,
53 float zenith,
54 float talus_ref = 1.f);
55
67Array shadow_grid(const Array &z, float shadow_talus);
68
82Array shadow_heightmap(const Array &z,
83 float azimuth = 180.f,
84 float zenith = 45.f,
85 float distance = 0.2f);
86
111Array topographic_shading(const Array &z,
112 float azimuth,
113 float zenith,
114 float talus_ref = 1.f);
115
116} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Definition algebra.hpp:23
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:52
float distance(const Point &p1, const Point &p2)
Calculates the distance between two points.
Definition points.cpp:133
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:71
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:16