Building a cube using HDK

Gerome Mortelecque gerome.mortelecque at framestore-cfc.com
Thu Jul 8 09:32:55 EDT 2004


George,
Great stuff
Thanks again.
Gerome.

George ElKoura wrote:

>Hi Gerome,
>
>The GU_PrimPoly::build() function takes as a last argument appendPts (which
>defaults to 1).  If you set this to 0, then the polygon's vertices won't
>have any points set (getPt() will return NULL).  This way you can build your
>8 points ahead of time and assign them to the appropriate vertices of the
>appropriate faces.  You wouldn't need to do a consolidate then.
>
>Hope that helps,
>George.
>
>----- Original Message ----- 
>From: Gerome Mortelecque
>To: George ElKoura ; sidefx-devkit-list at sidefx.com
>Sent: Thursday, July 08, 2004 6:25 AM
>Subject: Re: Building a cube using HDK
>
>
>George,
>
>Thanks for the reply. The second answer suits me fine. Sorry for not making
>the question clear.
>Another question:
>I built a cube using the following pseudo-code:
>
>for(6 faces)
>        poly = GU_PrimPoly::build(gdp, 4, GU_POLY_CLOSED);
>         for each vertex
>                     ppt = poly->getVertex(i).getPt();
>                     ppt = x,y,z,1;   /// assign your pt position
>                     (*poly)(i).setPt(ppt);
>
>
>I will have a cube but with duplicated points (NPT = 24).  In the interface
>if I do a consolidate the points I will be fine and have my 8 points. In the
>HDK do I have to do the same? Use one of the consolidatePoint functions or
>should I do "something" when I build the actual geometry?
>Cheers
>Gerome.
>
>
>
>
>
>George ElKoura wrote:
>Hi Gerome,
>
>I hope I understand your question correctly.  To answer a very simple part,
>there are methods in GU_Detail that will build a cube for you.  Have a look
>at the methods: cube(), nurbCube(), bezCube(), etc...
>
>Now, I don't think that will fully answer your question.  Basically, you can
>build polygons by calling GU_PrimPoly::build().  When you build a polygon,
>you will get a GEO_Vertex for each vertex of the polygon.  Each GEO_Vertex
>has a pointer to a GEO_Point and the base call of GEO_Vertex, GB_Vertex has
>a method setPt() which can be used to set the point of the vertex.  If two
>polygons have vertices that point to the same GEO_Point, then they are
>connected.
>
>I hope that helps.
>
>Take care,
>George.
>
>
>
>
>----- Forwarded message from Gerome Mortelecque
>
><gerome.mortelecque at framestore-cfc.com> -----
>
>Date: Wed, 07 Jul 2004 17:04:43 +0100
>From: Gerome Mortelecque <gerome.mortelecque at framestore-cfc.com>
>Reply-To: sidefx-devkit-list at sidefx.com
>Subject: Building a cube using HDK
>To: sidefx-devkit-list at sidefx.com
>
>Hi,
>
>How should I proceed to build a cube having a list of points and Vertex
>indices?
>I had a look at SOP_Star but I am not sure how to do the connection of
>the polygon.
>A bit of help will be wonderful
>Thanks
>Regards
>Gerome.
>
>  
>

-- 
Gerome Mortelecque
FRAMESTORE - CFC 
19-23 Wells Street 
London W1T 3PQ 
Work   0207 344 8000 ext 8161
Mobile 07986 595 177




More information about the Sidefx-devkit-list mailing list