本文整理汇总了C++中INodeTab类的典型用法代码示例。如果您正苦于以下问题:C++ INodeTab类的具体用法?C++ INodeTab怎么用?C++ INodeTab使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了INodeTab类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proc
void PFOperatorForceSpaceWarp::proc(INodeTab &nodeTab)
{
if (nodeTab.Count() == 0) return;
theHold.Begin();
pblock()->Append(kForceSpaceWarp_ForceNodeList, nodeTab.Count(), nodeTab.Addr(0));
theHold.Accept(GetString(IDS_PARAMETERCHANGE));
}
示例2: ChangeBegin
void EditFaceDataMod::ChangeBegin () {
if (selLevel == SEL_OBJECT) return;
if (efdRestore) {
delete efdRestore;
efdRestore = NULL;
}
// Find the modcontext with the selected faces.
// NOTE that as currently written, this modifier won't
// support setting FaceFloats on more than one node at a time.
ModContextList mcList;
INodeTab nodes;
ip->GetModContexts(mcList,nodes);
int numSelected=0, whichFace;
float value;
bool valueDetermined=true;
EditFaceDataModData *relevantMD;
if (selLevel) {
for (int i = 0; i < mcList.Count(); i++) {
EditFaceDataModData *meshData = (EditFaceDataModData*)mcList[i]->localData;
if (!meshData) continue;
meshData->DescribeSelection (numSelected, whichFace, value, valueDetermined);
if (!numSelected) continue;
relevantMD = meshData;
break;
}
}
nodes.DisposeTemporary ();
if (!numSelected) return;
efdRestore = new EditFaceDataRestore (this, relevantMD);
}
示例3: ChangeSelVerts
void EditPatchMod::ChangeSelVerts(int type)
{
ModContextList mcList;
INodeTab nodes;
TimeValue t = ip->GetTime();
BOOL holdNeeded = FALSE;
BOOL hadSelected = FALSE;
if (!ip)
return;
ip->GetModContexts(mcList, nodes);
ClearPatchDataFlag(mcList, EPD_BEENDONE);
theHold.Begin();
for (int i = 0; i < mcList.Count(); i++)
{
BOOL altered = FALSE;
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
if (!patchData)
continue;
if (patchData->GetFlag(EPD_BEENDONE))
continue;
// If the mesh isn't yet cache, this will cause it to get cached.
RPatchMesh *rpatch;
PatchMesh *patch = patchData->TempData(this)->GetPatch(t, rpatch);
if (!patch)
continue;
// If this is the first edit, then the delta arrays will be allocated
patchData->BeginEdit(t);
// If any bits are set in the selection set, let's DO IT!!
if (patch->vertSel.NumberSet())
{
altered = holdNeeded = TRUE;
if (theHold.Holding())
theHold.Put(new PatchRestore(patchData, this, patch, rpatch, "ChangeSelVerts"));
// Call the vertex type change function
patch->ChangeVertType(-1, type);
patchData->UpdateChanges(patch, rpatch, FALSE);
patchData->TempData(this)->Invalidate(PART_TOPO);
}
patchData->SetFlag(EPD_BEENDONE, TRUE);
}
if (holdNeeded)
theHold.Accept(GetString(IDS_TH_VERTCHANGE));
else
{
ip->DisplayTempPrompt(GetString(IDS_TH_NOVERTSSEL), PROMPT_TIME);
theHold.End();
}
nodes.DisposeTemporary();
ClearPatchDataFlag(mcList, EPD_BEENDONE);
NotifyDependents(FOREVER, PART_TOPO, REFMSG_CHANGE);
ip->RedrawViews(ip->GetTime(), REDRAW_NORMAL);
}
示例4: ClearSelection
void EditFaceDataMod::ClearSelection(int selLevel) {
ModContextList list;
INodeTab nodes;
ip->GetModContexts(list,nodes);
EditFaceDataModData *d;
for (int i=0; i<list.Count(); i++) {
d = (EditFaceDataModData*)list[i]->localData;
if (!d) continue;
// Check if we have anything selected first:
switch (selLevel) {
case SEL_FACE:
if (!d->GetFaceSel().NumberSet()) continue;
else break;
}
if (theHold.Holding() && !d->GetHeld()) theHold.Put (new SelectRestore (this, d));
d->SynchSize ();
switch (selLevel) {
case SEL_FACE:
d->GetFaceSel().ClearAll();
break;
}
}
nodes.DisposeTemporary();
SelectionChanged ();
}
示例5: MaybeFixupNamedSels
void EditPatchMod::RemoveSubSelSet(TSTR &setName)
{
MaybeFixupNamedSels();
ModContextList mcList;
INodeTab nodes;
if (!ip)
return;
ip->GetModContexts(mcList, nodes);
for (int i = 0; i < mcList.Count(); i++)
{
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
if (!patchData)
continue;
patchData->BeginEdit(ip->GetTime());
GenericNamedSelSetList &sel = patchData->GetSelSet(this);
sel.RemoveSet(setName);
}
// Remove the modifier's entry
RemoveSet(setName, selLevel);
ip->ClearCurNamedSelSet();
SetupNamedSelDropDown();
nodes.DisposeTemporary();
}
示例6: proc
void DumpHitDialog::proc(INodeTab &nodeTab)
{
int nodeCount = nodeTab.Count();
if (nodeCount == 0) return;
theHold.Begin();
for (int i=0;i<nodeTab.Count();i++)
{
eo->pblock2->Append(pb_nodelist,1,&nodeTab[i]);
macroRecorder->FunctionCall(_T("$.blobMeshOps.AddBlob"), 1, 0,
mr_reftarg,nodeTab[i]);
}
theHold.Accept(GetString(IDS_ADD));
eo->NotifyDependents(FOREVER, PART_GEOM, REFMSG_CHANGE);
eo->ip->RedrawViews(eo->ip->GetTime());
}
示例7: AreNodesOrParentsInTMUpdate
//we need to not only check the expose node and reference node to see if there flags are set, but
//we also need to check their parents since a call on node->GetNodeTM may call node->parent->UpdateTM
//node->parent->parent->UpdateTM.. etc... So all of the parents need to get checked to.
BOOL BaseExposeControl::AreNodesOrParentsInTMUpdate()
{
//collect expose node parents.
if(exposeTransform)
{
INode *exposeNode = exposeTransform->GetExposeNode();
if(exposeNode)
{
INodeTab nodes;
nodes.Append(1,&exposeNode);
CollectParents(nodes,exposeNode);
//simple check to see if referenceNode isn't exposeNodeParent.. if not.. collect them too
INode *refNode = exposeTransform->GetReferenceNode();
if(refNode&&refNode!=exposeNode->GetParentNode())
{
nodes.Append(1,&refNode);
CollectParents(nodes,refNode);
}
for(int i=0;i<nodes.Count();++i)
{
if(nodes[i]->TestAFlag(A_INODE_IN_UPDATE_TM)==TRUE)
return TRUE;
}
}
}
return FALSE;
}
示例8: RecordTopologyTags
void EditPatchMod::RecordTopologyTags()
{
ModContextList mcList;
INodeTab nodes;
TimeValue t = ip->GetTime();
ip->GetModContexts(mcList, nodes);
ClearPatchDataFlag(mcList, EPD_BEENDONE);
for (int i = 0; i < mcList.Count(); i++)
{
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
if (!patchData)
continue;
if (patchData->GetFlag(EPD_BEENDONE))
continue;
// If the mesh isn't yet cache, this will cause it to get cached.
RPatchMesh *rpatch;
PatchMesh *patch = patchData->TempData(this)->GetPatch(t, rpatch);
if (!patch)
continue;
patch->RecordTopologyTags();
patchData->SetFlag(EPD_BEENDONE, TRUE);
}
nodes.DisposeTemporary();
ClearPatchDataFlag(mcList, EPD_BEENDONE);
}
示例9: ResetSel
static void ResetSel()
{
INodeTab selNodes;
GetCOREInterface7()->GetSelNodeTab(selNodes);
if (selNodes.Count() > 0) {
ResetXForm::ResetNodes(selNodes);
}
}
示例10: GetNode
INode* MaterialUIHandler::GetNode (EPolyMod *pMod){
if (!pMod || !pMod->EpModGetIP()) return NULL;
ModContextList mcList;
INodeTab nodes;
pMod->EpModGetIP()->GetModContexts (mcList, nodes);
INode* objnode = nodes.Count() == 1 ? nodes[0]->GetActualINode(): NULL;
nodes.DisposeTemporary();
return objnode;
}
示例11: CollectNonDrawables
void plClickDragComponent::CollectNonDrawables(INodeTab& nonDrawables)
{
INode* boundsNode = fCompPB->GetINode(kClickDragProxy);
if(boundsNode && fCompPB->GetInt(kClickDragUseProxy))
nonDrawables.Append(1, &boundsNode);
boundsNode = fCompPB->GetINode(kClickDragProxyRegion);
if(boundsNode )
nonDrawables.Append(1, &boundsNode);
}
示例12: DbgAssert
BOOL PickControlNode::Pick(IObjParam *ip,ViewExp *vpt)
{
if ( ! vpt || ! vpt->IsAlive() )
{
// why are we here
DbgAssert(!_T("Invalid viewport!"));
return FALSE;
}
INode *node = vpt->GetClosestHit();
if (node) {
// RB 3/1/99: This should use the node tm not the object TM. See ModifyObject() imp.
Matrix3 ourTM,ntm = node->GetNodeTM(GetCOREInterface()->GetTime()); //node->GetObjectTM(ip->GetTime());
ModContextList mcList;
INodeTab nodes;
ip->GetModContexts(mcList,nodes);
if (nodes.Count())
{
ourTM = nodes[0]->GetObjectTM(GetCOREInterface()->GetTime());
ourTM = Inverse(ourTM);
Box3 bounds;
bounds.Init();
ObjectState os = node->EvalWorldState(GetCOREInterface()->GetTime());
ViewExp& vp = GetCOREInterface()->GetActiveViewExp();
if ( ! vp.IsAlive() )
{
// why are we here
DbgAssert(!_T("Invalid viewport!"));
return FALSE;
}
os.obj->GetWorldBoundBox(GetCOREInterface()->GetTime(), node, vp.ToPointer(), bounds );
Point3 min = bounds.pmin * ourTM;
Point3 max = bounds.pmax * ourTM;
theHold.Begin();
mod->pblock2->SetValue(particlemesher_customboundsa,0,min);
mod->pblock2->SetValue(particlemesher_customboundsb,0,max);
theHold.Accept(GetString(IDS_BOUNDS));
mod->NotifyDependents(FOREVER,0,REFMSG_CHANGE);
mod->UpdateUI();
}
nodes.DisposeTemporary();
}
return TRUE;
}
示例13: GetPaintHosts
void EditPolyMod::GetPaintHosts( Tab<MeshPaintHost*>& hosts, Tab<INode*>& paintNodes ) {
ModContextList mcList;
INodeTab nodes;
ip->GetModContexts(mcList,nodes);
EditPolyData* modData = NULL;
for (int i=0; i<mcList.Count(); i++ ) {
if( (modData=(EditPolyData*)mcList[i]->localData)== NULL) continue;
MeshPaintHost* host = modData;
hosts.Append( 1, &(host) );
INode *pNode = nodes[i]->GetActualINode();
paintNodes.Append( 1, &pNode );
}
nodes.DisposeTemporary();
}
示例14: ExportCalSkel_cf
Value* ExportCalSkel_cf(Value** arg_list, int count)
{
int i;
INodeTab tabnode;
std::tstring fullpathfilename;
int ArraySize ;
bool bShowUI ;
check_arg_count(ExportCalSkel, 3, count);
type_check(arg_list[0], String, _T("[The first argument of ExportCalSkel should be a string that is a full path name of the file to export]"));
type_check(arg_list[1], Array , _T("[The 2nd argument of ExportCalSkel should be an array of nodes]"));
type_check(arg_list[2], Boolean,_T("[The 3rd argument of ExportCalSkel should be a boolean that tells if you want to use the UI or not to select nodes of skeleton]"));
try
{
fullpathfilename = arg_list[0]->to_string();
//Get Array
Array* BonesArray = static_cast<Array*>(arg_list[1]);
ArraySize = BonesArray->size;
bShowUI = !!(arg_list[2]->to_bool());
if (fullpathfilename.length() == 0) return new Integer (1);
if (! ArraySize) return new Integer (2);
for (i=0;i<ArraySize;i++)
{
if (BonesArray->data[i]->is_kind_of(class_tag(MAXNode)) )
{
INode* _node = BonesArray->data[i]->to_node();
if (! _node)return new Integer (3);
tabnode.Append(1,&_node);
}
}
//Call the exporter from Maxscript
if (CMaxSkeletonExport::ExportSkeletonFromMaxscriptCall(fullpathfilename.c_str(), tabnode, bShowUI) )
return new Integer (0);
return new Integer (-1);
}
catch(...)
{
//MessageBox(NULL,"Exception catched in ExportCalSkel C++ function","Error",MB_OK);
return new Integer (-2);
}
}
示例15: zAxis
INodeTab GR2ImportImpl::ImportSkeleton(Skeleton& skel)
{
Point3 zAxis(0,0,1);
INodeTab nodes;
nodes.SetCount(int(skel.Bones.size()));
float scale = 1.0f;
for (size_t i=0, n=skel.Bones.size(); i<n; ++i)
{
Bone& bone = skel.Bones[i];
INode *node = o->gi->GetINodeByName(bone.Name.c_str());
if (node != NULL)
{
nodes[i] = node;
continue;
}
Point3 pp(0.0f,0.0f,0.0f);
Matrix3 tm = GetWorldTransform(skel, i);
Point3 p = tm.GetTrans();
Quat q = tm;
if (bone.ParentIndex >= 0)
{
Matrix3 m3 = GetWorldTransform(skel, bone.ParentIndex);
pp = m3.GetTrans();
//pp = skel.Bones[bone.ParentIndex].Transform.Origin;
}
node = CreateBone(bone.Name.c_str(), p, pp, zAxis);
node->SetUserPropInt("GR2BoneIndex", int(i));
nodes[i] = node;
//OutputDebugString(FormatText("GR2BoneIndex: %d %s\n", i, bone.Name.c_str()));
PosRotScaleNode(node, p, q, scale, PosRotScale(prsPos|prsRot));
if (bone.ParentIndex >= 0)
{
if (INode *pn = nodes[bone.ParentIndex])
pn->AttachChild(node, 1);
}
}
return nodes;
}