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

@@ -63,8 +63,19 @@ InfoVisitor::InfoVisitor() : brief_(true), current_id_(0)
{
}
void InfoVisitor::visit(Node &)
void InfoVisitor::visit(Node &n)
{
std::ostringstream oss;
oss << std::fixed << std::setprecision(1);
oss << "Pos ( " << n.translation_.x << ", " << n.translation_.y << " )" << std::endl;
oss << "Scale ( " << n.scale_.x << ", " << n.scale_.y << " )" << std::endl;
oss << "Angle " << std::setprecision(2) << n.rotation_.z * 180.f / M_PI << "\u00B0" << std::endl;
if (!brief_) {
oss << n.crop_.x << ", " << n.crop_.y << " Crop" << std::endl;
}
information_ = oss.str();
}
void InfoVisitor::visit(Group &)