Cortex
10.0.0-a4
|
#include <PrimitiveVariableList.h>
Public Member Functions | |
PrimitiveVariableList (const IECore::PrimitiveVariableMap &primVars, const std::map< std::string, std::string > *typeHints=nullptr) | |
int | n () |
char ** | tokens () |
void ** | values () |
This class provides a means of converting from an IECore::PrimitiveVariableMap to the nasty form passable through the Renderman Interface.
IECoreRI::PrimitiveVariableList::PrimitiveVariableList | ( | const IECore::PrimitiveVariableMap & | primVars, |
const std::map< std::string, std::string > * | typeHints = nullptr |
||
) |
Construct a new PrimitiveVariableList given some PrimitiveVariables in a map. Note that the PrimitiveVariableList refers to data within the primVars object, and expects that data to exist for as long as you still use the PrimitiveVariableList (it doesn't copy the list for efficiency reasons). If provided, the typeHints map is used to resolve the type of ambiguous types such as V3fVectorData, which could represent points, normals or vectors. The typeHints map simply maps from the name of the primitive variable to the Renderman type token. It too is expected to exist for as long as you still use the PrimitiveVariableList.
TODO - typeHints is now unused and should be removed
int IECoreRI::PrimitiveVariableList::n | ( | ) |
Returns the number of primitive variables, to be passed as the n argument to the Ri call.
char** IECoreRI::PrimitiveVariableList::tokens | ( | ) |
Returns the tokens to be passed to the Ri call. Note that these have been cast to a non-const form to fit the Ri interface, but you must absolutely not modify the data.
void** IECoreRI::PrimitiveVariableList::values | ( | ) |
Returns the values to be passed to the Ri call. Note that these have been cast to a non-const form to fit the Ri interface, but you must absolutely not modify the data.