Example #1
0
void DocumentImporter::report_unknown_reference(const COLLADAFW::Node &node, const std::string object_type)
{
	std::string id = node.getOriginalId();
	std::string name = node.getName();
	fprintf(stderr,
		"error: node id=\"%s\", name=\"%s\" refers to an undefined %s.\n",
		id.c_str(),
		name.c_str(),
		object_type.c_str());
}
    //------------------------------
	bool NodeLoader::begin__instance_geometry( const instance_geometry__AttributeData& attributeData )
	{
		COLLADAFW::Node* currentNode = mNodeStack.top();

		COLLADAFW::UniqueId instantiatedGeometryUniqueId = getHandlingFilePartLoader()->createUniqueIdFromUrl( attributeData.url, COLLADAFW::Geometry::ID());
		mCurrentMaterialInfo = &getHandlingFilePartLoader()->getMeshMaterialIdInfo();

        COLLADAFW::UniqueId uniqueId = getHandlingFilePartLoader()->createUniqueId ( COLLADAFW::InstanceGeometry::ID() );
		COLLADAFW::InstanceGeometry* instanceGeometry = FW_NEW COLLADAFW::InstanceGeometry ( uniqueId, instantiatedGeometryUniqueId );
		mCurrentInstanceGeometry = instanceGeometry;
		instanceGeometry->setName(currentNode->getName());
		currentNode->getInstanceGeometries().append(instanceGeometry);

		return true;
	}