bool VRRect::read(VRDataIndex& index, std::string name, std::string nameSpace) { if (!index.exists(name, nameSpace)) { return false; } std::string newNamespace = index.getFullKey(name, nameSpace); m_xOffset = index.getValue("xOffset", newNamespace); m_yOffset = index.getValue("yOffset", newNamespace); m_width = index.getValue("width", newNamespace); m_height = index.getValue("height", newNamespace); m_usePercent = index.exists("usePercent", newNamespace) ? (int)index.getValue("usePercent", newNamespace) : 0; return true; }