本文整理汇总了C++中View::GetOverlayRenderer方法的典型用法代码示例。如果您正苦于以下问题:C++ View::GetOverlayRenderer方法的具体用法?C++ View::GetOverlayRenderer怎么用?C++ View::GetOverlayRenderer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View::GetOverlayRenderer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReleaseControl
void CameraObject::ReleaseControl( View * triggeredView )
{
m_trackingCamera = false;
PerViewElementCont::iterator it = m_perViewElements.begin();
while( it != m_perViewElements.end() )
{
View * v = (*it).first;
PerViewElements & elem = (*it).second;
if( triggeredView != v )
v->ReleaseControl( this );
// Move back image from overlay renderer to main renderer
v->GetOverlayRenderer()->RemoveActor( elem.cameraImageActor );
v->GetRenderer()->AddActor( elem.cameraImageActor );
elem.cameraActor->VisibilityOn();
elem.cameraAxesActor->VisibilityOn();
for( int i = 0; i < elem.anotations.size(); ++i )
{
v->GetOverlayRenderer()->RemoveViewProp( elem.anotations[i] );
v->GetRenderer()->AddViewProp( elem.anotations[i] );
}
// Recover backup camera
v->GetRenderer()->SetActiveCamera( elem.cameraBackup );
v->GetOverlayRenderer()->SetActiveCamera( elem.cameraBackup );
v->GetOverlayRenderer2()->SetActiveCamera( elem.cameraBackup );
elem.cameraBackup->UnRegister( this );
elem.cameraBackup = 0;
++it;
}
}
示例2: SetTrackCamera
void CameraObject::SetTrackCamera( bool t )
{
if( t == m_trackingCamera )
return;
if( t )
{
m_trackingCamera = true;
PerViewElementCont::iterator it = m_perViewElements.begin();
while( it != m_perViewElements.end() )
{
View * v = (*it).first;
PerViewElements & elem = (*it).second;
// Tell the view we are taking control
v->TakeControl( this );
// Move image to overlay renderer and hide other parts of the cam
elem.cameraActor->VisibilityOff();
elem.cameraAxesActor->VisibilityOff();
v->GetRenderer()->RemoveActor( elem.cameraImageActor );
v->GetOverlayRenderer()->AddActor( elem.cameraImageActor );
// Move anotations to overlay renderer
for( int i = 0; i < elem.anotations.size(); ++i )
{
v->GetRenderer()->RemoveViewProp( elem.anotations[i] );
v->GetOverlayRenderer()->AddViewProp( elem.anotations[i] );
}
// Set this camera to control the view
elem.cameraBackup = v->GetRenderer()->GetActiveCamera();
elem.cameraBackup->Register( this );
v->GetRenderer()->SetActiveCamera( m_camera );
v->GetOverlayRenderer()->SetActiveCamera( m_camera );
v->GetOverlayRenderer2()->SetActiveCamera( m_camera );
++it;
}
}
else
{
this->ReleaseControl( 0 );
}
emit ParamsModified();
}