![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Multi-texture renderer. More...
#include <MultiTextureRenderer.h>


Public Member Functions | |
| MultiTextureRenderer () | |
| ~MultiTextureRenderer () override=default | |
| bool | CanHandle (size_t material_count, bool has_pbr_textures, bool has_multiple_map_kd) const override |
| Check if this renderer can handle the given material. More... | |
| RenderingMode | GetMode () const override |
| Get the rendering mode this renderer implements. More... | |
| bool | Apply (vtkLODActor *actor, const class ccMaterialSet *materials, vtkPolyData *polydata, vtkRenderer *renderer) override |
| Apply rendering to actor. More... | |
| bool | Update (vtkActor *actor, const class ccMaterialSet *materials, vtkPolyData *polydata, vtkRenderer *renderer) override |
| Update existing actor with new materials. More... | |
| std::string | GetName () const override |
| Get renderer name for logging. More... | |
| bool | ApplyMaterial (ccMaterial::CShared material, vtkActor *actor, float intensity_scale=1.0f) const |
| Apply material properties to actor. More... | |
Public Member Functions inherited from PclUtils::renders::TextureRendererBase | |
| TextureRendererBase ()=default | |
| virtual | ~TextureRendererBase ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from PclUtils::renders::TextureRendererBase | |
| void | ClearTextures (vtkActor *actor) |
| Helper: Clear all textures from actor. More... | |
| bool | ValidateActor (vtkActor *actor) const |
| Helper: Validate actor. More... | |
| bool | ValidateMaterials (const class ccMaterialSet *materials) const |
| Helper: Validate materials. More... | |
Multi-texture renderer.
Traditional multi-texture rendering using VTK's multi-texture API. Supports multiple textures with blending modes (REPLACE, ADD). Used when:
Definition at line 32 of file MultiTextureRenderer.h.
|
default |
|
overridedefault |
|
overridevirtual |
Apply rendering to actor.
| actor | VTK actor to render |
| materials | Material set |
| polydata | Polygon data (for texture coordinates) |
| renderer | VTK renderer (for lighting setup) |
Implements PclUtils::renders::TextureRendererBase.
Definition at line 67 of file MultiTextureRenderer.cpp.
References ecvColor::RgbaTpl< Type >::a, ApplyMaterial(), PclUtils::renders::TextureRendererBase::ClearTextures(), CVLog::Error(), CVTools::FromQString(), ccMaterial::GetTexture(), CVLog::Print(), CVLog::PrintDebug(), PclUtils::renders::TextureRendererBase::ValidateActor(), PclUtils::renders::TextureRendererBase::ValidateMaterials(), and CVLog::Warning().
Referenced by Update().
| bool PclUtils::renders::MultiTextureRenderer::ApplyMaterial | ( | ccMaterial::CShared | material, |
| vtkActor * | actor, | ||
| float | intensity_scale = 1.0f |
||
| ) | const |
Apply material properties to actor.
Definition at line 582 of file MultiTextureRenderer.cpp.
References ecvColor::RgbaTpl< Type >::a, ecvColor::RgbaTpl< Type >::b, ecvColor::RgbaTpl< Type >::g, and ecvColor::RgbaTpl< Type >::r.
Referenced by Apply().
|
overridevirtual |
Check if this renderer can handle the given material.
| material_count | Number of materials |
| has_pbr_textures | Whether material has PBR textures |
| has_multiple_map_kd | Whether material has multiple map_Kd textures |
Implements PclUtils::renders::TextureRendererBase.
Definition at line 51 of file MultiTextureRenderer.cpp.
|
overridevirtual |
Get the rendering mode this renderer implements.
Implements PclUtils::renders::TextureRendererBase.
Definition at line 63 of file MultiTextureRenderer.cpp.
References PclUtils::renders::MULTI_TEXTURE.
|
overridevirtual |
Get renderer name for logging.
Implements PclUtils::renders::TextureRendererBase.
Definition at line 446 of file MultiTextureRenderer.cpp.
|
overridevirtual |
Update existing actor with new materials.
| actor | VTK actor to update |
| materials | Material set |
| polydata | Polygon data |
| renderer | VTK renderer |
Implements PclUtils::renders::TextureRendererBase.
Definition at line 428 of file MultiTextureRenderer.cpp.
References Apply(), PclUtils::renders::TextureRendererBase::ValidateActor(), PclUtils::renders::TextureRendererBase::ValidateMaterials(), and CVLog::Warning().