Inheritance diagram for DzShaderCamera:
Methods | |
Boolean | addShader (DzRSLShader shader) |
String | getCameraName () |
String | getDefinitionFile () |
Number | getNumShaders () |
String | getRenderTimeFile () |
DzRSLShader | getShader (Number index) |
Boolean | removeShader (DzRSLShader shader) |
void | setCameraName (String name) |
void | setDefinitionFile (String definitionFile) |
Boolean | setRenderTimeFile (String renderTimeFile) |
Methods (render-time) | |
These methods affect the camera at render-time, and are provided for the render-time script only. Calling these functions from outside the render-time script will have no effect. A global transient variable named Camera - refering to the current DzShaderCamera - exists for the duration of the render-time script. Referencing this variable from outside a render-time script will result in an error. | |
void | declare (Array tokens, Array types) |
void | setDisplay (String name, String type, String mode, Array tokens, Array params) |
void | setHider (String type, Array tokens, Array params) |
void | setOption (String option, Array tokens, Array params) |
Constructors | |
DzShaderCamera (String definitionFile, String renderTimeFile) | |
DzShaderCamera (String definitionFile) | |
DzShaderCamera () |
This class provides a DzBasicCamera derived object with creator-defined properties that will be passed to the RSL Shader at render-time. Properties intended to be used to pass values as arguments to a shader attached to the camera must be added using DzRSLShader. Properties for the camera that will be used by the render-time scripts to set attributes must be added via DzElement::addProperty().
DzShaderCamera::DzShaderCamera | ( | ) |
Default Constructor.
DzShaderCamera::DzShaderCamera | ( | String | definitionFile | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
definitionFile | The relative [to the scripts folder] path to the script file that creates this camera's property list. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
definitionFile | The relative [to the scripts folder] path to the script file that creates this camera's property list. | |
renderTimeFile | The relative path [from the /scripts folder] to the DAZ Script that executes at render time. |
Boolean DzShaderCamera::addShader | ( | DzRSLShader | shader | ) |
Adds shader to this camera's internal list of shaders and sets shader 's owner to this camera.
true
if shader is successfully added to the list (e.g. does not already exist), otherwise false
. Sets the global graphic state by adding a series of RiDeclare calls before RiWorldBegin.
tokens | An Array of the [String] token names to set | |
types | An Array of the corresponding [String] type to set for each token |
var aTokens = [ "Nn", "Pp", "Cc", "Ff" ]; var aParams = [ "varying normal", "varying point", "varying color", "varying float" ]; Camera.declare( aTokens, aParams );
String DzShaderCamera::getCameraName | ( | ) |
String DzShaderCamera::getDefinitionFile | ( | ) |
Number DzShaderCamera::getNumShaders | ( | ) |
String DzShaderCamera::getRenderTimeFile | ( | ) |
DzRSLShader DzShaderCamera::getShader | ( | Number | index | ) |
Boolean DzShaderCamera::removeShader | ( | DzRSLShader | shader | ) |
Removes shader from this camera's internal list of shaders.
true
if shader is successfully removed from the list, otherwise false
. void DzShaderCamera::setCameraName | ( | String | name | ) |
Sets the internal name of the camera; this is not the same as the QObject::name property. By default, this is "Custom"
void DzShaderCamera::setDefinitionFile | ( | String | definitionFile | ) |
Sets the relative path of the [DAZ Script] file that builds this camera's property list.
definitionFile | The relative path [from the /scripts folder] to the DAZ Script that creates this camera's property list |
Camera
- refering to the current DzShaderCamera, exists for the duration of definitionFile. Referencing this variable from outside definitionFile will result in an error. void DzShaderCamera::setDisplay | ( | String | name, | |
String | type, | |||
String | mode, | |||
Array | tokens, | |||
Array | params | |||
) |
Sets the global graphic state by adding a RiDisplayV call before RiWorldBegin.
name | The name of the file or framebuffer to set, depending on type | |
type | The type of display to set; i.e. file, tiff, etc | |
mode | The mode to set; i.e. rgb, rgba, etc | |
tokens | An Array of the [String] tokens to set | |
params | An Array of the corresponding basic type to set for each token |
NEED EXAMPLE
Sets the relative path of the [DAZ Script] file that will be executed at render-time. This script can declare variables, set displays, hiders, and/or options as well as shader parameters for the element, and implement custom logic for special effects.
renderTimeFile | The relative path [from the /scripts folder] to the DAZ Script that executes at render time. |
true
if renderTimeFile is valid, otherwise false
.Camera
- refering to the current DzShaderCamera - exists for the duration of renderTimeFile. Referencing this variable from outside filename will result in an error. See the Render Time Funtions for a list of special functions only available to this script.