ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PclUtils::renders::TextureRendererBase Class Referenceabstract

Base class for all texture renderers. More...

#include <TextureRendererBase.h>

Inheritance diagram for PclUtils::renders::TextureRendererBase:

Public Member Functions

 TextureRendererBase ()=default
 
virtual ~TextureRendererBase ()=default
 
virtual bool CanHandle (size_t material_count, bool has_pbr_textures, bool has_multiple_map_kd) const =0
 Check if this renderer can handle the given material. More...
 
virtual RenderingMode GetMode () const =0
 Get the rendering mode this renderer implements. More...
 
virtual bool Apply (vtkLODActor *actor, const class ccMaterialSet *materials, vtkPolyData *polydata, vtkRenderer *renderer)=0
 Apply rendering to actor. More...
 
virtual bool Update (vtkActor *actor, const class ccMaterialSet *materials, vtkPolyData *polydata, vtkRenderer *renderer)=0
 Update existing actor with new materials. More...
 
virtual std::string GetName () const =0
 Get renderer name for logging. More...
 

Protected Member Functions

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...
 

Detailed Description

Base class for all texture renderers.

Provides common interface and shared functionality for different rendering modes. Subclasses implement specific rendering logic (PBR, multi-texture, etc.)

Definition at line 48 of file TextureRendererBase.h.

Constructor & Destructor Documentation

◆ TextureRendererBase()

PclUtils::renders::TextureRendererBase::TextureRendererBase ( )
default

◆ ~TextureRendererBase()

virtual PclUtils::renders::TextureRendererBase::~TextureRendererBase ( )
virtualdefault

Member Function Documentation

◆ Apply()

virtual bool PclUtils::renders::TextureRendererBase::Apply ( vtkLODActor *  actor,
const class ccMaterialSet materials,
vtkPolyData *  polydata,
vtkRenderer *  renderer 
)
pure virtual

Apply rendering to actor.

Parameters
actorVTK actor to render
materialsMaterial set
polydataPolygon data (for texture coordinates)
rendererVTK renderer (for lighting setup)
Returns
true on success

Implemented in PclUtils::renders::MultiTextureRenderer, and PclUtils::renders::PBRRenderer.

Referenced by PclUtils::renders::TextureRenderManager::Apply().

◆ CanHandle()

virtual bool PclUtils::renders::TextureRendererBase::CanHandle ( size_t  material_count,
bool  has_pbr_textures,
bool  has_multiple_map_kd 
) const
pure virtual

Check if this renderer can handle the given material.

Parameters
material_countNumber of materials
has_pbr_texturesWhether material has PBR textures
has_multiple_map_kdWhether material has multiple map_Kd textures
Returns
true if this renderer can handle the material

Implemented in PclUtils::renders::MultiTextureRenderer, and PclUtils::renders::PBRRenderer.

◆ ClearTextures()

void PclUtils::renders::TextureRendererBase::ClearTextures ( vtkActor *  actor)
protected

Helper: Clear all textures from actor.

Definition at line 20 of file TextureRendererBase.cpp.

Referenced by PclUtils::renders::MultiTextureRenderer::Apply().

◆ GetMode()

virtual RenderingMode PclUtils::renders::TextureRendererBase::GetMode ( ) const
pure virtual

Get the rendering mode this renderer implements.

Implemented in PclUtils::renders::MultiTextureRenderer, and PclUtils::renders::PBRRenderer.

◆ GetName()

virtual std::string PclUtils::renders::TextureRendererBase::GetName ( ) const
pure virtual

◆ Update()

virtual bool PclUtils::renders::TextureRendererBase::Update ( vtkActor *  actor,
const class ccMaterialSet materials,
vtkPolyData *  polydata,
vtkRenderer *  renderer 
)
pure virtual

Update existing actor with new materials.

Parameters
actorVTK actor to update
materialsMaterial set
polydataPolygon data
rendererVTK renderer
Returns
true on success

Implemented in PclUtils::renders::MultiTextureRenderer, and PclUtils::renders::PBRRenderer.

Referenced by PclUtils::renders::TextureRenderManager::Update().

◆ ValidateActor()

bool PclUtils::renders::TextureRendererBase::ValidateActor ( vtkActor *  actor) const
protected

◆ ValidateMaterials()

bool PclUtils::renders::TextureRendererBase::ValidateMaterials ( const class ccMaterialSet materials) const
protected

The documentation for this class was generated from the following files: