Added loading of flames.
This commit is contained in:
parent
f92c7bf6c3
commit
af9f6d6933
@ -75,6 +75,7 @@
|
||||
<gColour>1.0</gColour>
|
||||
<bColour>1.0</bColour>
|
||||
<intensity>4.0</intensity>
|
||||
<flameOffset>0.5</flameOffset>
|
||||
</light>
|
||||
</composition>
|
||||
|
||||
|
@ -374,6 +374,14 @@ void Loader::load(std::string filePath, Level* level, std::string compositionsPa
|
||||
glm::vec3 lightPosition = compPos + glm::vec3(rotatedLightOffset.x,rotatedLightOffset.y,rotatedLightOffset.z);
|
||||
Light light = Light(lightPosition, lightColour, lightIntensity);
|
||||
level->addLight(light);
|
||||
XMLElement* flameOffset = NULL;
|
||||
flameOffset = xmlLight->FirstChildElement("flameOffset");
|
||||
if (flameOffset != NULL){
|
||||
float offset = 0;
|
||||
errorCheck(flameOffset->QueryFloatText(&offset));
|
||||
Flame flame = Flame(offset, lightPosition, glm::vec3(0,0,0));
|
||||
level->addFlame(flame);
|
||||
}
|
||||
}//iterating over all lights of the composition
|
||||
}//corect composition found
|
||||
}//iterating over all compositions in Compositions.xml
|
||||
|
Loading…
Reference in New Issue
Block a user