Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
faxingberlin

Adding to a Group / GEO_PointList Alternatives?


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0