Class Cylinder

All Implemented Interfaces:
Styleable, EventTarget

public non-sealed class Cylinder extends Shape3D
The Cylinder class defines a 3 dimensional cylinder with the specified size. A Cylinder is a 3D geometry primitive created with a given radius and height. It is centered at the origin.
Since:
JavaFX 8.0
  • Property Details

  • Constructor Details

    • Cylinder

      public Cylinder()
      Creates a new instance of Cylinder of radius of 1.0 and height of 2.0. Resolution defaults to 15 divisions along X and Z axis.
    • Cylinder

      public Cylinder(double radius, double height)
      Creates a new instance of Cylinder of a given radius and height. Resolution defaults to 15 divisions along X and Z axis.
      Parameters:
      radius - Radius
      height - Height
    • Cylinder

      public Cylinder(double radius, double height, int divisions)
      Creates a new instance of Cylinder of a given radius, height, and divisions. Resolution defaults to 15 divisions along X and Z axis. Note that divisions should be at least 3. Any value less than that will be clamped to 3.
      Parameters:
      radius - Radius
      height - Height
      divisions - Divisions
  • Method Details

    • setHeight

      public final void setHeight(double value)
      Sets the value of the height property.
      Property description:
      Defines the height or the Y dimension of the Cylinder.
      Default value:
      2.0
      Parameters:
      value - the value for the height property
      See Also:
    • getHeight

      public final double getHeight()
      Gets the value of the height property.
      Property description:
      Defines the height or the Y dimension of the Cylinder.
      Default value:
      2.0
      Returns:
      the value of the height property
      See Also:
    • heightProperty

      public final DoubleProperty heightProperty()
      Defines the height or the Y dimension of the Cylinder.
      Default value:
      2.0
      Returns:
      the height property
      See Also:
    • setRadius

      public final void setRadius(double value)
      Sets the value of the radius property.
      Property description:
      Defines the radius in the Z plane of the Cylinder.
      Default value:
      1.0
      Parameters:
      value - the value for the radius property
      See Also:
    • getRadius

      public final double getRadius()
      Gets the value of the radius property.
      Property description:
      Defines the radius in the Z plane of the Cylinder.
      Default value:
      1.0
      Returns:
      the value of the radius property
      See Also:
    • radiusProperty

      public final DoubleProperty radiusProperty()
      Defines the radius in the Z plane of the Cylinder.
      Default value:
      1.0
      Returns:
      the radius property
      See Also:
    • getDivisions

      public int getDivisions()
      Retrieves the divisions attribute use to generate this cylinder.
      Returns:
      the divisions attribute.