|
HighMap library (C++)
|
#include <terrain_tri_mesh.hpp>
Classes | |
| struct | BoundingBox |
| struct | Edge |
| struct | EdgeHash |
| struct | Neighbor |
| struct | NeighborData |
| struct | Triangle |
Public Member Functions | |
| TerrainTriMesh ()=default | |
| TerrainTriMesh (const std::vector< glm::vec3 > &ref_points) | |
| TerrainTriMesh (const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &z) | |
| void | triangulate_delaunay () |
| void | compute_neighbors () |
| void | compute_gradients () |
| void | relax_xy (float lambda=0.5f, int iterations=1, bool preserve_chull=true) |
| void | relax_xyz (float lambda=0.5f, int iterations=1, bool preserve_chull=true) |
| void | relax_xyz_taubin (float lambda=0.5f, float mu=-0.55f, int iterations=1, bool preserve_chull=true) |
| void | remap_z (float vmin=0.f, float vmax=1.f) |
| void | slope_limiter (float max_slope, int iterations=10, float sigma=0.1f) |
| void | slope_limiter (const std::vector< float > &max_slope, int iterations=10, float sigma=0.1f) |
| void | subdivise () |
| bool | barycentric (const glm::vec2 &p, size_t i0, size_t i1, size_t i2, float &w0, float &w1, float &w2) const |
| int | find_triangle (const glm::vec2 &p, int start_tri=0, bool linear_search=false) const |
| int | neighbor_triangle (int tri_index, int edge_index) const |
| float | interpolate_z_linear (const glm::vec2 &p, int &last_tri, float fill_value=0.f) const |
| float | interpolate_z_linear_gradient (const glm::vec2 &p, int &last_tri, float fill_value=0.f, float gradient_scaling=1.f) const |
| float | interpolate_z_nearest (const glm::vec2 &p) const |
| float | interpolate_z_nearest_approx (const glm::vec2 &p, int &last_tri, float fill_value=0.f) const |
| TerrainTriMesh::BoundingBox | get_bbox () const |
| glm::vec2 | get_range_z () const |
| glm::vec3 | get_reference_lengths () const |
| std::vector< float > | get_vertex_areas (bool normalized) const |
| float | get_reference_area_xy () const |
| float | get_reference_area () const |
| size_t | size () const |
| const std::vector< glm::vec3 > & | get_points () const |
| std::vector< glm::vec3 > & | get_points () |
| const std::vector< Triangle > & | get_triangles () const |
| const std::vector< size_t > & | get_convex_hull () const |
| const NeighborData & | get_neighbors () const |
| bool | export_obj (const std::string &filepath) const |
| std::string | info_string () const |
| void | print_info () const |
| Array | to_array (const glm::ivec2 &shape, const std::vector< float > &values={}, const glm::vec4 &bbox={0.f, 1.f, 0.f, 1.f}) const |
| void | to_csv (const std::string &fname) const |
|
default |
| hmap::TerrainTriMesh::TerrainTriMesh | ( | const std::vector< glm::vec3 > & | ref_points | ) |
| hmap::TerrainTriMesh::TerrainTriMesh | ( | const std::vector< float > & | x, |
| const std::vector< float > & | y, | ||
| const std::vector< float > & | z | ||
| ) |
| void hmap::TerrainTriMesh::triangulate_delaunay | ( | ) |
| void hmap::TerrainTriMesh::compute_neighbors | ( | ) |
| void hmap::TerrainTriMesh::compute_gradients | ( | ) |
| void hmap::TerrainTriMesh::relax_xy | ( | float | lambda = 0.5f, |
| int | iterations = 1, |
||
| bool | preserve_chull = true |
||
| ) |
| void hmap::TerrainTriMesh::relax_xyz | ( | float | lambda = 0.5f, |
| int | iterations = 1, |
||
| bool | preserve_chull = true |
||
| ) |
| void hmap::TerrainTriMesh::relax_xyz_taubin | ( | float | lambda = 0.5f, |
| float | mu = -0.55f, |
||
| int | iterations = 1, |
||
| bool | preserve_chull = true |
||
| ) |
| void hmap::TerrainTriMesh::slope_limiter | ( | float | max_slope, |
| int | iterations = 10, |
||
| float | sigma = 0.1f |
||
| ) |
| void hmap::TerrainTriMesh::slope_limiter | ( | const std::vector< float > & | max_slope, |
| int | iterations = 10, |
||
| float | sigma = 0.1f |
||
| ) |
| void hmap::TerrainTriMesh::subdivise | ( | ) |
| bool hmap::TerrainTriMesh::barycentric | ( | const glm::vec2 & | p, |
| size_t | i0, | ||
| size_t | i1, | ||
| size_t | i2, | ||
| float & | w0, | ||
| float & | w1, | ||
| float & | w2 | ||
| ) | const |
| int hmap::TerrainTriMesh::find_triangle | ( | const glm::vec2 & | p, |
| int | start_tri = 0, |
||
| bool | linear_search = false |
||
| ) | const |
| int hmap::TerrainTriMesh::neighbor_triangle | ( | int | tri_index, |
| int | edge_index | ||
| ) | const |
| float hmap::TerrainTriMesh::interpolate_z_linear | ( | const glm::vec2 & | p, |
| int & | last_tri, | ||
| float | fill_value = 0.f |
||
| ) | const |
| float hmap::TerrainTriMesh::interpolate_z_linear_gradient | ( | const glm::vec2 & | p, |
| int & | last_tri, | ||
| float | fill_value = 0.f, |
||
| float | gradient_scaling = 1.f |
||
| ) | const |
| float hmap::TerrainTriMesh::interpolate_z_nearest | ( | const glm::vec2 & | p | ) | const |
| float hmap::TerrainTriMesh::interpolate_z_nearest_approx | ( | const glm::vec2 & | p, |
| int & | last_tri, | ||
| float | fill_value = 0.f |
||
| ) | const |
| TerrainTriMesh::BoundingBox hmap::TerrainTriMesh::get_bbox | ( | ) | const |
| glm::vec2 hmap::TerrainTriMesh::get_range_z | ( | ) | const |
| glm::vec3 hmap::TerrainTriMesh::get_reference_lengths | ( | ) | const |
| std::vector< float > hmap::TerrainTriMesh::get_vertex_areas | ( | bool | normalized | ) | const |
| float hmap::TerrainTriMesh::get_reference_area_xy | ( | ) | const |
| float hmap::TerrainTriMesh::get_reference_area | ( | ) | const |
| size_t hmap::TerrainTriMesh::size | ( | ) | const |
| const std::vector< glm::vec3 > & hmap::TerrainTriMesh::get_points | ( | ) | const |
| std::vector< glm::vec3 > & hmap::TerrainTriMesh::get_points | ( | ) |
| const std::vector< TerrainTriMesh::Triangle > & hmap::TerrainTriMesh::get_triangles | ( | ) | const |
| const std::vector< size_t > & hmap::TerrainTriMesh::get_convex_hull | ( | ) | const |
| const TerrainTriMesh::NeighborData & hmap::TerrainTriMesh::get_neighbors | ( | ) | const |
| bool hmap::TerrainTriMesh::export_obj | ( | const std::string & | filepath | ) | const |
| std::string hmap::TerrainTriMesh::info_string | ( | ) | const |
| void hmap::TerrainTriMesh::print_info | ( | ) | const |
| Array hmap::TerrainTriMesh::to_array | ( | const glm::ivec2 & | shape, |
| const std::vector< float > & | values = {}, |
||
| const glm::vec4 & | bbox = {0.f, 1.f, 0.f, 1.f} |
||
| ) | const |
| void hmap::TerrainTriMesh::to_csv | ( | const std::string & | fname | ) | const |