| 915 | /////////////////////////////////////////////////////////////////////////////////// |
| 916 | |
| 917 | FSWindow::FSWindow(const Json::Value& root, const FSModel& model, FSStory& story) : FSFiller(root, story) { |
| 918 | |
| 919 | if (checkKeyAndType(root, "window_definition_id", Json::stringValue)) { |
| 920 | std::string windowDefinitionId = root.get("window_definition_id", "").asString(); |
| 921 | m_windowDefinition = model.windowDefinition(windowDefinitionId); |
| 922 | // If the window definition is window to wall ratios then the windows should be centered |
| 923 | // on the wall surface so make sure the alpha is 0.5 and then it will be so |
| 924 | if (m_windowDefinition.has_value()) { |
| 925 | if (m_windowDefinition->windowDefinitionMode() == "Window to Wall Ratio") { |
| 926 | m_alphas.clear(); |
| 927 | m_alphas.push_back(0.5); |
| 928 | } |
| 929 | } |
| 930 | } |
| 931 | } |
| 932 | |
| 933 | boost::optional<FSWindowDefinition> FSWindow::windowDefinition() const { |
| 934 | return m_windowDefinition; |
nothing calls this directly
no test coverage detected