Jump to content

Adding to a Group / GEO_PointList Alternatives?


Recommended Posts


I am a beginner who studied HDK. I use VC14(visual studio 15), Houdini 15.5. 

I study many examples in SOP folder and etc... There are two questions.

First,

GA_PointGroup * mygroup;
GEO_Point * ppt;

GR_FOR_ALL_GPOINTS_NC(gdp, GEO_Point, pt)
{
    mygroup->add(ppt->getNum());
}


This Code should be fixed by reference HDK Documents(Geometry Porting Cookbook)

http://www.sidefx.com/docs/hdk/_h_d_k__g_a__porting.html#HDK_GA_PortingCookbook_Simple_Name_Translation

/*
 *Adding To A Group
 *
 *GB Code
 *group->add(prim->getNum())
 *==>
 *GA Code
 *group->add(*prim);
 *group->addIndex(prim->getNum());
*/
GA_PointGroup * mygroup;
GEO_Point * ppt;

GR_FOR_ALL_GPOINTS_NC(gdp, GEO_Point, pt)
{
    mygroup->add(*ppt);
    mygroup->addInex(ppt->getNum());
}

I changed like this. But

mygroup->add(*ppt);

still error...

Is There any way?

 

Second, I have one more question about GEO_PointList

For the Documents,

GB_ElementList

GB had arrays of pointers to objects. As these objects no longer exist, code using element arrays should likely be re-written to be more efficient. The GA version of element lists return by value (not by reference).

// GB Code
GEO_PointList &pnts = gdp->points();
==>
// GA Code
GEO_PointList  pnts = gdp->points();

But there is no GEO_PointList.. I check it existed 13.0 not 15.0
I traverse 13.0 HDK Documents related GEO_PointList.. It's so difficult to find out the replacements.

I search for Major Changes and HDK Forums, Documents. I cannot find. 
I want use points() function.. OTL

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...