2 # include <simgear_config.h>
5 #include <simgear/math/SGMath.hxx>
7 #include "EffectBuilder.hxx"
13 // Given a property node from a pass, get its value either from it or
14 // from the effect parameters.
15 const SGPropertyNode* getEffectPropertyNode(Effect* effect,
16 const SGPropertyNode* prop)
20 if (prop->nChildren() > 0) {
21 const SGPropertyNode* useProp = prop->getChild("use");
22 if (!useProp || !effect->parametersProp)
24 return effect->parametersProp->getNode(useProp->getStringValue());
29 // Get a named child property from pass parameters or effect
31 const SGPropertyNode* getEffectPropertyChild(Effect* effect,
32 const SGPropertyNode* prop,
35 const SGPropertyNode* child = prop->getChild(name);
39 return getEffectPropertyNode(effect, child);
42 BuilderException::BuilderException()
46 BuilderException::BuilderException(const char* message, const char* origin)
47 : sg_exception(message, origin)
51 BuilderException::BuilderException(const std::string& message,
52 const std::string& origin)
53 : sg_exception(message, origin)
57 BuilderException::~BuilderException() throw()