Amazon VERSION 2.0V1 Guía de usuario Pagina 66

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 65
66
else if (name == "xform")
{
FnKat::GroupBuilder gb;
double translate[] = {0.0, 0.0, -10.0};
gb.set("translate",
FnKat::DoubleAttribute(translate,
3, 3));
gb.setGroupInherit(false);
return gb.build();
}
else if (name == "errorMessage"
&& !_errorMessage.empty())
{
return FnKat::StringAttribute(
_errorMessage);
}
return FnKat::Attribute(0x0);
}
In order to stop Katana from using an SGG plug-in for creating further scene graph locations, if an error in the
creation of locations and/or attributes occurs, the plug-in has to explicitly check for errors, and the getFirstChild()
and getNextSibling() functions of its context classes have to return 0x0, as shown in the following examples:
FnKat::ScenegraphContext*
CubeRootContext::getFirstChild() const
{
if (!_errorOccurred && _numCubes > 0)
{
return new CubeContext(_numCubes, 0);
}
return 0x0;
}
FnKat::ScenegraphContext*
CubeContext::getNextSibling() const
{
if (!_errorOccurred
&& _index < _numberOfCubes - 1)
{
8 SCENE GRAPH GENERATOR PLUG-INS | SGG PLUG-IN API CLASSES
Vista de pagina 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 263 264

Comentarios a estos manuales

Sin comentarios