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


C++ Solid::GetModel方法代码示例

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


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

示例1: OnTextureMap

void MagicView::OnTextureMap() 
{
   TextureMapDialog dlg(this);
   if (dlg.DoModal() == IDOK) {
      MagicDoc*   doc      = GetDocument();
      Solid*      solid    = doc->GetSolid();
      Selection*  seln     = doc->GetSelection();
      Selector*   selector = doc->GetSelector();
      Editor*     editor   = doc->GetEditor();
      Material*   mtl      = 0;

      if (dlg.mMaterialIndex >= 0) {
         mtl = &solid->GetModel()->GetMaterials()[dlg.mMaterialIndex];
      }

      editor->UseModel(solid->GetModel());
      editor->ApplyMaterial(mtl, seln->GetPolys(),
                      dlg.mMapType, 2-dlg.mAxis, (float) dlg.mScaleU, (float) dlg.mScaleV,
                      dlg.mFlip, dlg.mMirror, dlg.mRotate);

      selector->Reselect();

      Invalidate();
      doc->SetModifiedFlag(TRUE);
      doc->UpdateAllViews(this);
   }
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:27,代码来源:MagicView.cpp

示例2: OnUpdateTextureMap

void MagicView::OnUpdateTextureMap(CCmdUI* pCmdUI) 
{
   Solid*      solid = GetDocument()->GetSolid();
   Selection*  seln  = GetDocument()->GetSelection();

   pCmdUI->Enable(solid && solid->GetModel() && seln && seln->GetPolys().size() > 0);
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:7,代码来源:MagicView.cpp

示例3: CloseUVEditor

void MagicView::CloseUVEditor()
{
   if (IsUVEdit()) {
      MagicDoc*   doc      = GetDocument();
      Editor*     editor   = doc->GetEditor();
      Solid*      solid    = doc->GetSolid();

      if (editor && solid) {
         editor->UseModel(solid->GetModel());
         editor->Resegment();
      }
   }
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:13,代码来源:MagicView.cpp

示例4: OnSelectInverse

void MagicView::OnSelectInverse() 
{
   Solid*      solid    = GetDocument()->GetSolid();
   Selector*   selector = GetDocument()->GetSelector();

   if (IsUVEdit()) {
      uvmap_view->SelectInverse();
   }

   else if (solid && selector) {
      selector->UseModel(solid->GetModel());
      selector->SelectInverse();
   }
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:14,代码来源:MagicView.cpp

示例5: OnSelectNone

void MagicView::OnSelectNone() 
{
   Solid*      solid    = GetDocument()->GetSolid();
   Selector*   selector = GetDocument()->GetSelector();

   if (IsUVEdit()) {
      uvmap_view->SelectNone();
   }

   else if (solid && selector) {
      selector->UseModel(solid->GetModel());
      selector->SelectAll(Selector::SELECT_REMOVE);
   }
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:14,代码来源:MagicView.cpp

示例6: OnUpdate

void MagicView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{
   CView::OnUpdate(pSender, lHint, pHint);

   Solid*      solid    = GetDocument()->GetSolid();
   Selection*  seln     = GetDocument()->GetSelection();
   Selector*   selector = GetDocument()->GetSelector();

   if (solid && scene) {
      scene->Graphics().clear();
      scene->AddGraphic(solid);
      scene->AddGraphic(seln);
      scene->AddGraphic(selector);
   }

   if (selector)
      selector->UseModel(solid->GetModel());
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:18,代码来源:MagicView.cpp

示例7: OnEditRedo

void MagicView::OnEditRedo() 
{
   MagicDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
   pDoc->Redo();

   Solid*      solid    = GetDocument()->GetSolid();
   Selector*   selector = GetDocument()->GetSelector();

   if (selector) {
      selector->UseModel(solid->GetModel());
      selector->Reselect();
   }

   Invalidate();
   pDoc->SetModifiedFlag(TRUE);
   pDoc->UpdateAllViews(this);
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:18,代码来源:MagicView.cpp

示例8: OnUpdateModifyMaterial

void MagicView::OnUpdateModifyMaterial(CCmdUI* pCmdUI) 
{
   Solid* solid = GetDocument()->GetSolid();
   pCmdUI->Enable(solid && solid->GetModel());
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:5,代码来源:MagicView.cpp

示例9: OnUpdateSurfaceProperties

void MagicView::OnUpdateSurfaceProperties(CCmdUI* pCmdUI) 
{
   Solid*      solid = GetDocument()->GetSolid();
   pCmdUI->Enable(solid && solid->GetModel());
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:5,代码来源:MagicView.cpp


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