MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / setCameraPosition

Method setCameraPosition

visualization/src/pcl_visualizer.cpp:2073–2097  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

2071
2072/////////////////////////////////////////////////////////////////////////////////////////////
2073void
2074pcl::visualization::PCLVisualizer::setCameraPosition (
2075 double pos_x, double pos_y, double pos_z,
2076 double view_x, double view_y, double view_z,
2077 double up_x, double up_y, double up_z,
2078 int viewport)
2079{
2080 rens_->InitTraversal ();
2081 vtkRenderer* renderer = nullptr;
2082 int i = 0;
2083 while ((renderer = rens_->GetNextItem ()))
2084 {
2085 // Modify all renderer's cameras
2086 if (viewport == 0 || viewport == i)
2087 {
2088 vtkSmartPointer<vtkCamera> cam = renderer->GetActiveCamera ();
2089 cam->SetPosition (pos_x, pos_y, pos_z);
2090 cam->SetFocalPoint (view_x, view_y, view_z);
2091 cam->SetViewUp (up_x, up_y, up_z);
2092 renderer->ResetCameraClippingRange ();
2093 }
2094 ++i;
2095 }
2096 win_->Render ();
2097}
2098
2099/////////////////////////////////////////////////////////////////////////////////////////////
2100void

Callers 15

runMethod · 0.80
RealSenseViewerMethod · 0.80
runMethod · 0.80
mainFunction · 0.80
runMethod · 0.80
mainFunction · 0.80
setViewerPoseFunction · 0.80
setViewerPoseFunction · 0.80
setViewerPoseFunction · 0.80
setViewerPoseFunction · 0.80
mainFunction · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64