本文整理汇总了C++中MESH::CreateTube方法的典型用法代码示例。如果您正苦于以下问题:C++ MESH::CreateTube方法的具体用法?C++ MESH::CreateTube怎么用?C++ MESH::CreateTube使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MESH
的用法示例。
在下文中一共展示了MESH::CreateTube方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateMesh
/*************
* DESCRIPTION: create mesh dialog
* INPUT: ID dialog ID
* OUTPUT: -
*************/
void CDoc::CreateMesh(int ID)
{
UNDO_CREATE *pUndo;
MESH *pMesh;
BOOL bErr;
nDialogID = ID;
CCMeshDlg dialog;
if (dialog.DoModal() == IDOK)
{
pMesh = new MESH;
if (pMesh)
{
pMesh->selected = TRUE;
pMesh->surf = new SURFACE;
if (pMesh->surf)
{
switch (nDialogID)
{
case IDD_CUBE: bErr = pMesh->CreateCube(&dialog.m_vSize); break;
case IDD_TORUS: bErr = pMesh->CreateTorus(dialog.m_Radius, dialog.m_Thickness, dialog.m_nDivs, dialog.m_nSlices); break;
case IDD_SPHERE: bErr = pMesh->CreateSphere(dialog.m_Radius, dialog.m_nDivs, dialog.m_nSlices); break;
case IDD_TUBE: bErr = pMesh->CreateTube(dialog.m_Radius, dialog.m_Height, dialog.m_nDivs, dialog.m_nSlices, dialog.m_bClosedBottom, dialog.m_bClosedTop); break;
case IDD_PLANE: bErr = pMesh->CreatePlane(&dialog.m_vSize, dialog.m_nXDivs, dialog.m_nZDivs); break;
case IDD_CONE: bErr = pMesh->CreateCone(dialog.m_Radius, dialog.m_Height, dialog.m_nDivs, dialog.m_nSlices, dialog.m_bClosedBottom); break;
}
if (!bErr)
delete pMesh;
else
{
DeselectAll();
pMesh->Append();
pMesh->IsFirstSelected();
pUndo = new UNDO_CREATE;
if (pUndo)
{
if (pUndo->AddCreated(pMesh))
pUndo->Add();
else
delete pUndo;
}
sciBrowserBuild();
}
}
else
delete pMesh;
}
}
sciRedraw();
}