Package com.sun.j3d.loaders.objectfile

Examples of com.sun.j3d.loaders.objectfile.ObjectFile.load()


      (float)(creaseAngle * Math.PI / 180.0));
    Scene s = null;
    try {
      filename=fixFileName(filename);
      if(filename.startsWith("http://"))
        s=f.load(new java.net.URL(filename));
      else
        s = f.load(filename);
    }
    catch (Exception e) {
      Prolog3D.pp(e);
View Full Code Here


    try {
      filename=fixFileName(filename);
      if(filename.startsWith("http://"))
        s=f.load(new java.net.URL(filename));
      else
        s = f.load(filename);
    }
    catch (Exception e) {
      Prolog3D.pp(e);
      return null;
    }
View Full Code Here

    ObjectFile f = new ObjectFile(ObjectFile.RESIZE);
    Scene s = null;

    try
    {
      s = f.load("./eas/miscellaneous/java3D/schiff.obj");
    }
    catch (Exception e)
    {
      System.out.println("File loading failed:" + e);
    }
View Full Code Here

        // Load an obj-file.
        ObjectFile f = new ObjectFile(ObjectFile.RESIZE);
        Scene s = null;

        try {
            s = f.load("./eas/miscellaneous/java3D/schiff.obj");
        } catch (Exception e) {
            System.out.println("File loading failed:" + e);
        }

        // Generate a transformation group for the loaded object.
View Full Code Here

        int params = 0;
        if (resize) params = ObjectFile.RESIZE | Loader.LOAD_ALL;
       
        ObjectFile loader = new ObjectFile(params);
        try {
            BranchGroup bg = loader.load(filename).getSceneGroup();
            bg.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
            bg.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
            bg.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
            bg.setCapability(BranchGroup.ALLOW_DETACH);
View Full Code Here

        int params = 0;
        if (resize) params = ObjectFile.RESIZE | Loader.LOAD_ALL;
       
        ObjectFile loader = new ObjectFile(params);
        try {
            BranchGroup bg = loader.load(filename).getSceneGroup();
            bg.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
            bg.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
            bg.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
            bg.setCapability(BranchGroup.ALLOW_DETACH);
View Full Code Here

      shape[i] = null;
  }

  for(int i=0; i<3;i++) {
      try {
    s[i] = loader.load(objFiles[i]);
      }
      catch (FileNotFoundException e) {
        System.err.println(e);
        System.exit(1);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.