HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_Imaging Class Reference

#include <HUSD_Imaging.h>

+ Inheritance diagram for HUSD_Imaging:

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
 
typedef UT_Map< HUSD_Path,
UT_Array< UT_Vector3 > > 
HUSD_PointMap
 

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 setLightingMode (HUSD_LightingMode mode)
 
void setHeadlightIntensity (fpreal intensity)
 
void setThreePointLights (const UT_Vector3F &key_color, const UT_Vector2D &key_dir, const UT_Vector3F &fill_color, const UT_Vector2D &fill_dir, const UT_Vector3F &back_color, const UT_Vector2D &back_dir)
 
void setDomeLight (const UT_StringHolder &env_name, const UT_Vector3F &tint, const UT_Vector3F &rotate)
 
void setPhysicalSky (const fpreal32 &sun_int, const UT_Vector2D &sun_dir, const fpreal32 &sky_int, const UT_StringHolder &map_name)
 
void setLighting (bool enable)
 
void setMaterials (bool enable)
 
void setAspectPolicy (HUSD_AspectConformPolicy p)
 
void setAllowStormRenderer (bool allow_storm)
 
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 COP_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 PXL_Raster *background_raster=nullptr, int bleft=-1, int bbottom=-1, int bright=-1, int btop=-1, 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 COP_SlapcompViewInfo *v=nullptr)
 
void setCameraPath (const UT_StringRef &path, bool camera_synced=true)
 
void setRenderPassPrimPath (const HUSD_Path &path)
 
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_StringHolderrendererName () 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_Vector4F &render_region={0.0, 0.0, 0.0, 0.0})
 
const UT_StringArrayrendererPlanes () const
 
bool setOutputPlane (const UT_StringRef &name)
 
const UT_StringHolderoutputPlane () const
 
const UT_StringHoldercurrentAov () const
 
void getRenderStats (UT_Options &stats)
 
void setRenderFocus (int x, int y) const
 
void clearRenderFocus () const
 
void setRenderSettingsDataWindowActive (bool active)
 
void getPrimPathsFromRenderKeys (const UT_Set< HUSD_RenderKey > &keys, HUSD_RenderKeyPathMap &outkeypathmap)
 
void updateDeferredPrims ()
 
void setSlapcompProgramManager (COP_SlapcompDispatcher *manager)
 
bool isSlapcompEnabled () const
 Returns true if slapcomp is enabled. More...
 
bool slapcompStateChanged () const
 
void updatePlanes (bool ignore_slapcomp)
 
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_NonCopyableoperator= (const UT_NonCopyable &)=delete
 

Detailed Description

Definition at line 56 of file HUSD_Imaging.h.

Member Typedef Documentation

Definition at line 63 of file HUSD_Imaging.h.

Member Enumeration Documentation

Enumerator
BUFFER_COLOR_DEPTH 
BUFFER_COLOR 
BUFFER_NONE 

Definition at line 114 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 70 of file HUSD_Imaging.h.

Enumerator
RUNNING_UPDATE_NOT_STARTED 
RUNNING_UPDATE_IN_BACKGROUND 
RUNNING_UPDATE_COMPLETE 
RUNNING_UPDATE_FATAL 

Definition at line 217 of file HUSD_Imaging.h.

Constructor & Destructor Documentation

HUSD_Imaging::HUSD_Imaging ( )
HUSD_Imaging::~HUSD_Imaging ( )

Member Function Documentation

bool HUSD_Imaging::allowUpdates ( ) const
inline

Definition at line 239 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
const UT_StringHolder& HUSD_Imaging::currentAov ( ) const
inline

Definition at line 255 of file HUSD_Imaging.h.

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 PXL_Raster background_raster = nullptr,
int  bleft = -1,
int  bbottom = -1,
int  bright = -1,
int  btop = -1,
fpreal  sx = 0.0,
fpreal  sy = 0.0,
fpreal  sw = 1.0,
fpreal  sh = 1.0 
) const
static bool HUSD_Imaging::getAvailableRenderers ( HUSD_RendererInfoMap info_map)
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
static void HUSD_Imaging::initializeAvailableRenderers ( )
static
void HUSD_Imaging::invokeRendererCommand ( const UT_StringHolder command_name) const
bool HUSD_Imaging::isConverged ( ) const
inline

Definition at line 202 of file HUSD_Imaging.h.

