// component in SkanaarTexturizer (c)2005 Daniel Kallin // Detta är superklassen till alla filter // Den innehåller alla variabler och metoder som är obligatoriska i filter //---------------------------------------------------------------- class TextureFilter { int sourceCount; // Antalet källfilter float x, y; // Positionen ochav filtrets ikon i trädstrukturen float fx, fy; // kraftvektor på filtrets ikon int radius = 8; int handleRadius = 3; String name; // TexturFiltrets namn på skärmen String description; color borderColor; // ikonens kantfärg TextureFilter[] sources; String[] sourceDescriptions; float[][] sourceKnobs; Attribute[] attributes; boolean[] selectedSources; boolean selected = false; boolean deleteMe = false; //--Metoder------------------------------------- TextureFilter(String name, int sourceCount, int attributeCount){ this(name,sourceCount,attributeCount,""); } //--Metoder------------------------------------- TextureFilter(String name, int sourceCount, int attributeCount, String description){ this.sourceCount = sourceCount; this.name = name; this.description = description; borderColor = color(0); x = rootX + (int) random(-guiWidth/3,guiWidth/3); y = rootY + (int) random(0,guiWidth/2); sources = new TextureFilter[sourceCount]; sourceDescriptions = new String[sourceCount]; sourceKnobs = new float[sourceCount][2]; for(int i=0; i