< prev index next >

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

Print this page

        

*** 61,70 **** --- 61,87 ---- @Override public void doUpdatePeer(Node node) { ((Box) node).doUpdatePeer(); } + + @Override + public BaseBounds doComputeGeomBounds(Node node, + BaseBounds bounds, BaseTransform tx) { + return ((Box) node).doComputeGeomBounds(bounds, tx); + } + + @Override + public boolean doComputeContains(Node node, double localX, double localY) { + return ((Box) node).doComputeContains(localX, localY); + } + + @Override + public boolean doComputeIntersects(Node node, PickRay pickRay, + PickResultChooser pickResult) { + return ((Box) node).doComputeIntersects(pickRay, pickResult); + } }); } private TriangleMesh mesh;
*** 114,124 **** @Override public void invalidated() { NodeHelper.markDirty(Box.this, DirtyBits.MESH_GEOM); manager.invalidateBoxMesh(key); key = 0; ! impl_geomChanged(); } }; } return depth; } --- 131,141 ---- @Override public void invalidated() { NodeHelper.markDirty(Box.this, DirtyBits.MESH_GEOM); manager.invalidateBoxMesh(key); key = 0; ! NodeHelper.geomChanged(Box.this); } }; } return depth; }
*** 144,154 **** @Override public void invalidated() { NodeHelper.markDirty(Box.this, DirtyBits.MESH_GEOM); manager.invalidateBoxMesh(key); key = 0; ! impl_geomChanged(); } }; } return height; } --- 161,171 ---- @Override public void invalidated() { NodeHelper.markDirty(Box.this, DirtyBits.MESH_GEOM); manager.invalidateBoxMesh(key); key = 0; ! NodeHelper.geomChanged(Box.this); } }; } return height; }
*** 174,184 **** @Override public void invalidated() { NodeHelper.markDirty(Box.this, DirtyBits.MESH_GEOM); manager.invalidateBoxMesh(key); key = 0; ! impl_geomChanged(); } }; } return width; } --- 191,201 ---- @Override public void invalidated() { NodeHelper.markDirty(Box.this, DirtyBits.MESH_GEOM); manager.invalidateBoxMesh(key); key = 0; ! NodeHelper.geomChanged(Box.this); } }; } return width; }
*** 210,226 **** peer.updateMesh(mesh.getPGTriangleMesh()); } } } ! /** ! * @treatAsPrivate implementation detail ! * @deprecated This is an internal API that is not intended for use and will be removed in the next version */ ! @Deprecated ! @Override ! public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) { final float w = (float) getWidth(); final float h = (float) getHeight(); final float d = (float) getDepth(); if (w < 0 || h < 0 || d < 0) { --- 227,240 ---- peer.updateMesh(mesh.getPGTriangleMesh()); } } } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) { final float w = (float) getWidth(); final float h = (float) getHeight(); final float d = (float) getDepth(); if (w < 0 || h < 0 || d < 0) {
*** 234,263 **** bounds = bounds.deriveWithNewBounds(-hw, -hh, -hd, hw, hh, hd); bounds = tx.transform(bounds, bounds); return bounds; } ! /** ! * @treatAsPrivate implementation detail ! * @deprecated This is an internal API that is not intended for use and will be removed in the next version */ ! @Deprecated ! @Override ! protected boolean impl_computeContains(double localX, double localY) { double w = getWidth(); double h = getHeight(); return -w <= localX && localX <= w && -h <= localY && localY <= h; } ! /** ! * @treatAsPrivate implementation detail ! * @deprecated This is an internal API that is not intended for use and will be removed in the next version */ ! @Deprecated ! @Override ! protected boolean impl_computeIntersects(PickRay pickRay, PickResultChooser pickResult) { final double w = getWidth(); final double h = getHeight(); final double d = getDepth(); final double hWidth = w / 2.0; --- 248,271 ---- bounds = bounds.deriveWithNewBounds(-hw, -hh, -hd, hw, hh, hd); bounds = tx.transform(bounds, bounds); return bounds; } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private boolean doComputeContains(double localX, double localY) { double w = getWidth(); double h = getHeight(); return -w <= localX && localX <= w && -h <= localY && localY <= h; } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private boolean doComputeIntersects(PickRay pickRay, PickResultChooser pickResult) { final double w = getWidth(); final double h = getHeight(); final double d = getDepth(); final double hWidth = w / 2.0;
< prev index next >