Examples/Animation/Clock.Java

Examples/Animation/Clock.Java

<p> JAVA 3D Examples</p><p>/examples/Animation/Clock.java</p><p>Included the following code in Clock.java due to deprecated method (version 1.2)</p><p>//cloneNodeComponent() is deprecated - replace with cloneNodeComponent(true) //Appearance bAppear = (Appearance) appear.cloneNodeComponent(); Appearance bAppear = (Appearance) appear.cloneNodeComponent(true);</p><p>/examples/Interaction/MousePickApp.java</p><p>Deprecated package used (as of 3d v1.2)– see replacement code below:</p><p>//com.sun.j3d.utils.behaviors.picking.* package is deprecated - replacement on //next line //import com.sun.j3d.utils.behaviors.picking.*; import com.sun.j3d.utils.picking.behaviors.*;</p><p>/examples/Interaction/PickCallbackApp.java</p><p>Deprecated package used (as of 3d v1.2) – see replacement code below:</p><p>//com.sun.j3d.utils.behaviors.picking.* package is deprecated - replacement on //next line //import com.sun.j3d.utils.behaviors.picking.*; import com.sun.j3d.utils.picking.behaviors.*;</p><p>/examples/texture/BoundaryColorApp.java</p><p>Deprecated method setTextureCoordinate(int, Point2f) replaced by setTextureCoordinate(int, int, TexCoord2f) see example of code changes below:</p><p>/*setTextureCoordinate(int, Point2f) has been deprecated and replaced by setTextureCoordinate(int, int, TexCoord2f)*/</p><p>//texturedQuad.setTextureCoordinate(0, new Point2f(-1.0f, 1.5f)); texturedQuad.setTextureCoordinate(0,0, new TexCoord2f(-1.0f, 1.5f)); //texturedQuad.setTextureCoordinate(1, new Point2f(-1.0f,-1.0f)); texturedQuad.setTextureCoordinate(0,1, new TexCoord2f(-1.0f, -1.0f)); //texturedQuad.setTextureCoordinate(2, new Point2f( 1.5f,-1.0f)); texturedQuad.setTextureCoordinate(0,2, new TexCoord2f(1.5f, -1.0f)); //texturedQuad.setTextureCoordinate(3, new Point2f( 1.5f, 1.5f)); texturedQuad.setTextureCoordinate(0,3, new TexCoord2f(1.5f, 1.5f));</p><p>/examples/texture/BoundaryModeApp.java</p><p>Deprecated method setTextureCoordinate(int, Point2f) replaced with setTextureCoordinate(int, int, TexCoord2f). See example code below:</p><p>/*setTextureCoordinate(int, Point2f) has been deprecated and replaced by setTextureCoordinate(int, int, TexCoord2f)*/</p><p>//texturedQuad.setTextureCoordinate(0, new Point2f(-1.0f, 1.5f)); texturedQuad.setTextureCoordinate(0,0, new TexCoord2f(-1.0f, 1.5f)); //texturedQuad.setTextureCoordinate(1, new Point2f(-1.0f,-1.0f)); texturedQuad.setTextureCoordinate(0,1, new TexCoord2f(-1.0f, -1.0f)); //texturedQuad.setTextureCoordinate(2, new Point2f( 1.5f,-1.0f)); texturedQuad.setTextureCoordinate(0,2, new TexCoord2f(1.5f, -1.0f)); //texturedQuad.setTextureCoordinate(3, new Point2f( 1.5f, 1.5f)); texturedQuad.setTextureCoordinate(0,3, new TexCoord2f(1.5f, 1.5f));</p><p>/examples/texture/MIPmapApp.java</p><p>Replaced deprecated method setTextureCoordinate(int, Point2f) with setTextureCoordinate(int, int, TexCoord2f). See code change below:</p><p>/*setTextureCoordinate(int, Point2f) is deprecated as of Java3D v1.2 and replaced by setTextureCoordinate(int, int, TexCoord2f)*/</p><p>//Point2f q = new Point2f( 0.0f, 1.0f); TexCoord2f q = new TexCoord2f(0.0f, 1.0f); //plane.setTextureCoordinate(0, q); plane.setTextureCoordinate(0, 0, q); q.set(0.0f, 0.0f); //plane.setTextureCoordinate(1, q); plane.setTextureCoordinate(0, 1, q); q.set(1.0f, 0.0f); //plane.setTextureCoordinate(2, q); plane.setTextureCoordinate(0, 2, q); q.set(1.0f, 1.0f); //plane.setTextureCoordinate(3, q); plane.setTextureCoordinate(0, 3, q); examples/texture/MIPmapApp2.java</p><p>Same changes as MIPmapApp.java examples/texture/MIPmapDemo.java</p><p>Same changes as MIPmapApp.java examples/texture/SimpleTextureApp.java</p><p>Same changes as MIPmapApp.java examples/texture/SimpleTextureSpinApp.java</p><p>Same changes as MIPmapApp.java examples/texture/Text2DtextureApp.java</p><p>Replaced deprecated method setTextureCoordinate(int, Point2f) with setTextureCoordinate(int, int, TexCoord2f). See code changes below:</p><p>/* setTextureCoordinates(int, Point2f) is deprecated as of Java3d v1.2 and replaced by setTextureCoordinate(int, int, TexCoord2f) */</p><p>//qa.setTextureCoordinate(0, new Point2f(0.0f, 1.0f)); qa.setTextureCoordinate(0, 0, new TexCoord2f(0.0f, 1.0f)); //qa.setTextureCoordinate(1, new Point2f(0.0f, 0.0f)); qa.setTextureCoordinate(0, 1, new TexCoord2f(0.0f, 0.0f)); //qa.setTextureCoordinate(2, new Point2f(1.0f, 0.0f)); qa.setTextureCoordinate(0, 2, new TexCoord2f(1.0f, 0.0f)); //qa.setTextureCoordinate(3, new Point2f(1.0f, 1.0f)); qa.setTextureCoordinate(0, 3, new TexCoord2f(1.0f, 1.0f)); examples/texture/TextureCoordApp.java</p><p>Replaced deprecated method setTextureCoordinate(int, Point2f) with setTexturedCordinate(int, int, TexCoord2f). See code changes below:</p><p>/* The method setTextureCoordinate(int, Point2f) has been deprecated as of Java3D v1.2. Thus, the method setTextureCoordinate(int, int, TexCoord2f) replaces it. */</p><p>//texturedQuad.setTextureCoordinate(0, new Point2f( 0.5f, 0.0f)); texturedQuad.setTextureCoordinate(0, 0, new TexCoord2f(0.5f, 0.0f)); //texturedQuad.setTextureCoordinate(1, new Point2f( 1.0f, 0.5f)); texturedQuad.setTextureCoordinate(0, 1, new TexCoord2f(1.0f, 0.5f)); //texturedQuad.setTextureCoordinate(2, new Point2f( 0.5f, 1.0f)); texturedQuad.setTextureCoordinate(0, 2, new TexCoord2f(0.5f, 1.0f)); //texturedQuad.setTextureCoordinate(3, new Point2f( 0.0f, 0.5f)); texturedQuad.setTextureCoordinate(0, 3, new TexCoord2f(0.0f, 0.5f)); examples/texture/TexturedLinesApp.java</p><p>Replaced the deprecated method setTextureCoordinate(int, Point2f) with setTextureCoordinate(int, int, TexCoord2f). See code changes below:</p><p>/* Replace the deprecated method setTextureCoordinate(int, Point2f) with setTextureCoordinate(int, int, TexCoord2f) */</p><p>//twistStrip.setTextureCoordinate(v, TC1); twistStrip.setTextureCoordinate(0, v, TC1); //twistStrip.setTextureCoordinate(v+1, TC2); twistStrip.setTextureCoordinate(0, v+1, TC2); examples/texture/TexturedPlane.java</p><p>Same changes as MIPmapApp.java examples/texture/TexturedSceneApp.java</p><p>Same changes as MIPmapApp.java examples/texture/TextureRequestApp.java</p><p>Same changes as TextCoordApp.java</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us