[vtkusers] Problem about vtkRenderWindowInterctor.

=?gb2312?q?=FFffffc3=FFffffcf=FFffffe7=FFffffe2=20=FFffffd0=FFffffbb?= xmengwei168 at yahoo.com.cn
Sun Apr 18 23:18:46 EDT 2004


Hi,everyone
    I am having a problem with the
vtkRenderWindowInteractor.I writer the following code
realizing some interactor.
 class vtkMyCallback : public vtkCommand
{
public:
  static vtkMyCallback *New(){ return new
vtkMyCallback; }
  virtual void Execute(vtkObject *caller, unsigned
long, void*){
        renWin->Render();
	int* pos = iren->GetEventPosition();
        float u2,v2;
        u2 = float(pos[0]);
        v2 = float(pos[1]);
        char string[80]; 
        sprintf( string,"%f %f", u2, v2 );
	textMapper2->SetInput( string );
        textActor2->SetPosition( pos[0],pos[1] );
	textActor2->VisibilityOn();
    }
};

  vtkMyCallback *mo1 = vtkMyCallback::New();
  iren->AddObserver(vtkCommand::MouseMoveEvent,mo1); 
  mo1->Delete();

But when several render in a renderwindow ,this
function only have effect on some a render.I want to
realize it on every render.What should i do?

Thanks very much.

_________________________________________________________
Do You Yahoo!? 
惠普TT游戏剧,玩游戏,中大奖!
http://cn.rd.yahoo.com/mail_cn/tag/SIG=1402c0to2/**http%3A%2F%2Fhp.allyes.com%2Flaserjet%2Fgamestory%2Findex.html%3Fjumpid%3Dex_hphqapcn_MongooseLJ1010%2F201073CN407016%2FYahoo



More information about the vtkusers mailing list