mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user