Jump to content

getGeometrySubclass() and modifying geometry


morzh

Recommended Posts

Hi, guys. I've read this doc

http://www.sidefx.co...imgeometry.html

and the following part is interesting for me:

GU_ConstDetailHandle SIM_MyOwnGeometry::getGeometrySubclass() const

{

if( myDetailHandle.isNull() )

{

GU_Detail* gdp = new GU_Detail();

myDetailHandle.allocateAndSet(gdp);

.. // Generate geometry for myOwnRepresentation

.. // and store this geometry in gdp

}

return myDetailHandle;

}

As I have understood, I should create NEW geometry each frame (each time Houdini executes getGeometrySubclass ). BUT I want only to create myGeometry in the first frame and update it each frame. It is simply to implement, but modified myGeometry is not updating in the viewport. I guess it should be done something with myDetailHandle (cause it caches 'first frame geometry' and never updates it), but now i have no understanding what should I do. Any ideas ?

Edited by morzh
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...