Top Description Inners Fields Constructors Methods
javafx.scene.shape

public abstract sealed Class Shape3D

extends Node
permits Box, Cylinder, MeshView, Sphere
Class Inheritance
Known Direct Subclasses
javafx.scene.shape.Sphere, javafx.scene.shape.MeshView, javafx.scene.shape.Box, javafx.scene.shape.Cylinder
Imports
com.sun.javafx.geom.BaseBounds, .BoxBounds, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.scene.DirtyBits, .NodeHelper, com.sun.javafx.scene.paint.MaterialHelper, com.sun.javafx.scene.shape.Shape3DHelper, com.sun.javafx.sg.prism.NGShape3D, javafx.application.ConditionalFeature, .Platform, javafx.beans.property.ObjectProperty, .SimpleObjectProperty, javafx.beans.value.ChangeListener, .WeakChangeListener, javafx.scene.Node, javafx.scene.paint.Material, .PhongMaterial, com.sun.javafx.logging.PlatformLogger

The Shape3D base class provides definitions of common properties for objects that represent some form of 3D geometric shape. These properties include: Note that this is a conditional feature. See ConditionalFeature.SCENE3D for more information.
Since
JavaFX 8.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
Shape3D.Key

Used by the caching mechanism to compare between instances of the same shape.

Field Summary

Modifier and TypeField and Description
private ObjectProperty<CullFace>
cullFace

Defines the cullFace this Shape3D.

private static final PhongMaterial
private ObjectProperty<DrawMode>
drawMode

Defines the draw mode used to render this Shape3D.

pack-priv Shape3D.Key
pack-priv PredefinedMeshManager
private ObjectProperty<Material>
material

Defines the material this Shape3D.

Inherited from javafx.scene.Node:
BASELINE_OFFSET_SAME_AS_HEIGHT

Constructor Summary

AccessConstructor and Description
protected
Shape3D()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<CullFace>
private boolean
doComputeContains(double localX, double localY)

