PolygonMeshStructureChangeBracket (struct)

Local bracket wrapper for PolygonMesh.beginStructureChanges and PolygonMesh.endStructureChanges. Using this mechanism allows to avoid potential unbalanced bracket errors.

PolygonMeshStructureChangeBracket PolygonMeshStructureChangeBracket PolygonMeshStructureChangeBracket

Members

Ref<PolygonMesh> mesh  
/*
** Example: PolygonMeshStructureChangeBracket
*/

require Geometry;
  
operator entry() {

      PolygonMesh p();
      {
        PolygonMeshStructureChangeBracket changeBracket(p);
        p.createPoints(3);
        p.addPolygon(0,1,2);
      } // At destruction, changeBracket ends the structure changes
      //The following is legal since changes are done
      report( "Point 0's first polygon = " + p.getPointPolygon(0, 0) );
  
}

/*
** Output:

Point 0's first polygon = 0

*/

Methods in detail

PolygonMeshStructureChangeBracket ( in PolygonMeshStructureChangeBracket other )

copy constructor


PolygonMeshStructureChangeBracket ( in Ref<PolygonMesh> mesh )

Construct a local structure change bracket for the mesh. See PolygonMeshStructureChangeBracket for an example of usage.



PolygonMeshStructureChangeBracket PolygonMeshStructureChangeBracket.clone? ()

clone method