Examples of writeNode()


Examples of com.eteks.sweethome3d.j3d.OBJWriter.writeNode()

    // 1. Open the OBJ file "Test.obj"
    OBJWriter writer = new OBJWriter("Test@#.obj", "Test", 3);
    assertTrue("Test@#.obj not created", new File("Test@#.obj").exists());
   
    // 2. Write a box at center
    writer.writeNode(new Box());
   
    // Write a sphere centered at (2, 0, 2)
    Transform3D translation = new Transform3D();
    translation.setTranslation(new Vector3f(2f, 0, 2f));
    TransformGroup translationGroup = new TransformGroup(translation);
View Full Code Here

Examples of com.eteks.sweethome3d.j3d.OBJWriter.writeNode()

    Transform3D translation = new Transform3D();
    translation.setTranslation(new Vector3f(2f, 0, 2f));
    TransformGroup translationGroup = new TransformGroup(translation);
   
    translationGroup.addChild(new Sphere());
    writer.writeNode(translationGroup);
   
    // 3. Close file
    writer.close();
    assertTrue("Test@#.mtl not created", new File("Test@#.mtl").exists());
   
View Full Code Here

Examples of com.eteks.sweethome3d.j3d.OBJWriter.writeNode()

          // Create a not alive new ground to be able to explore its coordinates without setting capabilities
          Rectangle2D homeBounds = getExportedHomeBounds(home);
          Ground3D groundNode = new Ground3D(home,
              (float)homeBounds.getX(), (float)homeBounds.getY(),
              (float)homeBounds.getWidth(), (float)homeBounds.getHeight(), true);
          writer.writeNode(groundNode, "ground");
        }
       
        // Write 3D walls
        int i = 0;
        for (Wall wall : home.getWalls()) {
View Full Code Here

Examples of com.eteks.sweethome3d.j3d.OBJWriter.writeNode()

        // Write 3D walls
        int i = 0;
        for (Wall wall : home.getWalls()) {
          // Create a not alive new wall to be able to explore its coordinates without setting capabilities
          Wall3D wallNode = new Wall3D(wall, home, true, true);
          writer.writeNode(wallNode, "wall_" + ++i);
        }
        // Write 3D furniture
        i = 0;
        for (HomePieceOfFurniture piece : home.getFurniture()) {
          if (piece.isVisible()) {
View Full Code Here

Examples of com.eteks.sweethome3d.j3d.OBJWriter.writeNode()

        i = 0;
        for (HomePieceOfFurniture piece : home.getFurniture()) {
          if (piece.isVisible()) {
            // Create a not alive new piece to be able to explore its coordinates without setting capabilities
            HomePieceOfFurniture3D pieceNode = new HomePieceOfFurniture3D(piece, home, true, true);
            writer.writeNode(pieceNode);
          }
        }
        // Write 3D rooms
        i = 0;
        for (Room room : home.getRooms()) {
View Full Code Here

Examples of com.eteks.sweethome3d.j3d.OBJWriter.writeNode()

        // Write 3D rooms
        i = 0;
        for (Room room : home.getRooms()) {
          // Create a not alive new room to be able to explore its coordinates without setting capabilities
          Room3D roomNode = new Room3D(room, home, false, true, true);
          writer.writeNode(roomNode, "room_" + ++i);
        }
      } catch (InterruptedIOException ex) {
        exportInterrupted = true;
        throw new InterruptedRecorderException("Export to " + objFile + " interrupted");
      } catch (IOException ex) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode()

    public MemoryJournal(SegmentStore store, NodeState head) {
        this.store = checkNotNull(store);
        this.parent = null;

        SegmentWriter writer = store.getWriter();
        RecordId id = writer.writeNode(head).getRecordId();
        writer.flush();

        this.base = id;
        this.head = id;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode()

                NodeBuilder builder =
                        new SegmentNodeState(segment, newBase).builder();
                after.compareAgainstBaseState(before, new MergeDiff(builder));
                NodeState state = builder.getNodeState();

                RecordId newHead = writer.writeNode(state).getRecordId();

                base = newBase;
                head = newHead;
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode()

        DBObject id = new BasicDBObject("_id", "root");
        state = journals.findOne(id, null, primaryPreferred());
        if (state == null) {
            SegmentWriter writer = store.getWriter();
            RecordId headId = writer.writeNode(head).getRecordId();
            writer.flush();
            state = new BasicDBObject(of(
                    "_id""root",
                    "head", headId.toString()));
            try {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode()

                RecordId newBase = parent.getHead();
                NodeBuilder builder =
                        new SegmentNodeState(segment, newBase).builder();
                after.compareAgainstBaseState(before, new MergeDiff(builder));
                RecordId newHead =
                        writer.writeNode(builder.getNodeState()).getRecordId();

                base = newBase;
                head = newHead;
            }
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.