< prev index next >

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

Print this page

        

*** 64,73 **** --- 64,89 ---- @Override public void doUpdatePeer(Node node) { ((Cylinder) node).doUpdatePeer(); } + @Override + public BaseBounds doComputeGeomBounds(Node node, + BaseBounds bounds, BaseTransform tx) { + return ((Cylinder) node).doComputeGeomBounds(bounds, tx); + } + + @Override + public boolean doComputeContains(Node node, double localX, double localY) { + return ((Cylinder) node).doComputeContains(localX, localY); + } + + @Override + public boolean doComputeIntersects(Node node, PickRay pickRay, + PickResultChooser pickResult) { + return ((Cylinder) node).doComputeIntersects(pickRay, pickResult); + } }); } static final int DEFAULT_DIVISIONS = 64; static final double DEFAULT_RADIUS = 1; static final double DEFAULT_HEIGHT = 2;
*** 136,146 **** @Override public void invalidated() { NodeHelper.markDirty(Cylinder.this, DirtyBits.MESH_GEOM); manager.invalidateCylinderMesh(key); key = 0; ! impl_geomChanged(); } }; } return height; } --- 152,162 ---- @Override public void invalidated() { NodeHelper.markDirty(Cylinder.this, DirtyBits.MESH_GEOM); manager.invalidateCylinderMesh(key); key = 0; ! NodeHelper.geomChanged(Cylinder.this); } }; } return height; }
*** 166,176 **** @Override public void invalidated() { NodeHelper.markDirty(Cylinder.this, DirtyBits.MESH_GEOM); manager.invalidateCylinderMesh(key); key = 0; ! impl_geomChanged(); } }; } return radius; } --- 182,192 ---- @Override public void invalidated() { NodeHelper.markDirty(Cylinder.this, DirtyBits.MESH_GEOM); manager.invalidateCylinderMesh(key); key = 0; ! NodeHelper.geomChanged(Cylinder.this); } }; } return radius; }
*** 210,226 **** */ private NGNode doCreatePeer() { return new NGCylinder(); } ! /** ! * @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 h = (float) getHeight(); final float r = (float) getRadius(); if (r < 0 || h < 0) { return bounds.makeEmpty(); --- 226,239 ---- */ private NGNode doCreatePeer() { return new NGCylinder(); } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) { final float h = (float) getHeight(); final float r = (float) getRadius(); if (r < 0 || h < 0) { return bounds.makeEmpty();
*** 231,260 **** bounds = bounds.deriveWithNewBounds(-r, -hh, -r, r, hh, r); 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 = getRadius(); double hh = getHeight()*.5f; return -w <= localX && localX <= w && -hh <= localY && localY <= hh; } ! /** ! * @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 boolean exactPicking = divisions < DEFAULT_DIVISIONS && mesh != null; final double r = getRadius(); final Vec3d dir = pickRay.getDirectionNoClone(); --- 244,267 ---- bounds = bounds.deriveWithNewBounds(-r, -hh, -r, r, hh, r); 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 = getRadius(); double hh = getHeight()*.5f; return -w <= localX && localX <= w && -hh <= localY && localY <= hh; } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private boolean doComputeIntersects(PickRay pickRay, PickResultChooser pickResult) { final boolean exactPicking = divisions < DEFAULT_DIVISIONS && mesh != null; final double r = getRadius(); final Vec3d dir = pickRay.getDirectionNoClone();
< prev index next >