示例#1
0
文件: viewer.cpp 项目: PNCG/neuron
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();
}
示例#2
0
文件: viewer.cpp 项目: PNCG/neuron
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();
    }
}
示例#3
0
	void FollowController::Reorient(const math::Quat<> &orientation, float distance)
	{
		Reorient(orientation);
		this->distance = distance;
	}
示例#4
0
	FollowController::FollowController(const Form &target, const math::Vec3 &center, const math::Quat<> &orientation, float distance) :
		Controller(AnimationLayer::postConstraint)
	{
		Follow(target, center);
		Reorient(orientation, distance);
	}