private BaseBounds
private void
public final ObjectProperty<DrawMode>
public final CullFace
public final DrawMode
public final Material
public final ObjectProperty<Material>
public final void
public final void
public final void
Inherited from javafx.scene.Node:
accessibleHelpPropertyaccessibleRoleDescriptionPropertyaccessibleRolePropertyaccessibleTextPropertyaddEventFilteraddEventHandlerapplyCssautosizeblendModePropertyboundsInLocalPropertyboundsInParentPropertybuildEventDispatchChaincacheHintPropertycachePropertyclipPropertycomputeAreaInScreencontainscontainscursorPropertydepthTestPropertydisabledPropertydisablePropertyeffectiveNodeOrientationPropertyeffectPropertyeventDispatcherPropertyexecuteAccessibleActionfireEventfocusedPropertyfocusTraversablePropertyfocusVisiblePropertyfocusWithinPropertygetAccessibleHelpgetAccessibleRolegetAccessibleRoleDescriptiongetAccessibleTextgetBaselineOffsetgetBlendModegetBoundsInLocalgetBoundsInParentgetCacheHintgetClassCssMetaDatagetClipgetContentBiasgetCssMetaDatagetCursorgetDepthTestgetEffectgetEffectiveNodeOrientationgetEventDispatchergetIdgetInitialCursorgetInitialFocusTraversablegetInputMethodRequestsgetLayoutBoundsgetLayoutXgetLayoutYgetLocalToParentTransformgetLocalToSceneTransformgetNodeOrientationgetOnContextMenuRequestedgetOnDragDetectedgetOnDragDonegetOnDragDroppedgetOnDragEnteredgetOnDragExitedgetOnDragOvergetOnInputMethodTextChangedgetOnKeyPressedgetOnKeyReleasedgetOnKeyTypedgetOnMouseClickedgetOnMouseDragEnteredgetOnMouseDragExitedgetOnMouseDraggedgetOnMouseDragOvergetOnMouseDragReleasedgetOnMouseEnteredgetOnMouseExitedgetOnMouseMovedgetOnMousePressedgetOnMouseReleasedgetOnRotategetOnRotationFinishedgetOnRotationStartedgetOnScrollgetOnScrollFinishedgetOnScrollStartedgetOnSwipeDowngetOnSwipeLeftgetOnSwipeRightgetOnSwipeUpgetOnTouchMovedgetOnTouchPressedgetOnTouchReleasedgetOnTouchStationarygetOnZoomgetOnZoomFinishedgetOnZoomStartedgetOpacitygetParentgetPropertiesgetPseudoClassStatesgetRotategetRotationAxisgetScaleXgetScaleYgetScaleZgetScenegetStylegetStyleableParentgetStyleClassgetTransformsgetTranslateXgetTranslateYgetTranslateZgetTypeSelectorgetUserDatagetViewOrderhasPropertieshoverPropertyidPropertyinputMethodRequestsPropertyintersectsintersectsisCacheisDisableisDisabledisFocusedisFocusTraversableisFocusVisibleisFocusWithinisHoverisManagedisMouseTransparentisPickOnBoundsisPressedisResizableisVisiblelayoutBoundsPropertylayoutXPropertylayoutYPropertylocalToParentlocalToParentlocalToParentlocalToParentlocalToParentlocalToParentTransformPropertylocalToScenelocalToScenelocalToScenelocalToScenelocalToScenelocalToScenelocalToScenelocalToScenelocalToScenelocalToScenelocalToSceneTransformPropertylocalToScreenlocalToScreenlocalToScreenlocalToScreenlocalToScreenlookuplookupAllmanagedPropertymaxHeightmaxWidthminHeightminWidthmouseTransparentPropertynodeOrientationPropertynotifyAccessibleAttributeChangedonContextMenuRequestedPropertyonDragDetectedPropertyonDragDonePropertyonDragDroppedPropertyonDragEnteredPropertyonDragExitedPropertyonDragOverPropertyonInputMethodTextChangedPropertyonKeyPressedPropertyonKeyReleasedPropertyonKeyTypedPropertyonMouseClickedPropertyonMouseDragEnteredPropertyonMouseDragExitedPropertyonMouseDraggedPropertyonMouseDragOverPropertyonMouseDragReleasedPropertyonMouseEnteredPropertyonMouseExitedPropertyonMouseMovedPropertyonMousePressedPropertyonMouseReleasedPropertyonRotatePropertyonRotationFinishedPropertyonRotationStartedPropertyonScrollFinishedPropertyonScrollPropertyonScrollStartedPropertyonSwipeDownPropertyonSwipeLeftPropertyonSwipeRightPropertyonSwipeUpPropertyonTouchMovedPropertyonTouchPressedPropertyonTouchReleasedPropertyonTouchStationaryPropertyonZoomFinishedPropertyonZoomPropertyonZoomStartedPropertyopacityPropertyparentPropertyparentToLocalparentToLocalparentToLocalparentToLocalparentToLocalpickOnBoundsPropertyprefHeightprefWidthpressedPropertypseudoClassStateChangedqueryAccessibleAttributerelocateremoveEventFilterremoveEventHandlerrequestFocusrequestFocusTraversalresizeresizeRelocaterotatePropertyrotationAxisPropertyscaleXPropertyscaleYPropertyscaleZPropertyscenePropertysceneToLocalsceneToLocalsceneToLocalsceneToLocalsceneToLocalsceneToLocalsceneToLocalsceneToLocalscreenToLocalscreenToLocalscreenToLocalsetAccessibleHelpsetAccessibleRolesetAccessibleRoleDescriptionsetAccessibleTextsetBlendModesetCachesetCacheHintsetClipsetCursorsetDepthTestsetDisablesetDisabledsetEffectsetEventDispatchersetEventHandlersetFocusedsetFocusTraversablesetHoversetIdsetInputMethodRequestssetLayoutXsetLayoutYsetManagedsetMouseTransparentsetNodeOrientationsetOnContextMenuRequestedsetOnDragDetectedsetOnDragDonesetOnDragDroppedsetOnDragEnteredsetOnDragExitedsetOnDragOversetOnInputMethodTextChangedsetOnKeyPressedsetOnKeyReleasedsetOnKeyTypedsetOnMouseClickedsetOnMouseDragEnteredsetOnMouseDragExitedsetOnMouseDraggedsetOnMouseDragOversetOnMouseDragReleasedsetOnMouseEnteredsetOnMouseExitedsetOnMouseMovedsetOnMousePressedsetOnMouseReleasedsetOnRotatesetOnRotationFinishedsetOnRotationStartedsetOnScrollsetOnScrollFinishedsetOnScrollStartedsetOnSwipeDownsetOnSwipeLeftsetOnSwipeRightsetOnSwipeUpsetOnTouchMovedsetOnTouchPressedsetOnTouchReleasedsetOnTouchStationarysetOnZoomsetOnZoomFinishedsetOnZoomStartedsetOpacitysetPickOnBoundssetPressedsetRotatesetRotationAxissetScaleXsetScaleYsetScaleZsetStylesetTranslateXsetTranslateYsetTranslateZsetUserDatasetViewOrdersetVisiblesnapshotsnapshotstartDragAndDropstartFullDragstylePropertytoBacktoFronttoStringtranslateXPropertytranslateYPropertytranslateZPropertyusesMirroringviewOrderPropertyvisibleProperty

