本文整理汇总了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);
}
}
示例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);
}
示例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();
}
}
}
示例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();
}
}
示例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);
}
}
示例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());
}
示例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);
}
示例8: OnUpdateModifyMaterial
void MagicView::OnUpdateModifyMaterial(CCmdUI* pCmdUI)
{
Solid* solid = GetDocument()->GetSolid();
pCmdUI->Enable(solid && solid->GetModel());
}
示例9: OnUpdateSurfaceProperties
void MagicView::OnUpdateSurfaceProperties(CCmdUI* pCmdUI)
{
Solid* solid = GetDocument()->GetSolid();
pCmdUI->Enable(solid && solid->GetModel());
}