Search - User list
Full Version: VectorArray in HDK
Root » Technical Discussion » VectorArray in HDK
horizon1231
Hi,guys

I want to store 10 points' positon into a vector array, how to do that?

for(int a=0;a<10;++a){


UT_Vector3 pos = ppt->getPos();


UT_Vector3Array VA;

}

and how to let ppt pointer point to the next point after one loop.

thanks .
horizon1231
ok i solved 2nd problem,but dont know how to solve the 1st.
anyone could give a help?

long int Count = (long int)gdp->points().entries();

for (a=0,pptgdp)->points().head(); a<Count; a++, pptgdp)->points().next(ppt))
rafal
Check out the methods in UT_ValArray.h. For example, you can do something like that:

UT_Vector3Array VA;
for(…){
UT_Vector3 pos = ppt->getPos();
VA.append( pos );
}
horizon1231
rafal
Check out the methods in UT_ValArray.h. For example, you can do something like that:

UT_Vector3Array VA;
for(…){
UT_Vector3 pos = ppt->getPos();
VA.append( pos );
}

thanks for response,ill look into.

this may works too ?
UT_Vector3Array VA;

for (a=0,pptgdp)->points().head(); a<Count; a++, pptgdp)->points().next(ppt))


{

UT_Vector3 pos = ppt->getPos();


VA=pos;
}
rafal
yes, it will work too.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB