Lumiverse
2.5
A framework for creating lighting control applications
|
Interface between ArnoldPatch and arnold. Almost all arnold APIs are called from this class. More...
#include <ArnoldInterface.h>
Public Member Functions | |
ArnoldInterface () | |
Constructs a ArnoldInterface object. More... | |
virtual | ~ArnoldInterface () |
Destroys the object. | |
virtual void | init () |
Initializes the Arnold renderer. More... | |
virtual void | init (const JSONNode jsonPatch) |
Initialize the ArnoldRenderer with a reference to a JSON serialized parent patch. More... | |
virtual void | close () |
Closes the Arnold session. | |
virtual string | getInterfaceType () |
Gets the type of this object. More... | |
int | getWidth () |
Gets the width of result. More... | |
int | getHeight () |
Gets the height of result. More... | |
virtual bool | setDims (int w, int h) |
Sets the dimensions of the image. | |
virtual float * | getBufferPointer () |
Gets the pointer to the frame buffer. More... | |
void | setAssFile (std::string fileName) |
Sets the path to ass file. More... | |
std::string | getAssFile () |
Gets the path to ass file. More... | |
void | setPluginDirectory (std::string dir) |
Sets the directory containing the plugin (buffer_driver). More... | |
std::string | getPluginDirectory () |
Gets the directory containing the plugin (buffer_driver). More... | |
void | setGamma (float gamma) |
Sets the gamma. More... | |
float | getGamma () |
Gets the gamma. More... | |
void | setPredictive (bool predictive) |
Sets the predictive flag. More... | |
bool | getPredictive () |
Gets the predictive flag. More... | |
virtual void | setSamples (int samples) |
Sets the camera sampling rate used for current rendering. More... | |
int | getSamples () |
Gets the sampling rate. More... | |
virtual int | render () |
Starts rendering with Arnold. Returns the error code of AiRender, so the caller can know if the renderer was interrupted. More... | |
virtual int | render (const std::set< Device * > &) |
Fire off a render request using the given set of devices. More... | |
virtual void | interrupt () |
Interrupts current rendering. | |
virtual JSONNode | toJSON () |
Parses the arnold parameter map to a JSON node. More... | |
virtual float | getPercentage () |
Gets the progress of current frame as a percentage. More... | |
BucketPositionInfo * | getBucketPositionInfo () const |
Gets the current bucket for each worker thread. More... | |
size_t | getBucketNumber () const |
Gets number of buckets rendered simultanously. This is usually the number of threads supported by hardware. More... | |
void | setDefaultPath (std::string def_path) |
Sets the default path. More... | |
std::string | getDefaultPath () |
Gets the default path. More... | |
bool | isOpen () |
Checks if this interface is currently open. More... | |
virtual bool | isDistributedOpen () |
Indicates if the distributed interface is currently open In the base class, this is the same as the local status. | |
bool | isUsingCaching () |
Check whether this patch has caching enabled. | |
void | setUsingCaching (bool usingCaching) |
Set whether this interface is using caching. | |
virtual void | loadIfUsingCaching (const set< Device * > &) |
If the interface is caching it should use this function to perform any preload operations it may be doing. | |
Protected Member Functions | |
std::string | toRelativePath (std::string file) |
Converts to relative path with respect to json path. Currently it only checks if the file contains ".ies". More... | |
Static Protected Member Functions | |
static bool | isRelativeFileName (std::string str) |
Checks to see if this arnold STRING parameter is a file. Currently it only checks if the file contains ".ies". More... | |
Protected Attributes | |
std::string | m_ass_file |
The path to ass file. | |
std::string | m_plugin_dir |
The directory containing the plugin (buffer_driver). | |
float * | m_buffer |
The pointer to the frame buffer. | |
int | m_width |
The width of the result. | |
int | m_height |
The height of the result. | |
float | m_gamma |
The gamma for gamma correction. | |
int | m_samples |
Arnold AA samples. | |
bool | m_predictive |
If turn on (so-called) predictive rendering. | |
bool | m_open |
If the interface is currently open. | |
BucketPositionInfo * | m_bucket_pos |
size_t | m_bucket_num |
ProgressInfo | m_progress |
std::string | m_default_path |
string | m_bufDriverName |
bool | m_using_caching |
Is this interface using caching – currently only used for notifying the distributed renderer that it should use the caching driver instead of the buffer driver. | |
Interface between ArnoldPatch and arnold. Almost all arnold APIs are called from this class.
ArnoldInterface is mainly responsible to configure light node of arnold. It keeps a list of mappings from metadata ids to Arnold types. ArnoldInterface also creates and closes Arnold session.
|
inline |
Constructs a ArnoldInterface object.
The frame buffer point is set to NULL. The buffer will be initialized after getting the size of output. The default gamma is 2.2.
|
inline |
Gets the path to ass file.
|
inline |
Gets number of buckets rendered simultanously. This is usually the number of threads supported by hardware.
|
inline |
Gets the current bucket for each worker thread.
|
inlinevirtual |
Gets the pointer to the frame buffer.
|
inline |
Gets the default path.
|
inline |
Gets the gamma.
|
inline |
Gets the height of result.
|
inlinevirtual |
Gets the type of this object.
|
inlinevirtual |
Gets the progress of current frame as a percentage.
|
inline |
Gets the directory containing the plugin (buffer_driver).
|
inline |
Gets the predictive flag.
|
inline |
Gets the sampling rate.
|
inline |
Gets the width of result.
|
virtual |
Initializes the Arnold renderer.
Opens a new Arnold session. Loads ass file and the plugin (buffer_driver).
|
inlinevirtual |
Initialize the ArnoldRenderer with a reference to a JSON serialized parent patch.
Initializes the ArnoldRenderer with a reference to a JSON serialized parent patch. This is currently used by the distributed renderer to send a patch over the wire
|
inline |
Checks if this interface is currently open.
|
inlinestaticprotected |
Checks to see if this arnold STRING parameter is a file. Currently it only checks if the file contains ".ies".
|
virtual |
Starts rendering with Arnold. Returns the error code of AiRender, so the caller can know if the renderer was interrupted.
|
inlinevirtual |
Fire off a render request using the given set of devices.
Fires off a render request with the given set of devices being used in the rendering. This is currently used to notify a distributed renderer about any changes to nodes.
|
inline |
Sets the path to ass file.
fileName | The path to ass file |
|
inline |
Sets the default path.
def_path | The default path. |
|
inline |
Sets the gamma.
gamma | The gamma. |
|
inline |
Sets the directory containing the plugin (buffer_driver).
dir | The directory containing the plugin |
|
inline |
Sets the predictive flag.
predictive | The predictive flag. |
|
virtual |
Sets the camera sampling rate used for current rendering.
Although the system may have multiple camera sampling rates (e.g. for interactive mode and for real rendering), this rate will be used for the current rendering.
samples | The sampling rate. |
|
virtual |
Parses the arnold parameter map to a JSON node.
|
inlineprotected |
Converts to relative path with respect to json path. Currently it only checks if the file contains ".ies".