ECS/Project/Project/GeometryGeneratorSelector/GeometryGeneratorSelector.cpp
//	Load the Geometry from the Icosphere Maker.
Load the Geometry from the Icosphere Maker.
Load the Geometry from the Icosphere Maker .
void GeometryGeneratorSelector::loadGeometryFromIcosphere(std::vector<std::pair<std::string, std::shared_ptr<GeometryData>>>& geometryList, std::string geometryName, const ResourceDescription & newResourceDescription)
{
	std::string icosphereDetailLevelString = "None";
	int icosphereDetailLevel = 1;
	if (newResourceDescription.findProperty("Icosphere Detail Level", icosphereDetailLevelString))
	{
		icosphereDetailLevel = std::stoi(icosphereDetailLevelString);
	}
	std::string icosphereRoughnessLevelString = "None";
	int icosphereRoughnessLevel = 1;
	if (newResourceDescription.findProperty("Icosphere Roughness Level", icosphereRoughnessLevelString))
	{
		icosphereRoughnessLevel = std::stoi(icosphereRoughnessLevelString);
	}
	Icosphere icosphere(icosphereDetailLevel, icosphereRoughnessLevel);
	icosphere.generateIcosphereGeometryPerFace(geometryList, geometryName);
}
void GeometryGeneratorSelector :: loadGeometryFromIcosphere ( std :: vector < std :: pair < std :: string , std :: shared_ptr < GeometryData > > > & geometryList , std :: string geometryName , const ResourceDescription & newResourceDescription ) { std :: string icosphereDetailLevelString = " " ; int icosphereDetailLevel = 1 ; if ( newResourceDescription . findProperty ( " " , icosphereDetailLevelString ) ) { icosphereDetailLevel = std :: stoi ( icosphereDetailLevelString ) ; } std :: string icosphereRoughnessLevelString = " " ; int icosphereRoughnessLevel = 1 ; if ( newResourceDescription . findProperty ( " " , icosphereRoughnessLevelString ) ) { icosphereRoughnessLevel = std :: stoi ( icosphereRoughnessLevelString ) ; } Icosphere icosphere ( icosphereDetailLevel , icosphereRoughnessLevel ) ; icosphere . generateIcosphereGeometryPerFace ( geometryList , geometryName ) ; }
Load the Geometry from the Icosphere Maker.
Load the Geometry from the Icosphere Maker .