void RadiosityRenderer::printTransformData(const MDagPath& dagPath)
{
    printf("got");
	
	
	//This method simply determines the transformation information on the DAG node and prints it out.
    MStatus status;
    MObject transformNode = dagPath.transform(&status);
    // This node has no transform - i.e., it’s the world node
    if (!status && status.statusCode () == MStatus::kInvalidParameter)
        return;
    MFnDagNode transform (transformNode, &status);
    if (!status) {
        status.perror("MFnDagNode constructor");
        return;
    }
    MTransformationMatrix matrix (transform.transformationMatrix());
	//cout << " translation: " << matrix.translation(MSpace::kWorld)
	//<< endl;
    double threeDoubles[3];
    MTransformationMatrix::RotationOrder rOrder;
    matrix.getRotation (threeDoubles, rOrder, MSpace::kWorld);
	
	cout << " rotation: ["
	<< threeDoubles[0] << ", "
	<< threeDoubles[1] << ", "
	<< threeDoubles[2] << "]\n";
    matrix.getScale (threeDoubles, MSpace::kWorld);
	
	cout << " scale: ["
	<< threeDoubles[0] << ", "
	<< threeDoubles[1] << ", "
	<< threeDoubles[2] << "]\n";
	
}
void Exporter::createSceneGraph(MFnDagNode& path, int parentIndex)
{
	Node output;
	std::vector<std::string> pathparts;
	output.name = path.fullPathName().asChar();
	splitStringToVector(output.name, pathparts, "|");
	output.name = pathparts[pathparts.size() - 1];
	if (!strcmp(output.name.c_str(), "persp"))
		return;
	else if (!strcmp(output.name.c_str(), "top"))
		return;
	else if (!strcmp(output.name.c_str(), "side"))
		return;
	else if (!strcmp(output.name.c_str(), "front"))
		return;
	output.parent = parentIndex;
	output.transform = path.transformationMatrix().matrix;



	scene_.sceneGraph.push_back(output);
	int children = path.childCount();
	int parent = scene_.sceneGraph.size() - 1;
	for (int i = 0; i < children; i++)
	{
		cout << path.child(i).apiTypeStr() << endl;
		if (!strcmp(path.child(i).apiTypeStr(), "kMesh")){
			scene_.sceneGraph[parent].type = 1;
			MFnMesh mesh(path.child(i));
			MDagPath dag_path;
			MItDag dag_iter(MItDag::kBreadthFirst, MFn::kMesh);
			int y = 0;
			while (!dag_iter.isDone())
			{
				if (dag_iter.getPath(dag_path))
				{
					MFnDagNode dag_node = dag_path.node();
					if (!dag_node.isIntermediateObject())
					{
						if (!strcmp(mesh.partialPathName().asChar(), dag_node.partialPathName().asChar()))
							scene_.sceneGraph[parent].mesh = y;
						y++;
					}
				}
				dag_iter.next();
			}
		}
//		else if (!strcmp(path.child(i).apiTypeStr(), "kCamera")); kan l�gga till fler typer h�r
		else
		createSceneGraph(MFnDagNode(path.child(i)), parent);
	}


}