bool HUSD_Imaging::isPausedByUser ( ) const
bool HUSD_Imaging::isSlapcompEnabled ( ) const
inline

Returns true if slapcomp is enabled.

Definition at line 282 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 
)
const UT_StringHolder& HUSD_Imaging::outputPlane ( ) const
inline

Definition at line 254 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 COP_SlapcompViewInfo v = nullptr 
)
bool HUSD_Imaging::rendererCreated ( ) const
const UT_StringHolder& HUSD_Imaging::rendererName ( ) const
inline

Definition at line 209 of file HUSD_Imaging.h.

const UT_StringArray& HUSD_Imaging::rendererPlanes ( ) const
inline

Definition at line 252 of file HUSD_Imaging.h.

void HUSD_Imaging::resumeRender ( )
HUSD_Scene& HUSD_Imaging::scene ( )
inline

Definition at line 200 of file HUSD_Imaging.h.

void HUSD_Imaging::setAllowStormRenderer ( bool  allow_storm)
void HUSD_Imaging::setAllowUpdates ( bool  allow_updates)
inline

Definition at line 241 of file HUSD_Imaging.h.

void HUSD_Imaging::setAOVCompositor ( HUSD_Compositor comp)
inline

Definition at line 197 of file HUSD_Imaging.h.

void HUSD_Imaging::setAspectPolicy ( HUSD_AspectConformPolicy  p)
void HUSD_Imaging::setBackfaceCull ( bool  cull)
void HUSD_Imaging::setCameraPath ( const UT_StringRef path,
bool  camera_synced = true 
)
inline

Definition at line 176 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::setDomeLight ( const UT_StringHolder env_name,
const UT_Vector3F tint,
const UT_Vector3F rotate 
)
void HUSD_Imaging::setDrawComplexity ( float  complexity)
void HUSD_Imaging::setDrawMode ( DrawMode  mode)
bool HUSD_Imaging::setFrame ( fpreal  frame)
void HUSD_Imaging::setHeadlightIntensity ( fpreal  intensity)
void HUSD_Imaging::setLighting ( bool  enable)
bool HUSD_Imaging::setLightingMode ( HUSD_LightingMode  mode)
void HUSD_Imaging::setMaterials ( bool  enable)
bool HUSD_Imaging::setOutputPlane ( const UT_StringRef name)
void HUSD_Imaging::setPhysicalSky ( const fpreal32 sun_int,
const UT_Vector2D sun_dir,
const fpreal32 sky_int,
const UT_StringHolder map_name 
)
void HUSD_Imaging::setPostRenderCallback ( ImagingCallback  cb)
void HUSD_Imaging::setRenderFocus ( int  x,
int  y 
) const
void HUSD_Imaging::setRenderPassPrimPath ( const HUSD_Path path)
inline

Definition at line 194 of file HUSD_Imaging.h.

void HUSD_Imaging::setRenderSettings ( const UT_StringRef settings_path,
int  w = 0,
int  h = 0,
fpreal  resscale = 0.0,
const UT_Vector4F render_region = {0.0, 0.0, 0.0, 0.0} 
)
void HUSD_Imaging::setRenderSettingsDataWindowActive ( bool  active)
void HUSD_Imaging::setScene ( HUSD_Scene *  scene_ref)
void HUSD_Imaging::setSlapcompProgramManager ( COP_SlapcompDispatcher manager)
inline

Definition at line 277 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::setThreePointLights ( const UT_Vector3F key_color,
const UT_Vector2D key_dir,
const UT_Vector3F fill_color,
const UT_Vector2D fill_dir,
const UT_Vector3F back_color,
const UT_Vector2D back_dir 
)
void HUSD_Imaging::showPurposeGuide ( bool  enable)
void HUSD_Imaging::showPurposeProxy ( bool  enable)
void HUSD_Imaging::showPurposeRender ( bool  enable)
bool HUSD_Imaging::slapcompStateChanged ( ) const
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 290 of file HUSD_Imaging.h.

void HUSD_Imaging::terminateRender ( bool  hard_halt = true)
void HUSD_Imaging::updateComposite ( bool  free_buffers_if_missing,
const COP_SlapcompViewInfo v = nullptr 
)
void HUSD_Imaging::updateDeferredPrims ( )
void HUSD_Imaging::updatePlanes ( bool  ignore_slapcomp)

Updates the list of available planes. The plane list is reset and built anew.

void HUSD_Imaging::waitForUpdateToComplete ( )

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