Field Detail

cullFaceback to summary
private ObjectProperty<CullFace> cullFace

Defines the cullFace this Shape3D.

Default Value
CullFace.BACK
DEFAULT_MATERIALback to summary
private static final PhongMaterial DEFAULT_MATERIAL
drawModeback to summary
private ObjectProperty<DrawMode> drawMode

Defines the draw mode used to render this Shape3D. DrawMode#LINE is not available on embedded platforms. If drawMode is set to DrawMode#LINE on an embedded platform the default value of DrawMode#FILL will be used instead.

Default Value
DrawMode#FILL
keyback to summary
pack-priv Shape3D.Key key
managerback to summary
pack-priv PredefinedMeshManager manager
materialback to summary
private ObjectProperty<Material> material

Defines the material this Shape3D. The default material is null. If Material is null, a PhongMaterial with a diffuse color of Color.LIGHTGRAY is used for rendering.

Default Value
null

Constructor Detail

Shape3Dback to summary
protected Shape3D()

Constructor for subclasses to call.

Method Detail

cullFacePropertyback to summary
public final ObjectProperty<CullFace> cullFaceProperty()
doComputeContainsback to summary
private boolean doComputeContains(double localX, double localY)
doComputeGeomBoundsback to summary
private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx)
doUpdatePeerback to summary
private void doUpdatePeer()

Hides javafx.scene.Node.doUpdatePeer.

drawModePropertyback to summary
public final ObjectProperty<DrawMode> drawModeProperty()
getCullFaceback to summary
public final CullFace getCullFace()
getDrawModeback to summary
public final DrawMode getDrawMode()
getMaterialback to summary
public final Material getMaterial()
materialPropertyback to summary
public final ObjectProperty<Material> materialProperty()
setCullFaceback to summary
public final void setCullFace(CullFace value)
setDrawModeback to summary
public final void setDrawMode(DrawMode value)
setMaterialback to summary
public final void setMaterial(Material value)
javafx.scene.shape back to summary

pack-priv abstract Class Shape3D.Key

extends Object
Class Inheritance
Known Direct Subclasses
javafx.scene.shape.Sphere.SphereKey, javafx.scene.shape.Box.BoxKey, javafx.scene.shape.Cylinder.CylinderKey

Used by the caching mechanism to compare between instances of the same shape. Each shape implements equals and hashCode using its base parameters.

Constructor Summary

AccessConstructor and Description
pack-priv
Key()

Method Summary

Modifier and TypeMethod and Description
public abstract boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public abstract int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Keyback to summary
pack-priv Key()

Method Detail

equalsback to summary
public abstract boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
hashCodeback to summary
public abstract int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override