supereight
Loading...
Searching...
No Matches
raycaster.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2019 Emanuele Vespa
3 * SPDX-FileCopyrightText: 2020-2023 Smart Robotics Lab, Imperial College London, Technical University of Munich
4 * SPDX-FileCopyrightText: 2020-2023 Nils Funk
5 * SPDX-FileCopyrightText: 2020-2023 Sotiris Papatheodorou
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef SE_RAYCASTER_HPP
10#define SE_RAYCASTER_HPP
11
12#include <optional>
15#include <se/image/image.hpp>
18
19
20
21namespace se {
22namespace raycaster {
23
26 const bool is_lhc = false);
27
28template<typename MapT>
29inline typename std::enable_if_t<MapT::fld_ == se::Field::Occupancy, std::optional<Eigen::Vector4f>>
31 const typename MapT::OctreeType& octree,
32 const Eigen::Vector3f& ray_origin_W,
33 const Eigen::Vector3f& ray_dir_W,
34 const float t_near,
35 const float t_far,
36 const float mu,
37 const float step,
38 const float largestep);
39
40template<typename MapT>
41inline typename std::enable_if_t<MapT::fld_ == se::Field::TSDF, std::optional<Eigen::Vector4f>>
43 const typename MapT::OctreeType& octree,
44 const Eigen::Vector3f& ray_origin_W,
45 const Eigen::Vector3f& ray_dir_W,
46 const float t_near,
47 const float t_far,
48 const float mu,
49 const float step,
50 const float largestep);
51
52template<typename MapT, typename SensorT>
53void raycast_volume(const MapT& map,
54 const SensorT& sensor,
55 const Eigen::Isometry3f& T_WS,
60
77template<typename GetDiffuseColourF>
82 const Eigen::Vector3f& light_source_W = Eigen::Vector3f::Zero(),
83 const RGB ambient_light = RGB{0x1A, 0x1A, 0x1A});
84
92 const Eigen::Vector3f& light_source_W = Eigen::Vector3f::Zero(),
93 const RGB ambient_light = RGB{0x1A, 0x1A, 0x1A});
94
103 const Eigen::Vector3f& light_source_W = Eigen::Vector3f::Zero(),
104 const RGB ambient_light = RGB{0x1A, 0x1A, 0x1A});
105
106} // namespace raycaster
107} // namespace se
108
109#include "impl/raycaster_impl.hpp"
110
111#endif // SE_RAYCASTER_HPP
Definition image.hpp:19
std::enable_if_t< MapT::fld_==se::Field::Occupancy, std::optional< Eigen::Vector4f > > raycast(MapT &map, const typename MapT::OctreeType &octree, const Eigen::Vector3f &ray_origin_W, const Eigen::Vector3f &ray_dir_W, const float t_near, const float t_far, const float mu, const float step, const float largestep)
void render_volume_colour(se::Image< RGBA > &render, const se::Image< Eigen::Vector3f > &surface_points_W, const se::Image< Eigen::Vector3f > &surface_normals_W, const se::Image< RGB > &surface_colour, const Eigen::Vector3f &light_source_W=Eigen::Vector3f::Zero(), const RGB ambient_light=RGB{0x1A, 0x1A, 0x1A})
Render the surface represented by surface_points_W and surface_normals_W into render,...
void render_volume(se::Image< RGBA > &render, const se::Image< Eigen::Vector3f > &surface_points_W, const se::Image< Eigen::Vector3f > &surface_normals_W, const GetDiffuseColourF get_diffuse_colour, const Eigen::Vector3f &light_source_W=Eigen::Vector3f::Zero(), const RGB ambient_light=RGB{0x1A, 0x1A, 0x1A})
Render the surface represented by surface_points_W and surface_normals_W into render.
void render_volume_scale(se::Image< RGBA > &render, const se::Image< Eigen::Vector3f > &surface_points_W, const se::Image< Eigen::Vector3f > &surface_normals_W, const se::Image< int8_t > &surface_scale, const Eigen::Vector3f &light_source_W=Eigen::Vector3f::Zero(), const RGB ambient_light=RGB{0x1A, 0x1A, 0x1A})
Render the surface represented by surface_points_W and surface_normals_W into render,...
void raycast_volume(const MapT &map, const SensorT &sensor, const Eigen::Isometry3f &T_WS, se::Image< Eigen::Vector3f > &surface_point_cloud_W, se::Image< Eigen::Vector3f > &surface_normals_W, se::Image< int8_t > &surface_scale, se::Image< colour_t > *surface_colour=nullptr)
void point_cloud_to_normal(se::Image< Eigen::Vector3f > &normals, const se::Image< Eigen::Vector3f > &point_cloud, const bool is_lhc=false)
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
A colour represented as a Red-Green-Blue tuple with 8-bits per channel.
Definition rgb.hpp:18