[Paraview] SetCameraState

Jean M. Favre jfavre at cscs.ch
Tue Jun 28 11:15:54 EDT 2005


Karpf, Henry J wrote:
> I want to setup a custom camera angle for a trace file, but don't know
> what all the SetCameraState arguements are: could someone enlighten me:
> $kw(vtkTemp23) SetCameraState 0.000 -5.000 22.816  0.000 -5.000 -9.968 
> 0.000 1.000 0.000
> Like what does each arguement mean. Thank you.
> 

looking at the source code (GUI/Client/vtkPVRenderView.cxx) clarifies this:

void vtkPVRenderView::SetCameraState(float p0, float p1, float p2,
                                     float fp0, float fp1, float fp2,
                                     float up0, float up1, float up2)
{
  vtkCamera *cam;

  // This is to trace effects of loaded scripts.
  this->GetTraceHelper()->AddEntry(
    "$kw(%s) SetCameraState %.3f %.3f %.3f  %.3f %.3f %.3f  %.3f %.3f
%.3f",
    this->GetTclName(), p0, p1, p2, fp0, fp1, fp2, up0, up1, up2);

  cam = this->GetRenderer()->GetActiveCamera();
  cam->SetPosition(p0, p1, p2);
  cam->SetFocalPoint(fp0, fp1, fp2);
  cam->SetViewUp(up0, up1, up2);

  this->EventuallyRender();
}


-- 
Dr. Jean M. Favre,                            email:favre @ cscs.ch
http://www.cscs.ch/about/Favre.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82


More information about the ParaView mailing list