当前位置: 首页>>代码示例>>C++>>正文


C++ CModelerDoc类代码示例

本文整理汇总了C++中CModelerDoc的典型用法代码示例。如果您正苦于以下问题:C++ CModelerDoc类的具体用法?C++ CModelerDoc怎么用?C++ CModelerDoc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CModelerDoc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: BrowseAttachement

BOOL CDlgPgInfoAttachingPlacement::BrowseAttachement( CAttachedModel *pam)
{
  CModelerView *pModelerView = CModelerView::GetActiveView();
  if(pModelerView == NULL) return FALSE;
  CModelerDoc* pDoc = pModelerView->GetDocument();

  CTFileName fnOldModel = pam->am_moAttachedModel.GetName();
  CTFileName fnModel = _EngineGUI.FileRequester( "Select model to attach",
				  FILTER_MDL FILTER_END, "Attaching models directory",
				  _fnmApplicationPath + fnOldModel.FileDir(),
				  fnOldModel.FileName()+fnOldModel.FileExt());
  if( fnModel == "") return FALSE;

  try
  {
    pam->SetModel_t( fnModel);
  }
  catch( char *strError)
  {
    (void) strError;
    return FALSE;
  }
  pam->am_bVisible = TRUE;

  pDoc->ClearAttachments();
  pDoc->SetupAttachments();

  pDoc->SetModifiedFlag();
  pDoc->UpdateAllViews( NULL);

  UpdateData(FALSE);
  return TRUE;
}
开发者ID:ArcticPheenix,项目名称:Serious-Engine,代码行数:33,代码来源:DlgPgInfoAttachingPlacement.cpp

示例2: OnSelectAllSurfaces

