[vtkusers] ComputeDisplayToWorld: Z direction ?

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Mon Aug 18 10:13:48 EDT 2003


   renderer->ResetCameraClippingRange();

did the trick, thank you Jeff.

mathieu


Jeff Lee wrote:
> did you reset the camera clipping planes after the event?
> -Jeff
> 
> Mathieu Malaterre wrote:
> 
>> Hi all,
>>
>>     I would like a mouse event that can move my vtkBoxWidget along the 
>> Z (back to front) direction. I copy/paste the 
>> vtkBoxWidget::OnMouseMove, and change few things:
>>
>> ...
>>   // Compute the two points defining the motion vector
>>   this->ComputeWorldToDisplay(this->LastPickPosition[0], 
>> this->LastPickPosition[1], this->LastPickPosition[2], focalPoint);
>>   z = focalPoint[2];
>> this->ComputeDisplayToWorld(double(this->Interactor->GetLastEventPosition()[0]), 
>>
>> double(this->Interactor->GetLastEventPosition()[1]), z, prevPickPoint);
>>
>> this->ComputeDisplayToWorld(double(X), double(Y), (z + .1), pickPoint);
>> //ComputeDisplayToWorld(double(X), double(Y), (z - .1), pickPoint);
>> this->Translate(prevPickPoint, pickPoint);
>> ...
>>
>> But my vtkBoxWidget is disappearing. Does anyone knows why there is a 
>> refresh problem along the Z direction ?
>> Or else could someone give me other clue to move a vtkBoxWidget along 
>> the Z direction (in fact: back-to-front or front-to-back)
>>
>>
>> In case someone was interested I put a patch here:
>> http://www.creatis.insa-lyon.fr/~malaterre/vtk/box.patch
>>
>> ($ cvs -z3 diff -u Hybrid/vtkBoxWidget.* > box.patch)
>>
>> Thanks a lot,
>> mathieu
>>
>> _______________________________________________
>> This is the private VTK discussion list. Please keep messages 
>> on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
> 
> 


-- 
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/




More information about the vtkusers mailing list