/** * Adds the specified node to this surface, if not already present. * @param node the node. * @return true, if node was added; false, otherwise. */ public synchronized boolean addNode(Node node) { boolean added = _mesh.addNode(node._meshNode); if (added) rebuild(); return added; }
/** * Removes the specified node from this surface, if present. * @param node the node. * @return true, if node was removed; false, otherwise. */ public synchronized boolean removeNode(Node node) { boolean removed = _mesh.removeNode(node._meshNode); if (removed) rebuild(); return removed; }
/** * Adds the specified nodes to this surface, if not already present. * @param nodes the nodes. * @return true, if all nodes were added; false, otherwise. */ public synchronized boolean addNodes(Node[] nodes) { int nnode = nodes.length; int nadded = 0; for (int inode=0; inode<nnode; ++inode) { if (_mesh.addNode(nodes[inode]._meshNode)) ++nadded; } if (nadded>0) rebuild(); return nadded==nnode; }
/** * Removes the specified nodes from this surface, if present. * @param nodes the nodes. * @return true, if all nodes were removed; false, otherwise. */ public synchronized boolean removeNodes(Node[] nodes) { int nnode = nodes.length; int nremoved = 0; for (int inode=0; inode<nnode; ++inode) { if (_mesh.removeNode(nodes[inode]._meshNode)) ++nremoved; } if (nremoved>0) rebuild(); return nremoved==nnode; }