HDK :: getGeometrySubclass()

   1799   1   0
User Avatar
Member
66 posts
Joined: Oct. 2008
Offline
Hi, I want to build my geometry representation from arrays of floats each frame. I've read this doc:

http://www.sidefx.com/docs/hdk12.1/hdk_opbasics_simgeometry.html [sidefx.com]

and have a question. My goal is to build GU_Detail in the first frame and modify it each frame. I want to say I do not need to create my geometry each frame (only modify it). In this case it is not updating in the viewport. So, I guess, the following code is not for me. Or it should be done something with the myDetailHandle or any other ideas ?

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;
}
User Avatar
Member
66 posts
Joined: Oct. 2008
Offline
completely no ideas?
  • Quick Links