HDK
|
#include <HUSD_Imaging.h>
Classes | |
struct | SlapcompViewInfo |
Public Types | |
enum | DrawMode { DRAW_WIRE, DRAW_SHADED_NO_LIGHTING, DRAW_SHADED_FLAT, DRAW_SHADED_SMOOTH, DRAW_WIRE_SHADED_SMOOTH } |
enum | BufferSet { BUFFER_COLOR_DEPTH, BUFFER_COLOR, BUFFER_NONE } |
enum | RunningStatus { RUNNING_UPDATE_NOT_STARTED = 0, RUNNING_UPDATE_IN_BACKGROUND, RUNNING_UPDATE_COMPLETE, RUNNING_UPDATE_FATAL } |
typedef UT_Function< void(HUSD_Imaging *imaging)> | ImagingCallback |
Public Member Functions | |
HUSD_Imaging () | |
~HUSD_Imaging () | |
void | setScene (HUSD_Scene *scene_ref) |
void | showPurposeRender (bool enable) |
void | showPurposeProxy (bool enable) |
void | showPurposeGuide (bool enable) |
void | setDrawMode (DrawMode mode) |
void | setDrawComplexity (float complexity) |
void | setBackfaceCull (bool cull) |
void | setStage (const HUSD_DataHandle &data_handle, const HUSD_ConstOverridesPtr &overrides, const HUSD_ConstPostLayersPtr &postlayers) |
bool | setFrame (fpreal frame) |
bool | setDefaultLights (bool doheadlight, bool dodomelight) |
void | setHeadlightIntensity (fpreal intensity) |
void | setLighting (bool enable) |
void | setMaterials (bool enable) |
void | setAspectPolicy (HUSD_AspectConformPolicy p) |
BufferSet | hasAOVBuffers () const |
void | setPostRenderCallback (ImagingCallback cb) |
bool | getUsingCoreProfile () |
bool | canBackgroundRender (const UT_StringRef &name) const |
bool | launchBackgroundRender (const UT_Matrix4D &view_matrix, const UT_Matrix4D &proj_matrix, const UT_DimRect &viewport_rect, const UT_StringRef &renderer, const UT_Options *render_opts, bool cam_effects) |
void | waitForUpdateToComplete () |
bool | checkRender (bool do_render) |
void | updateComposite (bool free_buffers_if_missing, const SlapcompViewInfo *v=nullptr) |
HUSD_RenderBuffer | getAOVBuffer (const UT_StringRef &name) const |
Returns one of the primary buffers. More... | |
HUSD_RenderBuffer | getAOVBufferIncludingExtra (const UT_StringRef &name) const |
Returns a buffer even if it is an extra buffer. More... | |
void | getAOVRasters (const UT_Vector2i &res, const UT_StringHolder &aovpattern, UT_StringArray &aovnames, UT_StringMap< UT_UniquePtr< PXL_Raster >> &rasters, const TIL_Raster *background_raster=nullptr, int bleft=0, int bbottom=0, int bright=0, int btop=0, fpreal sx=0.0, fpreal sy=0.0, fpreal sw=1.0, fpreal sh=1.0) const |
bool | getAOVBufferInfo (UT_Vector2i &resolution, UT_DimRect &data_window) const |
bool | render (const UT_Matrix4D &view_matrix, const UT_Matrix4D &proj_matrix, const UT_DimRect &viewport_rect, const UT_StringRef &renderer, const UT_Options *render_opts, bool cam_effects, const SlapcompViewInfo *v=nullptr) |
void | setCameraPath (const UT_StringRef &path, bool camera_synced=true) |
void | setAOVCompositor (HUSD_Compositor *comp) |
HUSD_Scene & | scene () |
bool | isConverged () const |
void | terminateRender (bool hard_halt=true) |
bool | getBoundingBox (UT_BoundingBox &bbox, const UT_Matrix3R *rot) const |
const UT_StringHolder & | rendererName () const |
void | getRendererCommands (UT_StringArray &command_names, UT_StringArray &command_descriptions) const |
void | invokeRendererCommand (const UT_StringHolder &command_name) const |
bool | isUpdateRunning () const |
bool | isUpdateComplete () const |
void | pauseRender () |
void | resumeRender () |
bool | canPause () const |
bool | isPausedByUser () const |
bool | isStoppedByUser () const |
bool | rendererCreated () const |
bool | allowUpdates () const |
void | setAllowUpdates (bool allow_updates) |
void | setRenderSettings (const UT_StringRef &settings_path, int w=0, int h=0, fpreal resscale=0.0) |
const UT_StringArray & | rendererPlanes () const |
bool | setOutputPlane (const UT_StringRef &name) |
const UT_StringHolder & | outputPlane () const |
const UT_StringHolder & | currentAov () const |
void | getRenderStats (UT_Options &stats) |
void | setRenderFocus (int x, int y) const |
void | clearRenderFocus () const |
void | setRenderRegionActive (bool active) |
void | setDataWindowActive (bool active) |
void | getPrimPathsFromRenderKeys (const UT_Set< HUSD_RenderKey > &keys, HUSD_RenderKeyPathMap &outkeypathmap) |
void | updateDeferredPrims () |
void | setSlapcompProgram (COP_ApexProgram *program) |
Set the slapcomp program that should be used when slapcomp is enabled. More... | |
void | enableSlapcomp (bool do_slap) |
bool | isSlapcompEnabled () const |
Returns true if slapcomp is enabled. More... | |
bool | slapcompStateChanged () const |
bool | hasSlapcompErrors () const |
Returns true if the last run of slapcomp had errors. More... | |
void | reportSlapcompError (const char *error) |
void | reportSlapcompWarning (const char *error) |
Slapcomp warning reporting. More... | |
void | setSlapcompErrorCallback (void(*cb)(void *, const char *), void *data) |
Sets a callback that gets called when reporting errors. More... | |
void | setSlapcompWarningCallback (void(*cb)(void *, const char *), void *data) |
Sets a callback that gets called when reporting warnings. More... | |
void | handleCopTextureChange (bool time_changed) |
void | setCopTextureChangeCallback (ImagingCallback cb) |
Set a callback that is run at the end of handleCopTextureChange. More... | |
Static Public Member Functions | |
static void | initializeAvailableRenderers () |
static bool | getAvailableRenderers (HUSD_RendererInfoMap &info_map) |
Additional Inherited Members | |
Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable | |
UT_NonCopyable ()=default | |
~UT_NonCopyable ()=default | |
UT_NonCopyable (const UT_NonCopyable &)=delete | |
UT_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
Definition at line 51 of file HUSD_Imaging.h.
typedef UT_Function<void (HUSD_Imaging *imaging)> HUSD_Imaging::ImagingCallback |
Definition at line 58 of file HUSD_Imaging.h.
Enumerator | |
---|---|
BUFFER_COLOR_DEPTH | |
BUFFER_COLOR | |
BUFFER_NONE |
Definition at line 90 of file HUSD_Imaging.h.
Enumerator | |
---|---|
DRAW_WIRE | |
DRAW_SHADED_NO_LIGHTING | |
DRAW_SHADED_FLAT | |
DRAW_SHADED_SMOOTH | |
DRAW_WIRE_SHADED_SMOOTH |
Definition at line 64 of file HUSD_Imaging.h.
Enumerator | |
---|---|
RUNNING_UPDATE_NOT_STARTED | |
RUNNING_UPDATE_IN_BACKGROUND | |
RUNNING_UPDATE_COMPLETE | |
RUNNING_UPDATE_FATAL |
Definition at line 203 of file HUSD_Imaging.h.
HUSD_Imaging::HUSD_Imaging | ( | ) |
HUSD_Imaging::~HUSD_Imaging | ( | ) |
|
inline |
Definition at line 225 of file HUSD_Imaging.h.
bool HUSD_Imaging::canBackgroundRender | ( | const UT_StringRef & | name | ) | const |
bool HUSD_Imaging::canPause | ( | ) | const |
bool HUSD_Imaging::checkRender | ( | bool | do_render | ) |
void HUSD_Imaging::clearRenderFocus | ( | ) | const |
|
inline |
Definition at line 240 of file HUSD_Imaging.h.
void HUSD_Imaging::enableSlapcomp | ( | bool | do_slap | ) |
Turn slapcomp on or off. setSlapcompProgram() should be called prior to this.
HUSD_RenderBuffer HUSD_Imaging::getAOVBuffer | ( | const UT_StringRef & | name | ) | const |
Returns one of the primary buffers.
HUSD_RenderBuffer HUSD_Imaging::getAOVBufferIncludingExtra | ( | const UT_StringRef & | name | ) | const |
Returns a buffer even if it is an extra buffer.
bool HUSD_Imaging::getAOVBufferInfo | ( | UT_Vector2i & | resolution, |
UT_DimRect & | data_window | ||
) | const |
void HUSD_Imaging::getAOVRasters | ( | const UT_Vector2i & | res, |
const UT_StringHolder & | aovpattern, | ||
UT_StringArray & | aovnames, | ||
UT_StringMap< UT_UniquePtr< PXL_Raster >> & | rasters, | ||
const TIL_Raster * | background_raster = nullptr , |
||
int | bleft = 0 , |
||
int | bbottom = 0 , |
||
int | bright = 0 , |
||
int | btop = 0 , |
||
fpreal | sx = 0.0 , |
||
fpreal | sy = 0.0 , |
||
fpreal | sw = 1.0 , |
||
fpreal | sh = 1.0 |
||
) | const |
|
static |
bool HUSD_Imaging::getBoundingBox | ( | UT_BoundingBox & | bbox, |
const UT_Matrix3R * | rot | ||
) | const |
void HUSD_Imaging::getPrimPathsFromRenderKeys | ( | const UT_Set< HUSD_RenderKey > & | keys, |
HUSD_RenderKeyPathMap & | outkeypathmap | ||
) |
void HUSD_Imaging::getRendererCommands | ( | UT_StringArray & | command_names, |
UT_StringArray & | command_descriptions | ||
) | const |
void HUSD_Imaging::getRenderStats | ( | UT_Options & | stats | ) |
bool HUSD_Imaging::getUsingCoreProfile | ( | ) |
void HUSD_Imaging::handleCopTextureChange | ( | bool | time_changed | ) |
Called by our data micro node that monitors for changes to COP textures used by karma renders. When this function is called we need to restart the render.
BufferSet HUSD_Imaging::hasAOVBuffers | ( | ) | const |
|
inline |
Returns true if the last run of slapcomp had errors.
Definition at line 281 of file HUSD_Imaging.h.
|
static |
void HUSD_Imaging::invokeRendererCommand | ( | const UT_StringHolder & | command_name | ) | const |
|
inline |
Definition at line 188 of file HUSD_Imaging.h.
bool HUSD_Imaging::isPausedByUser | ( | ) | const |
|
inline |
Returns true if slapcomp is enabled.
Definition at line 272 of file HUSD_Imaging.h.
bool HUSD_Imaging::isStoppedByUser | ( | ) | const |
bool HUSD_Imaging::isUpdateComplete | ( | ) | const |
bool HUSD_Imaging::isUpdateRunning | ( | ) | const |
bool HUSD_Imaging::launchBackgroundRender | ( | const UT_Matrix4D & | view_matrix, |
const UT_Matrix4D & | proj_matrix, | ||
const UT_DimRect & | viewport_rect, | ||
const UT_StringRef & | renderer, | ||
const UT_Options * | render_opts, | ||
bool | cam_effects | ||
) |
|
inline |
Definition at line 239 of file HUSD_Imaging.h.
void HUSD_Imaging::pauseRender | ( | ) |
bool HUSD_Imaging::render | ( | const UT_Matrix4D & | view_matrix, |
const UT_Matrix4D & | proj_matrix, | ||
const UT_DimRect & | viewport_rect, | ||
const UT_StringRef & | renderer, | ||
const UT_Options * | render_opts, | ||
bool | cam_effects, | ||
const SlapcompViewInfo * | v = nullptr |
||
) |
bool HUSD_Imaging::rendererCreated | ( | ) | const |
|
inline |
Definition at line 195 of file HUSD_Imaging.h.
|
inline |
Definition at line 237 of file HUSD_Imaging.h.
void HUSD_Imaging::reportSlapcompError | ( | const char * | error | ) |
Slapcomp error reporting. This also activates the mySlapcompHasErrors flag.
void HUSD_Imaging::reportSlapcompWarning | ( | const char * | error | ) |
Slapcomp warning reporting.
void HUSD_Imaging::resumeRender | ( | ) |
|
inline |
Definition at line 186 of file HUSD_Imaging.h.
|
inline |
Definition at line 227 of file HUSD_Imaging.h.
|
inline |
Definition at line 183 of file HUSD_Imaging.h.
void HUSD_Imaging::setAspectPolicy | ( | HUSD_AspectConformPolicy | p | ) |
void HUSD_Imaging::setBackfaceCull | ( | bool | cull | ) |
|
inline |
Definition at line 167 of file HUSD_Imaging.h.
void HUSD_Imaging::setCopTextureChangeCallback | ( | ImagingCallback | cb | ) |
Set a callback that is run at the end of handleCopTextureChange.
void HUSD_Imaging::setDataWindowActive | ( | bool | active | ) |
bool HUSD_Imaging::setDefaultLights | ( | bool | doheadlight, |
bool | dodomelight | ||
) |
bool HUSD_Imaging::setFrame | ( | fpreal | frame | ) |
void HUSD_Imaging::setLighting | ( | bool | enable | ) |
void HUSD_Imaging::setMaterials | ( | bool | enable | ) |
bool HUSD_Imaging::setOutputPlane | ( | const UT_StringRef & | name | ) |
void HUSD_Imaging::setPostRenderCallback | ( | ImagingCallback | cb | ) |
void HUSD_Imaging::setRenderRegionActive | ( | bool | active | ) |
void HUSD_Imaging::setRenderSettings | ( | const UT_StringRef & | settings_path, |
int | w = 0 , |
||
int | h = 0 , |
||
fpreal | resscale = 0.0 |
||
) |
void HUSD_Imaging::setScene | ( | HUSD_Scene * | scene_ref | ) |
|
inline |
Sets a callback that gets called when reporting errors.
Definition at line 289 of file HUSD_Imaging.h.
|
inline |
Set the slapcomp program that should be used when slapcomp is enabled.
Definition at line 266 of file HUSD_Imaging.h.
|
inline |
Sets a callback that gets called when reporting warnings.
Definition at line 297 of file HUSD_Imaging.h.
void HUSD_Imaging::setStage | ( | const HUSD_DataHandle & | data_handle, |
const HUSD_ConstOverridesPtr & | overrides, | ||
const HUSD_ConstPostLayersPtr & | postlayers | ||
) |
void HUSD_Imaging::showPurposeGuide | ( | bool | enable | ) |
void HUSD_Imaging::showPurposeProxy | ( | bool | enable | ) |
void HUSD_Imaging::showPurposeRender | ( | bool | enable | ) |
|
inline |
If this returns true, then the last attempted application of slapcomp may have changed the possible outputs and/or the current display AOV. This flag is reset before each application of slapcomp.
Definition at line 277 of file HUSD_Imaging.h.
void HUSD_Imaging::terminateRender | ( | bool | hard_halt = true | ) |
void HUSD_Imaging::updateComposite | ( | bool | free_buffers_if_missing, |
const SlapcompViewInfo * | v = nullptr |
||
) |
void HUSD_Imaging::updateDeferredPrims | ( | ) |
void HUSD_Imaging::waitForUpdateToComplete | ( | ) |