Examples of Scene


Examples of ca.eandb.jmist.framework.Scene

  protected final ScatteringNode trace(ScatteredRay sr, double ru, double rv, double rj) {
    if (sr == null) {
      return null;
    }
    Scene scene = pathInfo.getScene();
    Ray3 ray = sr.getRay();
    SceneElement root = scene.getRoot();
    Intersection x = NearestIntersectionRecorder
        .computeNearestIntersection(ray, root);
    if (x != null) {
      ShadingContext context = new MinimalShadingContext(Random.DEFAULT);
      x.prepareShadingContext(context);
View Full Code Here

Examples of com.barrybecker4.puzzle.adventure.Scene

     * add a row based on a player object
     * @param scene scene to add
     */
    @Override
    protected void addRow(Object scene) {
        Scene parentScene = (Scene) scene;
        Object d[] = new Object[getNumColumns()];
        d[NAVIGATE_INDEX] = parentScene.getName();
        d[NUM_CHILDREN_INDEX] = parentScene.getChoices().size();
        getParentTableModel().addRow(d);
    }
View Full Code Here

Examples of com.oxidevelopment.bleakengine.scene.Scene

  public static void startGame() {
    initGL();
   
    while (!Display.isCloseRequested()) {
      GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
      Scene scene = SceneManager.getScene();
      scene.update();
      scene.draw();
    }
   
    DisplayManager.destroy();
  }
View Full Code Here

Examples of com.sun.j3d.loaders.Scene

        public void actionPerformed(ActionEvent e) {
            if(handler==null){
                handler=new LoaderHandler();
            }
            if(handler.select()){
                Scene sc=handler.load();
                if(sc!=null){
                    BranchGroup bg=sc.getSceneGroup();
                    if(bg!=null){
                        GroupNode gn=(GroupNode)getNode();
                        gn.addChild(bg);
                        getNode().refresh();
                    }
View Full Code Here

Examples of com.sun.j3d.loaders.Scene

        // Ask loader to ignore lights, fogs...
        loader.setFlags(loader.getFlags()
            & ~(Loader.LOAD_LIGHT_NODES | Loader.LOAD_FOG_NODES
                | Loader.LOAD_BACKGROUND_NODES | Loader.LOAD_VIEW_GROUPS));
        // Return the first scene that can be loaded from model URL content
        Scene scene = loader.load(urlContent.getURL());

        BranchGroup modelNode = scene.getSceneGroup();
        // If model doesn't have any child, consider the file as wrong
        if (modelNode.numChildren() == 0) {
          throw new IllegalArgumentException("Empty model");
        }
       
View Full Code Here

Examples of com.sun.j3d.loaders.Scene

  public static BranchGroup file2bgroup(String filename) {
    if(filename.endsWith(".j3f") || filename.endsWith(".J3F")
    || filename.endsWith(".j3f.gz") || filename.endsWith(".J3F.GZ"))
      return jf2bgroup(filename)
    //else 
    Scene s=file2scene(filename);
    if(null==s) return null;
    BranchGroup b =  s.getSceneGroup();
    Hashtable H=s.getNamedObjects();
    if(null!=H) {
      HashMap HM=new HashMap(H);
      //Prolog3D.pp("names="+HM);
      fixMap(HM);
      b.setUserData(HM);
View Full Code Here

Examples of com.sun.j3d.loaders.Scene

    }
    return null;
  }
 
  private static Scene file2scene(String filename) {
    Scene s=null;
    if(filename.endsWith(".obj") || filename.endsWith(".OBJ")
      || filename.endsWith(".obj.gz") || filename.endsWith(".OBJ.GZ"))
      s=obj2scene(filename);
    else if(filename.endsWith(".wrl") || filename.endsWith(".WRL")
      || filename.endsWith(".wrl.gz") || filename.endsWith(".WRL.GZ"))
View Full Code Here

Examples of com.sun.j3d.loaders.Scene

 
  /**
     Loads a .wrl or .wrl.gz VRML file to a Scene
   */
  public static Scene vrml2scene(String filename) {
    Scene s = null;
    VrmlLoader f = new VrmlLoader();
    try {
      filename=Convert.fixFileName(filename);
      if(filename.startsWith("http://"))
        s=f.load(new java.net.URL(filename));
View Full Code Here

Examples of com.sun.j3d.loaders.Scene

    if (!noStripify) flags |= ObjectFile.STRIPIFY;
     
    ObjectFile f =
      new ObjectFile(flags,
      (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
View Full Code Here

Examples of com.sun.j3d.loaders.Scene



    //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);
    }








    //Choose a part of the object (here: schiffrumpf).
    Hashtable namedObjects = s.getNamedObjects();
    Shape3D partOfTheObject = (Shape3D) namedObjects.get("schiffsrumpf");

    //Generate a copy of the chosen part.
    Shape3D extractedObject = (Shape3D) partOfTheObject.cloneTree();
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.