void Viewer::Init (Editor* ed, GraphicView* gview, UPage* page, Grid* grid) { _editor = ed; _gview = gview; _page = page; _grid = grid; _viewerView = new ViewerView(_gview, _page, _grid, this); _graphic = _viewerView->GetGraphic(); _damage->SetGraphic(_graphic); Reorient(); GraphicBlock::Init(); UpdateMagnifVar(); }
void Viewer::SetGraphicView (GraphicView* gv) { Perspective np = *perspective; GetEditor()->GetSelection()->Clear(); delete _viewerView; delete _gview; _gview = gv; _viewerView = new ViewerView(_gview, _page, _grid, this); _graphic = _viewerView->GetGraphic(); _damage->SetGraphic(_graphic); _damage->Incur(0, 0, 0, 0); // for detecting Draw in Adjust Reorient(); GraphicBlock::Init(); Adjust(np); if (_damage->Incurred()) { // Adjust didn't Draw Draw(); } }
void FollowController::Reorient(const math::Quat<> &orientation, float distance) { Reorient(orientation); this->distance = distance; }
FollowController::FollowController(const Form &target, const math::Vec3 ¢er, const math::Quat<> &orientation, float distance) : Controller(AnimationLayer::postConstraint) { Follow(target, center); Reorient(orientation, distance); }