示例#1
0
bool ParsedBlockImpl::getNodeProp(const char* name, Node** value)
{
	PBEGIN;
	Node* n = parser->findNodeByName(value_s);
	if (!n) throw SyntaxError(line, "Node not defined");
	*value = n;
	return true;
}
示例#2
0
bool ParsedBlockImpl::getIntersectableProp(const char* name, Intersectable** value)
{
	PBEGIN;
	Geometry* g = parser->findGeometryByName(value_s);
	if (g) {
		*value = g;
		return true;
	}
	Node* node = parser->findNodeByName(value_s);
	if (!node) throw SyntaxError(line, "Intersectable by that name not defined");
	*value = node;
	return true;
}