Amazon VERSION 2.0V1 Guía de usuario Pagina 184

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 183
184
The Op running at its current location will read a, c, and x. For each child GroupAttribute of c it creates a new child
location with the GroupAttribute’s name, for example, child1/child2, and pass the GroupAttribute as that location’s
arguments.
Creating a child in code makes use of the following key function call:
void createChild(const std::string& name,
const std::string& optype = "",
const FnAttribute::Attribute& args = FnAttribute::Attribute(),
ResetRoot resetRoot = ResetRootAuto,
void* privateData = 0x0,
void (*deletePrivateData)(void* data) = 0x0);
The createChild() function creates a child of the location where the Op is being evaluated at. The function also
instructs the Runtime the type of Op that should run there (by default, the same type of Op as the Op that called
createChild()) and the arguments that should be passed to it. In StaticSceneCreate this looks as follows:
for (int childindex = 0; childindex < c.getNumberOfChildren(); ++childindex)
{
std::string childName = c.getChildName(childindex);
FnAttribute::GroupAttribute childArgs = c.getChildByIndex(childindex);
interface.createChild(childName, "", childArgs);
}
Scene Graph Creation
One of the main tasks of an Op is to produce scene graph locations and attributes. The Op API offers a rich set of
functionality in order to do this. There are five key functions that can be used to modify scene graph topology and
control Op execution, which we'll explain below.
24 OP API | THE OP API EXPLAINED
Vista de pagina 183
1 2 ... 179 180 181 182 183 184 185 186 187 188 189 ... 263 264

Comentarios a estos manuales

Sin comentarios