本文整理汇总了C++中MNMesh::FaceSelect方法的典型用法代码示例。如果您正苦于以下问题:C++ MNMesh::FaceSelect方法的具体用法?C++ MNMesh::FaceSelect怎么用?C++ MNMesh::FaceSelect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MNMesh
的用法示例。
在下文中一共展示了MNMesh::FaceSelect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ApplyChanges
void EditFaceDataModData::ApplyChanges (MNMesh & mesh) {
// Make sure we're sized correctly for this mesh.
// (NOTE: If the user reduces, then increases input number of faces, we lose data.)
if (mesh.numf != mFaceSel.GetSize()) SynchSize (mesh.numf);
// Set the selection:
mesh.FaceSelect (mFaceSel);
// Get the face data manager from the mesh:
DebugPrint ("EditFaceDataMod: Getting manager from MNMesh (0x%08x)\n", &mesh);
IFaceDataMgr *pFDMgr = static_cast<IFaceDataMgr*>(mesh.GetInterface (FACEDATAMGR_INTERFACE));
if (pFDMgr == NULL) return;
SampleFaceData* fdc = dynamic_cast<SampleFaceData*>(pFDMgr->GetFaceDataChan( FACE_MAXSAMPLEUSE_CLSID ));
if ( fdc == NULL ) {
// The mesh does not have our sample face-data channel so we will add it here
fdc = new SampleFaceData();
fdc->FacesCreated (0, mFaceSel.GetSize());
pFDMgr->AddFaceDataChan( fdc );
}
if (!mFacesAffected.NumberSet ()) return;
for (int i=0; i<mFacesAffected.GetSize(); i++) {
if (!mFacesAffected[i]) continue;
fdc->SetValue (i, mtNewFaceValues[i]);
}
}