Template Class RaycastingTexturizer
Defined in File RaycastingTexturizer.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public lvr2::Texturizer< BaseVecT >(Template Class Texturizer)
Class Documentation
-
template<typename BaseVecT>
class RaycastingTexturizer : public lvr2::Texturizer<BaseVecT> This class implements the Texturizer interface. It uses Raycasting for the calculation of the texture pixels.
- Template Parameters:
BaseVecT –
Public Types
-
using Ptr = std::shared_ptr<RaycastingTexturizer<BaseVecT>>
-
using IntersectionT = Intersection<intelem::Face, intelem::Point, intelem::Distance>
Public Functions
-
RaycastingTexturizer() = delete
-
RaycastingTexturizer(float texelMinSize, int texMinClusterSize, int texMaxClusterSize, const BaseMesh<BaseVector<float>> &geometry, const ClusterBiMap<FaceHandle> &clusters, const ScanProjectPtr project)
Construct a new Ray Casting Texturizer object.
- Parameters:
texelSize – The size of one texture pixel, relative to the coordinate system of the point cloud
texMinClusterSize – The minimum number of faces a cluster needs to be texturized
texMaxClusterSize – The maximum number of faces a cluster needs to be texturized
-
virtual TextureHandle generateTexture(int index, const PointsetSurface<BaseVecT> &surface, const BoundingRectangle<typename BaseVecT::CoordType> &boundingRect, ClusterHandle cluster) override
Generates a texture for a given bounding rectangle.
Create a grid, based on given information (texel size, bounding rectangle). For each cell in the grid (which represents a texel), cast a ray from the camera to the texel in 3D space to check for visibility. If the texel is visible calculate the texel color based on the RGB image data.
- Parameters:
index – The index the texture will get
surface – The point cloud
boundingRect – The bounding rectangle of the cluster
- Returns:
Texture handle of the generated texture
-
void setClusters(const ClusterBiMap<FaceHandle> &clusters)
-
void setScanProject(const ScanProjectPtr project)
-
inline virtual ~RaycastingTexturizer()