ECS/Project/Project/GeometryGeneratorSelector/GeometryGeneratorSelector.cpp
//	Generate the Geometry from the OBJ filename, and the parameters.
Generate the Geometry from the OBJ filename, and the parameters.
Generate the Geometry from the OBJ filename and the parameters .
void GeometryGeneratorSelector::generateGeometry(std::vector<std::pair<std::string, std::shared_ptr<GeometryData>>> & geometryList, const ResourceDescription & newResourceDescription)
{
	std::string geometryName = "None";
	bool hasName = newResourceDescription.findProperty("Geometry Name", geometryName);
	std::string geometryType = "None";
	newResourceDescription.findProperty("Geometry Type", geometryType);
	if (geometryType == "OBJ")
	{
		loadGeometryFromObj(geometryList, geometryName, newResourceDescription);
	}
	if (geometryType == "GEN-Icosphere")
	{
		loadGeometryFromIcosphere(geometryList, geometryName, newResourceDescription);
	}
	if (geometryType == "GEN-PlanetRing")
	{
		loadGeometryFromPlanetRing(geometryList, geometryName, newResourceDescription);
	}
}
void GeometryGeneratorSelector :: generateGeometry ( std :: vector < std :: pair < std :: string , std :: shared_ptr < GeometryData > > > & geometryList , const ResourceDescription & newResourceDescription ) { std :: string geometryName = " " ; bool hasName = newResourceDescription . findProperty ( " " , geometryName ) ; std :: string geometryType = " " ; newResourceDescription . findProperty ( " " , geometryType ) ; if ( geometryType == " " ) { loadGeometryFromObj ( geometryList , geometryName , newResourceDescription ) ; } if ( geometryType == " " ) { loadGeometryFromIcosphere ( geometryList , geometryName , newResourceDescription ) ; } if ( geometryType == " " ) { loadGeometryFromPlanetRing ( geometryList , geometryName , newResourceDescription ) ; } }
Generate the Geometry from the OBJ filename, and the parameters.
Generate the Geometry from the OBJ filename and the parameters .
//	Get the Resource Name. Used as the Geometry Name. //	Get the Geometry Type. Used to create the geometry. //	Check if we are supposed to read in obj. //	Load the Object From File, and write it into the new Geommetry Data. //	Check if we are supposed to Generate an Icosphere.