Examples of Wirebox


Examples of com.jme3.scene.debug.WireBox

      if(s instanceof Geometry){
        Node a = s.getParent();
        if(a==null)return;
        BoundingVolume bound = ((Geometry) s).getModelBound();
        if(bound instanceof BoundingBox) {
          WireBox b = new WireBox(((BoundingBox) bound).getXExtent(), ((BoundingBox) bound).getYExtent(), ((BoundingBox) bound).getZExtent());
          Geometry g = new Geometry(null, b);
          g.setLocalTransform(s.getWorldTransform());
          g.setMaterial(matWireframe);
          bboxes.attachChild(g);
        }
View Full Code Here

Examples of com.jme3.scene.debug.WireBox

        Node a = s.getParent();
        if(a==null)return;
        BoundingVolume bound = ((Geometry) s).getModelBound();
        if(bound instanceof BoundingBox) {
          BoundingBox bb = ((BoundingBox) bound);
          WireBox b = new WireBox(bb.getXExtent(), bb.getYExtent(), bb.getZExtent());
          Geometry g = new Geometry(null, b);
          Transform t = s.getWorldTransform().clone();
//          Vector3f pos = t.getTranslation();
//          pos.addLocal(bb.getCenter());
//          t.setTranslation(pos);
View Full Code Here

Examples of com.jme3.scene.debug.WireBox

      if(s instanceof Geometry){
        Node a = s.getParent();
        if(a==null)return;
        BoundingVolume bound = ((Geometry) s).getModelBound();
        if(bound instanceof BoundingBox) {
          WireBox b = new WireBox(((BoundingBox) bound).getXExtent(), ((BoundingBox) bound).getYExtent(), ((BoundingBox) bound).getZExtent());
          Geometry g = new Geometry(null, b);
          g.setLocalTransform(s.getWorldTransform());
          g.setMaterial(matWireframe);
          bboxes.attachChild(g);
        }
View Full Code Here

Examples of com.jme3.scene.debug.WireBox

      if(s instanceof Geometry){
        Node a = s.getParent();
        if(a==null)return;
        BoundingVolume bound = ((Geometry) s).getModelBound();
        if(bound instanceof BoundingBox) {
        WireBox b = new WireBox(((BoundingBox) bound).getXExtent(), ((BoundingBox) bound).getYExtent(), ((BoundingBox) bound).getZExtent());
        Geometry g = new Geometry(null, b);
        g.setLocalTransform(s.getWorldTransform());
        g.setMaterial(matWireframe);
        bboxes.attachChild(g);
        }
View Full Code Here

Examples of com.jme3.scene.debug.WireBox

    /**
     * used by attachBoundChildren()
     */
    private void attachBoundingBox(BoundingBox bb, Node parent) {
        WireBox wb = new WireBox(bb.getXExtent(), bb.getYExtent(), bb.getZExtent());
        Geometry g = new Geometry();
        g.setMesh(wb);
        g.setLocalTranslation(bb.getCenter());
        parent.attachChild(g);
    }
View Full Code Here

Examples of org.zkoss.zkex.wire.Wirebox

    if (comp == null)
      throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, request);
    final Map data = request.getData();

    String drawmethod = (String) data.get("drawmethod");
    Wirebox inbox = (Wirebox) request.getDesktop().getComponentByUuidIfAny((String) data.get("inbox"));
    Wirebox outbox = (Wirebox) request.getDesktop().getComponentByUuidIfAny((String) data.get("outbox"));
    if (inbox == null || outbox == null || !data.containsKey("joint"))
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { data, request });

    Wire wire = new Wire();
    wire.setIn(inbox);
    wire.setOut(outbox);
    wire.setConfig("drawingMethod="+drawmethod);
    wire.setJoint((String) data.get("joint"));
    wire.setParent(outbox.getParent());

    return new WireEvent(request.getCommand(), outbox, wire, null);
  }
View Full Code Here

Examples of org.zkoss.zkex.wire.Wirebox

    final Component comp = request.getComponent();
    if (comp == null)
      throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, request);
    final Map data = request.getData();

    Wirebox targetbox = (Wirebox) request.getDesktop().getComponentByUuidIfAny((String) data.get("boxid"));

    if (targetbox == null  && !data.containsKey("joint"))
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { data, request });


    String joint = (String) data.get("joint");

    ArrayList list = targetbox.getAvailableWires(joint);
    Wire unwiredWire = (Wire) list.get(0);
    if(unwiredWire == null )
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { data, request });
    unwiredWire.setParent(null);
    return new WireEvent(request.getCommand(), unwiredWire.getOut(), unwiredWire, null);
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.