Clarisse 4.0 SP5b SDK  4.0.0.0.5.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Friends | List of all members
IOHelpersDisplayDriver Class Reference

This class is designed to retreive realtime data from a rendering image To use this class, you should first connect to an image. If the display driver is already connected, the connection will fail. You first need to disconnect from it. When the connected image is rendered, IOHelpersDisplayDriver::on_image_level_update is systematically called when it ends. Then depending on the rendering speed: More...

Inheritance diagram for IOHelpersDisplayDriver:
CoreBaseObject CoreBaseType

Public Member Functions

virtual ~IOHelpersDisplayDriver ()
 
bool connect (ModuleImage &image)
 Connects to the specified image.
 
void disconnect ()
 Disconnect from the connected image (if connected).
 
bool is_connected ()
 Return true if connected to an image.
 
ModuleImageget_image () const
 Return the image the display driver is connected to.
 
virtual void on_image_level_update (const ModuleImage::Quality &quality, ImageHandle image)
 called automatically automatically by the thread when it completes the rendering of the connected image.
 
virtual void on_init_render (const ModuleImage::ImageProgressInitInfo &init_data)
 called automatically by the rendering thread starting to render the image.
 
virtual void on_highlight_region (const CoreVector< GMathVec4i > &regions)
 called automatically by the rendering thread when starting to render new regions in the image.
 
virtual void on_draw_region (ImageHandle *progress_image, const CoreVector< GMathVec4i > &regions)
 called automatically by a rendering thread when new regions are available to display.
 
virtual void on_end_render ()
 called automatically by a rendering thread when the image is completed.
 
virtual void on_progress_update (const float &progress)
 called by a rendering thread to retreive the actual rendering percentage of the image (1.0 means it is complete).
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
virtual size_t get_memory_size () const
 
CoreString get_class_info_name () const
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 
bool operator== (const CoreBaseType &obj) const
 

Friends

class IOHelpersDisplayDriverImpl
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 

Detailed Description

This class is designed to retreive realtime data from a rendering image To use this class, you should first connect to an image. If the display driver is already connected, the connection will fail. You first need to disconnect from it. When the connected image is rendered, IOHelpersDisplayDriver::on_image_level_update is systematically called when it ends. Then depending on the rendering speed:

Constructor & Destructor Documentation

IOHelpersDisplayDriver::~IOHelpersDisplayDriver ( )
virtual
Note
Disconnects automatically from the image.

Member Function Documentation

bool IOHelpersDisplayDriver::connect ( ModuleImage image)

Connects to the specified image.

Parameters
[in]imageModuleImage to connect to.
Note
If the display driver is already connected, it the connection will fail and return false.
Before connecting to a new image, you must ensure the driver is disconnected.
Returns
true if successful false otherwise.
virtual void IOHelpersDisplayDriver::on_draw_region ( ImageHandle progress_image,
const CoreVector< GMathVec4i > &  regions 
)
inlinevirtual

called automatically by a rendering thread when new regions are available to display.

Parameters
[in]progress_imagea pointer to the image currently being rendered. This image is incomplete. Make sure to interate only with the regions you received.
[in]regionsa array of completed regions that have just been rendered.
Note
Asynchronous method called from a rendering thread. If the rendering is too quick, this method may not be called by the caller thread.
virtual void IOHelpersDisplayDriver::on_end_render ( )
inlinevirtual

called automatically by a rendering thread when the image is completed.

Note
Asynchronous method called from a rendering thread. If the rendering is fast, this method may not be called by the caller thread.
virtual void IOHelpersDisplayDriver::on_highlight_region ( const CoreVector< GMathVec4i > &  regions)
inlinevirtual

called automatically by the rendering thread when starting to render new regions in the image.

Parameters
[in]regionsa array of regions that will get rendered.
Note
Asynchronous method called from a rendering thread. If the rendering is too quick, this method may not be called by the caller thread.
virtual void IOHelpersDisplayDriver::on_image_level_update ( const ModuleImage::Quality quality,
ImageHandle  image 
)
inlinevirtual

called automatically automatically by the thread when it completes the rendering of the connected image.

Parameters
[in]qualityquality of the image rendered.
[in]imagea handle to the resulting rendered image.
Note
Asynchronous method called from a rendering thread.
virtual void IOHelpersDisplayDriver::on_init_render ( const ModuleImage::ImageProgressInitInfo init_data)
inlinevirtual

called automatically by the rendering thread starting to render the image.

Parameters
[in]init_datastructure containing the data that can be needed to initialize the display
Note
Asynchronous method called from a rendering thread. If the rendering is too quick, this method may not be called by the caller thread.
virtual void IOHelpersDisplayDriver::on_progress_update ( const float &  progress)
inlinevirtual

called by a rendering thread to retreive the actual rendering percentage of the image (1.0 means it is complete).

Note
Asynchronous method called from a rendering thread. If the rendering is too quick, this method may not be called by the caller thread.