void CDlgInfoPgRendering::OnSelectAllSurfaces() 
{
  CModelerDoc* pDoc = theApp.GetDocument();
  if( pDoc == NULL) return;
  pDoc->SelectAllSurfaces();
  UpdateData( FALSE);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:7,代码来源:DlgInfoPgRendering.cpp

示例3: OnChangeCollisionBoxName

void CDlgPgCollision::OnChangeCollisionBoxName() 
{
  CModelerView *pModelerView = CModelerView::GetActiveView();
  if(pModelerView == NULL) return;
  CModelerDoc* pDoc = pModelerView->GetDocument();  
  // document has been changed
  pDoc->SetModifiedFlag();
	UpdateData( TRUE);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:9,代码来源:DlgPgCollision.cpp

示例4: SetViewFromGlobalPage

void CDlgInfoPgGlobal::SetViewFromGlobalPage(CModelerView* pModelerView)
{
  CModelerDoc *pDoc = pModelerView->GetDocument();
  pDoc->m_emEditModel.edm_md.md_colDiffuse = m_colorDiffuse.GetColor();
  pDoc->m_emEditModel.edm_md.md_colReflections = m_colorReflection.GetColor();
  pDoc->m_emEditModel.edm_md.md_colSpecular = m_colorSpecular.GetColor();
  pDoc->m_emEditModel.edm_md.md_colBump = m_colorBump.GetColor();
  pDoc->SetModifiedFlag( TRUE);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:9,代码来源:DlgInfoPgGlobal.cpp

示例5: UpdateData

void CDlgPgInfoAttachingPlacement::OnPreviousAttachingPlacement()
{
  if( m_iActivePlacement <= 0) return;
  m_iActivePlacement -= 1;
  UpdateData(FALSE);
  CModelerDoc* pDoc = theApp.GetDocument();
  ASSERT( pDoc != NULL);
  if( pDoc == NULL) return;
  pDoc->UpdateAllViews( NULL);
}
开发者ID:ArcticPheenix,项目名称:Serious-Engine,代码行数:10,代码来源:DlgPgInfoAttachingPlacement.cpp

示例6: OnPreviousCollisionBox

void CDlgPgCollision::OnPreviousCollisionBox() 
{
  CModelerView *pModelerView = CModelerView::GetActiveView();
  if(pModelerView == NULL) return;
  CModelerDoc* pDoc = pModelerView->GetDocument();  
  pDoc->m_emEditModel.ActivatePreviousCollisionBox();
  UpdateData(FALSE);
  // update all views
  pDoc->UpdateAllViews( NULL);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:10,代码来源:DlgPgCollision.cpp

示例7: OnCollideAsBox

void CDlgPgCollision::OnCollideAsBox() 
{
  CModelerView *pModelerView = CModelerView::GetActiveView();
  if(pModelerView == NULL) return;
  CModelerDoc* pDoc = pModelerView->GetDocument();
  pDoc->m_emEditModel.edm_md.md_bCollideAsCube = !pDoc->m_emEditModel.edm_md.md_bCollideAsCube;
  UpdateData(TRUE);
  UpdateData(FALSE);
  pDoc->SetModifiedFlag();
  pDoc->UpdateAllViews( NULL);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:11,代码来源:DlgPgCollision.cpp

示例8: OnAllignToSize

void CDlgPgCollision::OnAllignToSize() 
{
  CModelerView *pModelerView = CModelerView::GetActiveView();
  if(pModelerView == NULL) return;
  CModelerDoc* pDoc = pModelerView->GetDocument();
  FLOATaabbox3D MaxBB;
  pDoc->m_emEditModel.edm_md.GetAllFramesBBox( MaxBB);
  pDoc->m_emEditModel.SetCollisionBox( MaxBB.Min(), MaxBB.Max());
  UpdateData(FALSE);
  pDoc->SetModifiedFlag();
  pDoc->UpdateAllViews( NULL);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:12,代码来源:DlgPgCollision.cpp

示例9: OnNextAttachingPlacement

void CDlgPgInfoAttachingPlacement::OnNextAttachingPlacement()
{
  CModelerDoc* pDoc = theApp.GetDocument();
  ASSERT( pDoc != NULL);
  if( pDoc == NULL) return;
  CModelData *pMD = &pDoc->m_emEditModel.edm_md;
  if( m_iActivePlacement < pDoc->m_emEditModel.edm_aamAttachedModels.Count()-1)
  {
    m_iActivePlacement += 1;
    UpdateData(FALSE);
    pDoc->UpdateAllViews( NULL);
  }
}
开发者ID:ArcticPheenix,项目名称:Serious-Engine,代码行数:13,代码来源:DlgPgInfoAttachingPlacement.cpp

示例10: OnRemoveCollisionBox

void CDlgPgCollision::OnRemoveCollisionBox() 
{
  CModelerView *pModelerView = CModelerView::GetActiveView();
  if(pModelerView == NULL) return;
  CModelerDoc* pDoc = pModelerView->GetDocument();  
  pDoc->m_emEditModel.DeleteCurrentCollisionBox();
  UpdateData(FALSE);

  // document has been changed
  pDoc->SetModifiedFlag();
  // update all views
  pDoc->UpdateAllViews( NULL);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:13,代码来源:DlgPgCollision.cpp

示例11: OnIsVisible

void CDlgPgInfoAttachingPlacement::OnIsVisible()
{
  if( m_iActivePlacement == -1) return;
  CModelerDoc* pDoc = theApp.GetDocument();
  ASSERT( pDoc != NULL);
  if( pDoc == NULL) return;

  pDoc->m_emEditModel.edm_aamAttachedModels.Lock();
  CAttachedModel *pamAttachedModel =
    &pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement];
  pamAttachedModel->am_bVisible = !pamAttachedModel->am_bVisible;

  pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
  pDoc->ClearAttachments();
  pDoc->SetupAttachments();
  pDoc->SetModifiedFlag();
  pDoc->UpdateAllViews( NULL);

  UpdateData(FALSE);
}
开发者ID:ArcticPheenix,项目名称:Serious-Engine,代码行数:20,代码来源:DlgPgInfoAttachingPlacement.cpp

示例12: OnSelchangeAttachmentModelAnimationCombo

void CDlgPgInfoAttachingPlacement::OnSelchangeAttachmentModelAnimationCombo()
{
  if( m_iActivePlacement == -1) return;
  CModelerDoc* pDoc = theApp.GetDocument();
  ASSERT( pDoc != NULL);
  if( pDoc == NULL) return;
  INDEX iCombo = m_comboAttachmentModelAnimation.GetCurSel();
  if( iCombo != CB_ERR)
  {
    pDoc->m_emEditModel.edm_aamAttachedModels.Lock();
    CAttachedModel *pamAttachedModel =
      &pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement];
    pamAttachedModel->am_iAnimation = iCombo;
    pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
  }
  pDoc->ClearAttachments();
  pDoc->SetupAttachments();
  pDoc->SetModifiedFlag();
  pDoc->UpdateAllViews( NULL);
}
开发者ID:ArcticPheenix,项目名称:Serious-Engine,代码行数:20,代码来源:DlgPgInfoAttachingPlacement.cpp

示例13: ASSERT

void CDlgPgInfoAttachingPlacement::OnRemoveAttachingPlacement()
{
  ASSERT( m_iActivePlacement != -1);
  CModelerDoc* pDoc = theApp.GetDocument();
  ASSERT( pDoc != NULL);
  if( pDoc == NULL) return;
  CModelData *pMD = &pDoc->m_emEditModel.edm_md;

  pMD->md_aampAttachedPosition.Lock();
  pDoc->m_emEditModel.edm_aamAttachedModels.Lock();

  // get currently active placement from edit model
  CAttachedModel *pamAttachedModel =
    &pDoc->m_emEditModel.edm_aamAttachedModels[ m_iActivePlacement];
  // and from model data
  CAttachedModelPosition *pampModelPosition =
    &pMD->md_aampAttachedPosition[ m_iActivePlacement];

  pDoc->m_emEditModel.edm_aamAttachedModels.Unlock();
  pMD->md_aampAttachedPosition.Unlock();

  pDoc->ClearAttachments();

  pDoc->m_emEditModel.edm_aamAttachedModels.Delete( pamAttachedModel);
  pMD->md_aampAttachedPosition.Delete( pampModelPosition);

  pDoc->SetupAttachments();

  if( pDoc->m_emEditModel.edm_aamAttachedModels.Count() == 0)
  {
    m_iActivePlacement = -1;
  }
  if( m_iActivePlacement == pDoc->m_emEditModel.edm_aamAttachedModels.Count())
  {
    m_iActivePlacement = pDoc->m_emEditModel.edm_aamAttachedModels.Count()-1;
  }
  UpdateData(FALSE);
  pDoc->SetModifiedFlag();
  pDoc->UpdateAllViews( NULL);
}
开发者ID:ArcticPheenix,项目名称:Serious-Engine,代码行数:40,代码来源:DlgPgInfoAttachingPlacement.cpp

示例14: GetDocument

void CScriptView::OnScriptUpdateMipmodels() 
{
	// find document with same name
  CModelerDoc *pDoc = (CModelerDoc *) GetDocument();
  CTFileName fnScriptName = CTString(pDoc->GetPathName());
  CTFileName fnModelName = fnScriptName.FileDir() + fnScriptName.FileName() + ".mdl";

	POSITION pos = theApp.m_pdtModelDocTemplate->GetFirstDocPosition();
  while (pos!=NULL)
  {
    CModelerDoc *pmdCurrent = (CModelerDoc *)theApp.m_pdtModelDocTemplate->GetNextDoc(pos);
    if( CTFileName( CTString(pmdCurrent->GetPathName())) == fnModelName)
    {
      POSITION pos = pmdCurrent->GetFirstViewPosition();
      CView *pView = pmdCurrent->GetNextView( pos);
      if( DYNAMIC_DOWNCAST(CModelerView, pView) != NULL)
      {
        CModelerView* pModelerView = (CModelerView *) pView;
        if(pModelerView != NULL)
        {
          pModelerView->OnScriptUpdateMipmodels();
          pModelerView->SetActiveWindow();
          pModelerView->SetFocus();
          CMainFrame* pMainFrame = STATIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
          pMainFrame->MDIActivate(pModelerView->GetParentFrame());
        }
      }
      break;
    }
  }
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:31,代码来源:ScriptView.cpp

示例15: PreTranslateMessage

BOOL CDlgInfoPgRendering::PreTranslateMessage(MSG* pMsg) 
{
  CModelerDoc* pDoc = theApp.GetDocument();
  if( pDoc == NULL) return TRUE;
	BOOL bShift = (GetKeyState( VK_SHIFT)&0x8000) != 0;
  
  if(pMsg->message==WM_KEYDOWN)
  {
    if( pMsg->wParam==VK_TAB)
    {
      if( bShift) pDoc->SelectPreviousSurface();
      else        pDoc->SelectNextSurface();
      return TRUE;
    }
    if( pMsg->wParam=='Z')
    {
      pDoc->OnLinkSurfaces();
      return TRUE;
    }
  }

	return CPropertyPage::PreTranslateMessage(pMsg);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:23,代码来源:DlgInfoPgRendering.cpp


注:本文中的CModelerDoc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。