<div class="gmail_extra">Why not try using SetUserTransform() or SetUserMatrix()<br><br><div class="gmail_quote">On Mon, Apr 23, 2012 at 12:32 AM, qlizhi <span dir="ltr"><<a href="mailto:qlizhi@gmail.com" target="_blank">qlizhi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="MARGIN:10px">
<div>
<div>Thanks for <span style="text-indent:0px;letter-spacing:normal;font:14px/18px Arial;text-transform:none;white-space:normal;display:inline!important;float:none;word-spacing:0px">reply:</span></div>
<div style="TEXT-INDENT:2em"><span style="text-indent:0px;letter-spacing:normal;font:14px/18px Arial;text-transform:none;white-space:normal;display:inline!important;float:none;word-spacing:0px"> here
is my main code, and if i use [<font color="#000080" face="微软雅黑">window->Render()], there will be an error:</font></span></div><span style="text-indent:0px;letter-spacing:normal;font:14px/18px Arial;text-transform:none;white-space:normal;display:inline!important;float:none;word-spacing:0px">
<div style="TEXT-INDENT:2em">ERROR: In D:\Program Files (x86)\VTK 5.8.0\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 247</div>
<div style="TEXT-INDENT:2em">vtkWin32OpenGLRenderWindow (06DFC0B0): wglMakeCurrent failed in MakeCurrent(), error: <span style="text-indent:0px;letter-spacing:normal;color:rgb(34,34,34);text-align:justify;font:small/19px palatino,georgia,verdana,arial,sans-serif;text-transform:none;white-space:normal;display:inline!important;float:none;word-spacing:0px">The
requested resource is in use.</span></div>
<div style="TEXT-INDENT:2em"> </div></span></div>
<div><span style="text-indent:0px;letter-spacing:normal;font:14px/18px Arial;text-transform:none;white-space:normal;display:inline!important;float:none;word-spacing:0px"></span>
<div><span style="text-indent:0px;letter-spacing:normal;font:14px/18px Arial;text-transform:none;white-space:normal;display:inline!important;float:none;word-spacing:0px">
<div>void CupGeologyView::addInternetEvent( vtkActor *actor, vtkRenderWindow *window)</div>
<div>{</div>
<div>/*actor->SetOrientation(27.0, 27.0, 27.0);*/</div>
<div>internetEvent = new cupVtkUserInternetEvent;</div>
<div>QThread * thread = new QThread(this);</div>
<div>internetEvent->moveToThread(thread);</div>
<div>connect(ui.allowInternetEvent, SIGNAL(triggered()), internetEvent, SLOT(init()));</div>
<div>thread->start();</div>
<div> </div>
<div>CupRemoteModelCallback *mo1 = CupRemoteModelCallback::New();</div>
<div>mo1->actor = actor;</div>
<div>mo1->window = window;</div>
<div>internetEvent->AddObserver(vtkCommand::UserEvent,mo1);</div>
<div>mo1->Delete();</div>
<div>}</div>
<div> </div></span></div>
<div>void CupRemoteModelCallback::Execute( vtkObject *caller, unsigned long eventId, void *callData )</div>
<div>{</div>
<div>cupVtkUserInternetEvent *internetEvent = reinterpret_cast<cupVtkUserInternetEvent *>(caller);</div>
<div>if (eventId = vtkCommand::UserEvent)</div>
<div>{</div>
<div>if (actor!= NULL && window != NULL)</div>
<div>{</div>
<div>//to-do</div>
<div>int* xyz = (int*)callData;</div>
<div>double ori[3];</div>
<div>ori[0] = xyz[0];</div>
<div>ori[1] = xyz[1];</div>
<div>ori[2] = xyz[2];</div>
<div>actor->SetOrientation(ori);</div>
<div>/*window->Render();*/</div>
<div>} </div>
<div>}</div>
<div>}</div></div>
<div> </div>
<hr style="WIDTH:210px;min-height:1px" align="left" color="#b5c4df" size="1">
<div><span>qlizhi</span></div>
<div> </div>
<div style="BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0cm;PADDING-LEFT:0cm;PADDING-RIGHT:0cm;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<div style="padding-right:8px;padding-left:8px;padding-top:8px;font-size:12px;background:#efefef;padding-bottom:8px">
<div><b>From:</b> <a href="mailto:daviddoria@gmail.com" target="_blank">David
Doria</a></div>
<div><b>Date:</b> <a href="tel:2012-04-22%C2%A021" value="+12012042221" target="_blank">2012-04-22 21</a>:53</div>
<div><b>To:</b> <a href="mailto:qlizhi@gmail.com" target="_blank">qlizhi</a></div>
<div><b>CC:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers</a></div>
<div><b>Subject:</b> Re: [vtkusers] question about
vtkCommand</div></div></div><div><div class="h5">
<div>
<div>
<div class="gmail_extra">
<div class="gmail_quote">2012/4/22 qlizhi <span dir="ltr"><<a href="mailto:qlizhi@gmail.com" target="_blank">qlizhi@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote"><u></u>
<div style="MARGIN:10px">
<div> </div>
<div>hi, all!</div>
<div style="TEXT-INDENT:2em">i write a subclass of vtkCommand, and in its
function Execute(), i try to change an actor's Orientation by code
[actor->SetOrientation(ori)].</div>
<div>I made breakPoint on that line, it runs. But the
renderWindow show nothing. Can anybody tell me why?</div>
<div style="TEXT-INDENT:2em">Sorry for my poor english!</div>
<hr style="MIN-HEIGHT:1px;WIDTH:210px" align="left" color="#b5c4df" size="1">
<span><font color="#888888">
<div><span>qlizhi</span></div></font></span></div></blockquote>
<div>Did you call renderWindow->Render()? You'll probably have to make us an
as-small-as-possible code sample so we can see exactly what you're
doing.</div><br>David<br></div></div></div></div></div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>