本文整理汇总了C++中LayerSurface类的典型用法代码示例。如果您正苦于以下问题:C++ LayerSurface类的具体用法?C++ LayerSurface怎么用?C++ LayerSurface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LayerSurface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetCoordinate
void DialogRepositionSurface::GetCoordinate( double* pos )
{
if (ui->tabWidget->currentIndex() == 0)
{
/*
QStringList list = ui->lineEditTarget->text().split(",", QString::SkipEmptyParts);
if (list.size() < 3)
list = ui->lineEditTarget->text().split(" ", QString::SkipEmptyParts);
for ( int i = 0; i < 3; i++ )
pos[i] = list[i].toDouble();
*/
pos[0] = ui->lineEditTargetX->text().toDouble();
pos[1] = ui->lineEditTargetY->text().toDouble();
pos[2] = ui->lineEditTargetZ->text().toDouble();
}
else
{
pos[0] = ui->lineEditCoordX->text().toDouble();
pos[1] = ui->lineEditCoordY->text().toDouble();
pos[2] = ui->lineEditCoordZ->text().toDouble();
if (ui->radioButtonCoordRAS->isChecked())
{
LayerSurface* surf = (LayerSurface*)MainWindow::GetMainWindow()->GetActiveLayer( "Surface" );
if ( surf )
{
surf->GetSurfaceRASAtVertex(GetVertex(), pos);
}
}
}
}
示例2:
SurfaceROI* RenderView3D::InitializeSurfaceROI( int posX, int posY )
{
double pos[3];
vtkProp* prop = this->PickProp( posX, posY, pos );
if ( !prop )
{
return NULL;
}
LayerCollection* lc_surf = MainWindow::GetMainWindow()->GetLayerCollection( "Surface" );
LayerSurface* surf = NULL;
for ( int i = 0; i < lc_surf->GetNumberOfLayers(); i++ )
{
LayerSurface* temp = (LayerSurface*)lc_surf->GetLayer(i);
if ( temp->HasProp( prop ) )
{
surf = temp;
break;
}
}
if ( !surf )
{
return false;
}
lc_surf->SetActiveLayer( surf );
SurfaceROI* roi = surf->GetSurfaceROI();
if ( roi )
{
roi->InitializeOutline(pos);
}
return roi;
}
示例3: UpdateUI
void DialogRepositionSurface::UpdateUI()
{
MainWindow* mainwnd = MainWindow::GetMainWindowPointer();
LayerSurface* surf = (LayerSurface*)mainwnd->GetActiveLayer( "Surface" );
m_btnSave->Enable( surf && surf->IsModified() && !mainwnd->IsProcessing() );
m_btnSaveAs->Enable( surf && !mainwnd->IsProcessing() );
m_btnUndo->Enable( surf && surf->HasUndo() );
}
示例4: OnSpinVectorPointSize
void PanelSurface::OnSpinVectorPointSize( wxSpinEvent& event )
{
LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
if ( surf )
{
surf->GetProperties()->SetVectorPointSize( event.GetInt() );
}
}
示例5: OnChoiceMeshColorMap
void PanelSurface::OnChoiceMeshColorMap( wxCommandEvent& event )
{
LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
if ( surf )
{
surf->GetProperties()->SetMeshColorMap( event.GetSelection() );
}
}
示例6: UpdateUI
void DialogRepositionSurface::UpdateUI()
{
MainWindow* mainwnd = MainWindow::GetMainWindow();
LayerSurface* surf = (LayerSurface*)mainwnd->GetActiveLayer( "Surface" );
ui->pushButtonSave->setEnabled( surf && surf->IsModified() && !mainwnd->IsBusy() );
ui->pushButtonSaveAs->setEnabled( surf && !mainwnd->IsBusy() );
ui->pushButtonUndo->setEnabled( surf && surf->HasUndo() );
}
示例7: OnCheckHideInfo
void PanelSurface::OnCheckHideInfo( wxCommandEvent& event )
{
LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
if ( surf )
{
surf->GetProperties()->SetShowInfo( !event.IsChecked() );
}
}
示例8: OnUndo
void DialogRepositionSurface::OnUndo( )
{
LayerSurface* surf = (LayerSurface*)MainWindow::GetMainWindow()->GetActiveLayer( "Surface" );
if ( surf )
{
surf->Undo();
UpdateUI();
}
}
示例9: OnUndo
void DialogRepositionSurface::OnUndo( wxCommandEvent& event )
{
LayerSurface* surf = (LayerSurface*)MainWindow::GetMainWindowPointer()->GetActiveLayer( "Surface" );
if ( surf )
{
surf->Undo();
UpdateUI();
}
}
示例10: OnSurfaceLockUpdateUI
void PanelSurface::OnSurfaceLockUpdateUI( wxUpdateUIEvent& event )
{
event.Enable( m_listBoxLayers->GetSelection() != wxNOT_FOUND );
if ( m_listBoxLayers->GetSelection() != wxNOT_FOUND )
{
LayerSurface* layer = ( LayerSurface* )( void* )m_listBoxLayers->GetClientData( m_listBoxLayers->GetSelection() );
event.Check( layer && layer->IsLocked() );
}
}
示例11: OnSliderOpacity
void PanelSurface::OnSliderOpacity( wxScrollEvent& event )
{
if ( m_listBoxLayers->GetSelection() != wxNOT_FOUND )
{
LayerSurface* layer = ( LayerSurface* )( void* )m_listBoxLayers->GetClientData( m_listBoxLayers->GetSelection() );
if ( layer )
layer->GetProperties()->SetOpacity( event.GetPosition() / 100.0 );
}
}
示例12: OnLabelColorChanged
void PanelSurface::OnLabelColorChanged( wxColourPickerEvent& event )
{
LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
if ( surf )
{
wxColour c = event.GetColour();
surf->GetActiveLabel()->SetColor( c.Red()/255.0, c.Green()/255.0, c.Blue()/255.0 );
}
}
示例13: OnSliderMidPoint
void PanelSurface::OnSliderMidPoint( wxScrollEvent& event )
{
LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
if ( surf )
{
double range[2];
surf->GetCurvatureRange( range );
surf->GetProperties()->SetThresholdMidPoint( (double)m_sliderMidPoint->GetValue() / 100.0 * ( range[1] - range[0] ) + range[0] );
}
}
示例14: OnSliderSlope
void PanelSurface::OnSliderSlope( wxScrollEvent& event )
{
LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
if ( surf )
{
double fMin = 0;
double fMax = 100;
surf->GetProperties()->SetThresholdSlope( (double)m_sliderSlope->GetValue() / 100.0 * ( fMax - fMin ) + fMin );
}
}
示例15: OnSliderMidPointChanging
void PanelSurface::OnSliderMidPointChanging( wxScrollEvent& event )
{
LayerSurface* surf = ( LayerSurface* )MainWindow::GetMainWindowPointer()->GetLayerCollection( "Surface" )->GetActiveLayer();
if ( surf )
{
double range[2];
surf->GetCurvatureRange( range );
UpdateTextValue( m_textMidPoint, (double)m_sliderMidPoint->GetValue() / 100.0 * ( range[1] - range[0] ) + range[0] );
}
}