#include <VRAY_Procedural.h>
Public Member Functions | |
| VRAY_ProceduralArg (const char *name=0, const char *type=0, const char *value=0) | |
| ~VRAY_ProceduralArg () | |
| const char * | getName () const |
| Return the name of the argument. | |
| const char * | getType () const |
| Return the storage type of the argument. | |
| const char * | getValue () const |
| Return the default value. | |
Each VRAY_Procedural has its arguments defined by a table of VRAY_ProceduralArg objects. The procedural can query the value of these parameters using VRAY_Procedural::import() at run time (without having to parse argument lists). The list of arguments should be terminated by an entry constructed with default arguments. For example:
static VRAY_ProceduralArg theArgs[] = { VRAY_ProceduralArg("intarg", "int", "0" }, VRAY_ProceduralArg("realarg", "real", "3.1415" }, VRAY_ProceduralArg("stringarg", "string", "foo bar" }, VRAY_ProceduralArg("vectorarg", "real", "1 2 3" }, VRAY_ProceduralArg() } const VRAY_ProceduralArg *getProceduralArgs() { return theArgs; }
VRAY/VRAY_DemoBox.C, VRAY/VRAY_DemoFile.C, VRAY/VRAY_DemoMountain.C, VRAY/VRAY_DemoSprite.C, VRAY/VRAY_DemoStamp.C, and VRAY/VRAY_DemoVolumeSphere.C.
Definition at line 85 of file VRAY_Procedural.h.
| VRAY_ProceduralArg::VRAY_ProceduralArg | ( | const char * | name = 0, |
|
| const char * | type = 0, |
|||
| const char * | value = 0 | |||
| ) | [inline] |
| name | The name of the parameter (must be unique) | |
| type | The storage type of the parameter. This should be one of
| |
| value | A string representing the default values for the argument. For int and real types, the string is tokenized and the number of tokens in the trin determines the vector/tuple size of the argument. For example VRAY_ProceduralArg("a", "int", "1 2 3 4") For string types, the vector size is always 1, and the string is used as the default value. |
const char * passed in. Definition at line 106 of file VRAY_Procedural.h.
| VRAY_ProceduralArg::~VRAY_ProceduralArg | ( | ) | [inline] |
Definition at line 113 of file VRAY_Procedural.h.
| const char* VRAY_ProceduralArg::getName | ( | void | ) | const [inline] |
| const char* VRAY_ProceduralArg::getType | ( | void | ) | const [inline] |
| const char* VRAY_ProceduralArg::getValue | ( | ) | const [inline] |
1.5.9