[vtkusers] set up position of vtkImplicitPlaneWidget

ChenDawnWind cybfly1 at hotmail.com
Fri May 3 22:59:39 EDT 2013


You could modify the vtkImplicitPlaneRepresentation of the widget, initial the plane then you could get what you want.Codes below are the pieces of the whole codes. Full example in :http://www.cnblogs.com/dawnWind/archive/2013/05/04/3D_11.html// set up representation for vtkImplicitPlaneWidget2 
    // you could set the normal and origin with the value you want 
    vtkSmartPointer<vtkImplicitPlaneRepresentation> rep = 
    vtkSmartPointer<vtkImplicitPlaneRepresentation>::New();
    rep->SetPlaceFactor(1.25); // This must be set prior to placing the widget
    rep->PlaceWidget(coneSkinActor->GetBounds());
#ifndef SET_VALUE
    rep->SetNormal(measureNormal);
    rep->SetOrigin(point3);
#endif
    vtkSmartPointer<vtkImplicitPlaneWidget2> implicitPlaneWidget = vtkImplicitPlaneWidget2::New();
    implicitPlaneWidget->SetInteractor(iren);
    // this set the representation for the widget thus the normal and origin is transfer to the widget
    implicitPlaneWidget->SetRepresentation(rep);
DawnWind.ChenCSU

Date: Fri, 3 May 2013 10:06:18 -0400
From: tonyzhang0985 at gmail.com
To: vtkusers at vtk.org
Subject: [vtkusers] set up position of vtkImplicitPlaneWidget

I am trying to use vtkImplicitPlaneWidget and it is located in the middle of outline frame by default. I can use mouse to move the plane. What is the function I can use to set up an arbitrary position of the plane when it is initialized, or to move the position by program rather than the built-in mouse event function? 



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130504/6e9c2545/attachment.htm>


More information about the vtkusers mailing list