Ejemplo n.º 1
0
void ColladaInput::loadFromXml(TiXmlElement* element) {
	ColladaElement::loadFromXml(element);

	loadAttribute(element, "semantic", semantic);
	loadAttribute(element, "source", source);
	loadAttribute(element, "offset", offset);
	loadAttribute(element, "set", set);
}
Ejemplo n.º 2
0
void Image::ShadingStruct::parseXml(QDomNode dataNode)
{
	if (dataNode.isNull())
		return;

	on = dataNode.toElement().attribute("on").toInt();
	//	std::cout << "attrib on: " << dataNode.toElement().attribute("on")  << " : " << on << std::endl;
	ambient = loadAttribute(dataNode, "ambient", ambient);
	diffuse = loadAttribute(dataNode, "diffuse", diffuse);
	specular = loadAttribute(dataNode, "specular", specular);
	specularPower = loadAttribute(dataNode, "specularPower", specularPower);
}
Ejemplo n.º 3
0
bool ATOM_LightNode::onLoad (ATOM_RenderDevice *device)
{
	ATOM_STACK_TRACE(ATOM_LightNode::onLoad);

	if (getNodeFileName().empty ())
	{
		return true;
	}
	else
	{
		ATOM_AutoFile f(getNodeFileName().c_str(), ATOM_VFS::read|ATOM_VFS::text);
		if (!f)
		{
			return false;
		}
		unsigned size = f->size();
		char *p = (char*)ATOM_MALLOC(size);
		size = f->read (p, size);
		p[size] = '\0';
		ATOM_TiXmlDocument doc;
		if (!doc.Parse (p))
		{
			ATOM_FREE(p);
			return false;
		}
		ATOM_FREE(p);

		return loadAttribute (doc.RootElement ());
	}
}
Ejemplo n.º 4
0
std::shared_ptr<AbstractTable> TableDumpLoader::load(std::shared_ptr<AbstractTable> intable, 
                                      const compound_metadata_list *meta, 
                                      const Loader::params &args)
{

  // First extract the dictionaries
  for(size_t i=0; i < intable->columnCount(); ++i) {
    std::string name = intable->nameOfColumn(i);
    loadDictionary(name, i, intable);
  }

  // Resize according to meta information
  size_t tableSize = getSize();
  intable->resize(tableSize);
  
  for(size_t i=0; i < intable->columnCount(); ++i) {
    std::string name = intable->nameOfColumn(i);
    loadAttribute(name, i, tableSize, intable);
  }

  return intable;
}
Ejemplo n.º 5
0
void ColladaInstanceVisualScene::loadFromXml(TiXmlElement* element) {
	ColladaElement::loadFromXml(element);

	loadAttribute(element, "sid", sid);
	loadAttribute(element, "url", url);
}