SetEdgeVisibility (C++)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Display Modes
  06 June 2018
SetEdgeVisibility (C++)

I wrote a modifier plugin that will set the visibility of edges on trimesh. my question is how I can find border edges and exclude them from this change? In other word I want to keep border edges untouched. This is my function that my thought was should work, but I don't know why it's not working as expected:


void ModifyTriObject(TimeValue t, ModContext &mc, TriObject *tobj)
{
   Interval iv = FOREVER;
   int i, j;
   Mesh &mesh = tobj->GetMesh();
   BitArray openEdges;
   mesh.FindOpenEdges(openEdges);
   for (i = 0; i < mesh.numFaces; i++)
   {
      for (j = 0; j < 3; j++)
      {
         mesh.faces[i].setEdgeVis(j, openEdges[i*j]);
      }
   }
   mesh.InvalidateTopologyCache();
   tobj->UpdateValidity(GEOM_CHAN_NUM, iv);
}
__________________
http://3dcutout.com/
 
  06 June 2018
Try:

openEdges[i*3+j]
__________________
Jorge Rodríguez
PolyTools3D
 
  06 June 2018
Originally Posted by PolyTools3D: Try:

openEdges[i*3+j]
Thank You!
__________________
http://3dcutout.com/
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:45 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.