MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / FSWindow

Method FSWindow

src/utilities/floorspace/FSModel.cpp:917–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915///////////////////////////////////////////////////////////////////////////////////
916
917FSWindow::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
933boost::optional<FSWindowDefinition> FSWindow::windowDefinition() const {
934 return m_windowDefinition;

Callers

nothing calls this directly

Calls 6

checkKeyAndTypeFunction · 0.85
windowDefinitionMethod · 0.80
windowDefinitionModeMethod · 0.80
getMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected