Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSSGLightmapper Class Reference

#include <qssglightmapper_p.h>

+ Collaboration diagram for QSSGLightmapper:

Classes

struct  BakingControl
 

Public Types

enum class  BakingStatus {
  None , Progress , Warning , Error ,
  Cancelled , Complete
}
 
enum class  LightmapAsset { LightmapImage , MeshWithLightmapUV , LightmapImageList }
 
typedef std::function< void(BakingStatus, std::optional< QString >, BakingControl *)> Callback
 

Public Member Functions

 QSSGLightmapper (QSSGRhiContext *rhiCtx, QSSGRenderer *renderer)
 
 ~QSSGLightmapper ()
 
void reset ()
 
void setOptions (const QSSGLightmapperOptions &options)
 
void setOutputCallback (Callback callback)
 
qsizetype add (const QSSGBakedLightingModel &model)
 
bool bake ()
 

Static Public Member Functions

static QString lightmapAssetPathForLoad (const QSSGRenderModel &model, LightmapAsset asset)
 
static QString lightmapAssetPathForSave (const QSSGRenderModel &model, LightmapAsset asset, const QString &outputFolder={})
 
static QString lightmapAssetPathForSave (LightmapAsset asset, const QString &outputFolder={})
 

Detailed Description

Definition at line 42 of file qssglightmapper_p.h.

Member Typedef Documentation

◆ Callback

typedef std::function<void(BakingStatus, std::optional<QString>, BakingControl*)> QSSGLightmapper::Callback

Definition at line 58 of file qssglightmapper_p.h.

Member Enumeration Documentation

◆ BakingStatus

enum class QSSGLightmapper::BakingStatus
strong
Enumerator
None 
Progress 
Warning 
Error 
Cancelled 
Complete 

Definition at line 45 of file qssglightmapper_p.h.

◆ LightmapAsset

enum class QSSGLightmapper::LightmapAsset
strong
Enumerator
LightmapImage 
MeshWithLightmapUV 
LightmapImageList 

Definition at line 68 of file qssglightmapper_p.h.

Constructor & Destructor Documentation

◆ QSSGLightmapper()

QT_BEGIN_NAMESPACE QSSGLightmapper::QSSGLightmapper ( QSSGRhiContext rhiCtx,
QSSGRenderer renderer 
)

Definition at line 1770 of file qssglightmapper.cpp.

◆ ~QSSGLightmapper()

QSSGLightmapper::~QSSGLightmapper ( )

Definition at line 1774 of file qssglightmapper.cpp.

Member Function Documentation

◆ add()

qsizetype QSSGLightmapper::add ( const QSSGBakedLightingModel model)

Definition at line 1790 of file qssglightmapper.cpp.

Referenced by QSSGLayerRenderData::maybeBakeLightmap().

+ Here is the caller graph for this function:

◆ bake()

bool QSSGLightmapper::bake ( )

Definition at line 1795 of file qssglightmapper.cpp.

References qWarning.

Referenced by QSSGLayerRenderData::maybeBakeLightmap().

+ Here is the caller graph for this function:

◆ lightmapAssetPathForLoad()

QString QSSGLightmapper::lightmapAssetPathForLoad ( const QSSGRenderModel model,
LightmapAsset  asset 
)
static

Definition at line 1803 of file qssglightmapper.cpp.

References LightmapImage, MeshWithLightmapUV, model, and QStringLiteral.

Referenced by QSSGBufferManager::loadLightmap(), and QSSGBufferManager::loadMesh().

+ Here is the caller graph for this function:

◆ lightmapAssetPathForSave() [1/2]

QString QSSGLightmapper::lightmapAssetPathForSave ( const QSSGRenderModel model,
LightmapAsset  asset,
const QString outputFolder = {} 
)
static

Definition at line 1824 of file qssglightmapper.cpp.

References lightmapAssetPathForSave(), LightmapImage, MeshWithLightmapUV, model, and QStringLiteral.

Referenced by lightmapAssetPathForSave().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lightmapAssetPathForSave() [2/2]

QString QSSGLightmapper::lightmapAssetPathForSave ( LightmapAsset  asset,
const QString outputFolder = {} 
)
static

Definition at line 1844 of file qssglightmapper.cpp.

References LightmapImageList, and QStringLiteral.

◆ reset()

void QSSGLightmapper::reset ( )

Definition at line 1778 of file qssglightmapper.cpp.

Referenced by QSSGLayerRenderData::maybeBakeLightmap().

+ Here is the caller graph for this function:

◆ setOptions()

void QSSGLightmapper::setOptions ( const QSSGLightmapperOptions options)

Definition at line 1782 of file qssglightmapper.cpp.

Referenced by QSSGLayerRenderData::maybeBakeLightmap().

+ Here is the caller graph for this function:

◆ setOutputCallback()

void QSSGLightmapper::setOutputCallback ( Callback  callback)

Definition at line 1786 of file qssglightmapper.cpp.

Referenced by QSSGLayerRenderData::maybeBakeLightmap().

+ Here is the caller graph for this function:

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