mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Using translation, rotation and scale vectors to define transform of
node (matrix computed at update). GUI to modify transform adapted accordingly. Initialization nodes done at first run of draw (prevents mistake of forgetting to init).
This commit is contained in:
@@ -26,8 +26,12 @@ void SessionVisitor::visit(Node &n)
|
||||
XMLElement *newelement = xmlDoc_->NewElement("Node");
|
||||
newelement->SetAttribute("visible", n.visible_);
|
||||
|
||||
XMLElement *transform = XMLElementFromGLM(xmlDoc_, n.transform_);
|
||||
newelement->InsertEndChild(transform);
|
||||
XMLElement *scale = XMLElementFromGLM(xmlDoc_, n.scale_);
|
||||
newelement->InsertEndChild(scale);
|
||||
XMLElement *translation = XMLElementFromGLM(xmlDoc_, n.translation_);
|
||||
newelement->InsertEndChild(translation);
|
||||
XMLElement *rotation = XMLElementFromGLM(xmlDoc_, n.rotation_);
|
||||
newelement->InsertEndChild(rotation);
|
||||
|
||||
// insert into hierarchy
|
||||
xmlCurrent_->InsertEndChild(newelement);
|
||||
|
||||
Reference in New Issue
Block a user