int CParticleConnection::type_Code ( CLxUser_Item &item) { if (item.IsA(cit_source)) return STYPE_SOURCE; return -1; }
bool CLxItemSelection::LoopNext ( CLxUser_Item &item) { if (tmp_idx < tmp_list.size ()) return item.set (tmp_list[tmp_idx++]); LoopStop (); return false; }
void CLxVertexSelection::GetDirectList ( MeshList &list) { CLxUser_Item item; MeshEntry entry; LXtScanInfoID scan; LXtPointID vrt; const char *id; void *pkt; size_t k; std::map<const char *, size_t> entries; std::map<const char *, size_t>::iterator eit; list.clear (); scan = 0; while (scan = srv_sel.ScanLoop (scan, sel_ID, &pkt)) { pkt_trans.Vertex (pkt, &vrt); pkt_trans.GetItem (pkt, item); item.Ident (&id); eit = entries.find (id); if (eit == entries.end ()) { entry.item.set (item); pkt_trans.GetMesh (pkt, entry.mesh); k = list.size (); entries[id] = k; list.push_back (entry); } else k = eit->second; list[k].list.push_back (vrt); } }
bool CParticleAttachCommand::UpDateUI ( CLxUser_Item &item, CLxUser_Item &source) { CLxUser_ChannelWrite chanWrite, chanWriteEdit; chanWrite.setupFrom (item); chanWrite.Set (item, CN_DATA_FILE_NAME, source.GetIdentity ().c_str ()); const char *feature = DEFAULT_FEATURE; chanWrite.Set (item, FEATURE_NAME_LIST, feature); chanWriteEdit.from (item); chanWriteEdit.Set (item, CURRENT_FEATURE, feature); return true; }
bool CParticleAttachCommand::SetSource ( CLxUser_Item &item, CLxUser_Item &source) { CLxUser_Scene scene; CLxUser_ItemGraph graph; CLxUser_Item old; if (!scene.from (item) || !graph.from (scene, GRAPH_VOXELITEM)) return false; while (graph.Reverse (item)) { graph.Reverse (item, 0, old); graph.DeleteLink (old, item); } if (source.test ()) { graph.AddLink (source, item); return true; } return false; }
/* * ---------------------------------------------------------------- * CLxItemSelectionType : Implementation */ bool CLxItemSelectionType::Include ( CLxUser_Item &item) { return item.IsA (type); }