New Geometry source callback

Set Geometry callback applies and interpolates position, scale and rotation of a source. Implemented UI and XML.
This commit is contained in:
Bruno Herbelin
2022-02-21 12:32:48 +01:00
parent aa50d818ec
commit 2e167d260d
10 changed files with 324 additions and 102 deletions

View File

@@ -1192,6 +1192,28 @@ void SessionLoader::visit (SetDepth &c)
c.setBidirectional(b);
}
void SessionLoader::visit (SetGeometry &c)
{
float d = 0.f;
xmlCurrent_->QueryFloatAttribute("duration", &d);
c.setDuration(d);
bool b = false;
xmlCurrent_->QueryBoolAttribute("bidirectional", &b);
c.setBidirectional(b);
XMLElement* current = xmlCurrent_;
xmlCurrent_ = xmlCurrent_->FirstChildElement("Geometry");
if (xmlCurrent_) {
Group tmp;
tmp.accept(*this);
c.setTarget(&tmp);
}
xmlCurrent_ = current;
}
void SessionLoader::visit (Loom &c)
{
float d = 0.f;