/** Copyright 2004-2008 Ricard Marxer This file is part of Geomerative. Geomerative is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Geomerative is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Geomerative. If not, see . */ package geomerative ; import processing.core.PApplet; import processing.core.PConstants; import processing.core.PGraphics; /** * RMesh is a reduced interface for creating, holding and drawing meshes. A mesh is a group of triangular strips (RStrip). * @eexample RMesh * @usage Geometry * @related RStrip * @extended */ public class RMesh extends RGeomElem { /** * @invisible */ public int type = RGeomElem.MESH; /** * Array of RStrip objects holding the contours of the polygon. * @eexample strips * @related RStrip * @related countStrips ( ) * @related addStrip ( ) */ public RStrip[] strips; int currentStrip=0; // ---------------------- // --- Public Methods --- // ---------------------- /** * Create a new empty mesh. * @eexample createaMesh */ public RMesh(){ strips = null; type = RGeomElem.MESH; } /** * Copy a mesh. * @eexample createaMesh * @param m the object of which to make a copy */ public RMesh(RMesh m){ if(m == null){ return; } for(int i=0;i