/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author nbriere */ public class TextureNode extends Composite implements java.io.Serializable { // may 2014: new Texture node static final long serialVersionUID = 0; // -5280151442948961597L; // new java // 7695543694999681408L; // old java !!! // default = -8076744133104150348L TextureNode() { super("TextureNode"); } // void Reset() // { // if (hide) // { // if (maxcount > 10) // maxcount /= 10; // else // assert(maxcount == 1); // } // else // if (link2master) // { // toParent[3][0] /= 2; // toParent[3][1] /= 2; // toParent[3][2] /= 2; // fromParent[3][0] *= 2; // fromParent[3][1] *= 2; // fromParent[3][2] *= 2; // } // else // transformcount = 0; // } // // void Step() // { // if (hide) // { // maxcount *= 10; // } // else // if (link2master) // { // toParent[3][0] *= 2; // toParent[3][1] *= 2; // toParent[3][2] *= 2; // fromParent[3][0] /= 2; // fromParent[3][1] /= 2; // fromParent[3][2] /= 2; // } // else // transformcount++; // } // // tabarbak int maxcount; int transformcount; int step; void resetmaxcount() { if (maxcount != 0) setmaxcount(maxcount); maxcount = 0; } void resettransformcount() { if (transformcount != 0) settransformcount(transformcount); transformcount = 0; } void resetstep() { if (step != 0) setstep(step); step = 0; } // // int GetTransformCount() // { // if (step == 0) // step = 1; // if (maxcount == 0) // maxcount = 1000; // // if (CameraPane.LIVE && live && CameraPane.drawMode == CameraPane.SHADOW) // { // //System.err.println("transformcount = " + transformcount); // // if (transformcount > maxcount) // transformcount = 0; // step = -1; // if (transformcount <= 0) // step = 1; // // transformcount += step; // } // // int factor = 1; // // if (!CameraPane.AntialiasingEnabled()) // { // factor = 4; // patch for 2x2 antialiasing only // } // // if (live) // return transformcount * factor; // else // return 1; // } protected void deepCopySelf(Object3D other) { super.deepCopySelf(other); other.maxcount = maxcount; other.transformcount = transformcount; other.step = step; } Object3D deepCopy() { Composite comp = new TextureNode(); deepCopySelf(comp); return comp; } }