本文整理汇总了C++中CObj::Point方法的典型用法代码示例。如果您正苦于以下问题:C++ CObj::Point方法的具体用法?C++ CObj::Point怎么用?C++ CObj::Point使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CObj
的用法示例。
在下文中一共展示了CObj::Point方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processPointIndex
// Check the point on BC1
// and check the element line
void Utility::processPointIndex()
{
CString fileObjPath = OpenFileDialog(FILE_TYPE_OBJ, "Open whole object");
CString fileBCPath = OpenFileDialog(FILE_TYPE_OBJ, "Open Boundary data");
if(fileObjPath.IsEmpty() || fileBCPath.IsEmpty())
return;
CObj object;
CObj BCObj;
if(object.ReadObjData(fileObjPath.GetBuffer()) && BCObj.ReadObjData(fileBCPath.GetBuffer()))
{
int* BCNode = new int[BCObj.PointNum()];
int index = 0;
for (int i = 0; i< object.PointNum(); i++)
{
vec3d* curPoint = (object.Point() + i);
//Check if this point belong to boundary
for (int j = 0; j < BCObj.PointNum(); j++)
{
vec3d* curBCPoint = (BCObj.Point() + j);
if(*curPoint == *curBCPoint)
{
*(BCNode + index++) = i;
break;
}
}
}
//Write to file
CString output = fileBCPath;
output.Delete(output.GetLength()-3,3);
output += "txt";
if(FILE* fp = fopen(output.GetBuffer(), "w"))
{
for(int i=0; i<index;i++)
fprintf(fp,"%d\n",*(BCNode + i));
fclose(fp);
AfxMessageBox("Process finished", MB_OK|MB_ICONINFORMATION);
}
delete []BCNode;
}
}