< prev index next >

modules/javafx.graphics/src/main/java/javafx/scene/shape/Box.java

Print this page




  68             public BaseBounds doComputeGeomBounds(Node node,
  69                     BaseBounds bounds, BaseTransform tx) {
  70                 return ((Box) node).doComputeGeomBounds(bounds, tx);
  71             }
  72 
  73             @Override
  74             public boolean doComputeContains(Node node, double localX, double localY) {
  75                 return ((Box) node).doComputeContains(localX, localY);
  76             }
  77 
  78             @Override
  79             public boolean doComputeIntersects(Node node, PickRay pickRay,
  80                     PickResultChooser pickResult) {
  81                 return ((Box) node).doComputeIntersects(pickRay, pickResult);
  82             }
  83         });
  84     }
  85 
  86     private TriangleMesh mesh;
  87 
  88     /**
  89      * Creates a new instance of {@code Box} of dimension 2 by 2 by 2.
  90      */
  91 
  92     public static final double DEFAULT_SIZE = 2;
  93 
  94     {
  95         // To initialize the class helper at the beginning of each constructor of this class
  96         BoxHelper.initHelper(this);
  97     }
  98 



  99     public Box() {
 100         this(DEFAULT_SIZE, DEFAULT_SIZE, DEFAULT_SIZE);
 101     }
 102 
 103     /**
 104      * Creates a new instance of {@code Box} of dimension width by height
 105      * by depth.
 106      * @param width the width of this box
 107      * @param height the height of this box
 108      * @param depth the depth of this box
 109      */
 110     public Box(double width, double height, double depth) {
 111         setWidth(width);
 112         setHeight(height);
 113         setDepth(depth);
 114     }
 115 
 116     /**
 117      * Defines the depth or the Z dimension of the Box.
 118      *




  68             public BaseBounds doComputeGeomBounds(Node node,
  69                     BaseBounds bounds, BaseTransform tx) {
  70                 return ((Box) node).doComputeGeomBounds(bounds, tx);
  71             }
  72 
  73             @Override
  74             public boolean doComputeContains(Node node, double localX, double localY) {
  75                 return ((Box) node).doComputeContains(localX, localY);
  76             }
  77 
  78             @Override
  79             public boolean doComputeIntersects(Node node, PickRay pickRay,
  80                     PickResultChooser pickResult) {
  81                 return ((Box) node).doComputeIntersects(pickRay, pickResult);
  82             }
  83         });
  84     }
  85 
  86     private TriangleMesh mesh;
  87 




  88     public static final double DEFAULT_SIZE = 2;
  89 
  90     {
  91         // To initialize the class helper at the beginning of each constructor of this class
  92         BoxHelper.initHelper(this);
  93     }
  94 
  95     /**
  96      * Creates a new instance of {@code Box} of dimension 2 by 2 by 2.
  97      */
  98     public Box() {
  99         this(DEFAULT_SIZE, DEFAULT_SIZE, DEFAULT_SIZE);
 100     }
 101 
 102     /**
 103      * Creates a new instance of {@code Box} of dimension width by height
 104      * by depth.
 105      * @param width the width of this box
 106      * @param height the height of this box
 107      * @param depth the depth of this box
 108      */
 109     public Box(double width, double height, double depth) {
 110         setWidth(width);
 111         setHeight(height);
 112         setDepth(depth);
 113     }
 114 
 115     /**
 116      * Defines the depth or the Z dimension of the Box.
 117      *


< prev index next >