Amazon VERSION 2.0V1 Guide de l'utilisateur Page 66

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 264
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 263 264

Commentaires sur ces manuels

Pas de commentaire