Allow complex animation expressions
Example: translate along the y-axis following a sin
function.
<animation>
<type>translate</type>
<axis>
<y>1</y>
</axis>
<expression>
<sin>
<product>
<property>/some/position-norm</property>
<value>6.28</value>
</product>
</sin>
</expression>
</animation>
read_value(const SGPropertyNode* configNode, SGPropertyNode* modelRoot,
const char* unit, double defMin, double defMax)
{
+ const SGPropertyNode * expression = configNode->getNode( "expression" );
+ if( expression != NULL )
+ return SGReadDoubleExpression( modelRoot, expression->getChild(0) );
+
SGExpression<double>* value = 0;
std::string inputPropertyName = configNode->getStringValue("property", "");