Work in progress - implementation of cropping in Geometry view instead

of AppearanceView. Display of scaled mixing surface in Mixing and Layers
view. Changed stippling shading.
This commit is contained in:
brunoherbelin
2020-12-07 00:17:10 +01:00
parent 78f9216d32
commit 44b888fd04
20 changed files with 711 additions and 93 deletions

View File

@@ -22,6 +22,14 @@ XMLElement *tinyxml2::XMLElementFromGLM(XMLDocument *doc, glm::ivec2 vector)
return newelement;
}
XMLElement *tinyxml2::XMLElementFromGLM(XMLDocument *doc, glm::vec2 vector)
{
XMLElement *newelement = doc->NewElement( "vec2" );
newelement->SetAttribute("x", vector.x);
newelement->SetAttribute("y", vector.y);
return newelement;
}
XMLElement *tinyxml2::XMLElementFromGLM(XMLDocument *doc, glm::vec3 vector)
{
XMLElement *newelement = doc->NewElement( "vec3" );
@@ -62,6 +70,14 @@ void tinyxml2::XMLElementToGLM(XMLElement *elem, glm::ivec2 &vector)
elem->QueryIntAttribute("y", &vector.y);
}
void tinyxml2::XMLElementToGLM(XMLElement *elem, glm::vec2 &vector)
{
if ( !elem || std::string(elem->Name()).find("vec2") == std::string::npos )
return;
elem->QueryFloatAttribute("x", &vector.x); // If this fails, original value is left as-is
elem->QueryFloatAttribute("y", &vector.y);
}
void tinyxml2::XMLElementToGLM(XMLElement *elem, glm::vec3 &vector)
{
if ( !elem || std::string(elem->Name()).find("vec3") == std::string::npos )