---
Product: Aspose.3D
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/3d/java/Cylinder
---

# Cylinder

## Overview

`Cylinder` is a class in Aspose.3D FOSS for Java.
Inherits from: `Geometry`, `IMeshConvertible`.

Parameterized Cylinder.

This class provides 66 methods for working with Cylinder objects in Java programs.
Available methods include: `A3DObject`, `Cylinder`, `Entity`, `Geometry`, `SceneObject`, `addDeformer`, `addElement`, `createElement`, `createElementUV`, `findProperty`, `getBoundingBox`, `getCastShadows`, and 50 additional methods.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: `boundingBox`, `castShadows`, `controlPoints`, `deformers`, `deformers2`, `excluded`, and 21 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `offsetBottom` | `Vector3` | Read | Gets or sets the vertices transformation offset of the bottom side. |
| `offsetTop` | `Vector3` | Read | Gets or sets the vertices transformation offset of the top side. |
| `generateFanCylinder` | `boolean` | Read | Gets or sets whether to generate fan-style cylinder when ThetaLength is less than 2*PI. |
| `shearBottom` | `Vector2` | Read | Gets or sets shear transform of the bottom side. |
| `shearTop` | `Vector2` | Read | Gets or sets shear transform of the top side. |
| `radiusTop` | `double` | Read | Gets or sets radius of cylinder's top cap. |
| `radiusBottom` | `double` | Read | Gets or sets radius of cylinder's bottom cap. |
| `height` | `double` | Read | Gets or sets height of the cylinder. |
| `radialSegments` | `int` | Read | Gets or sets radial segments. |
| `heightSegments` | `int` | Read | Gets or sets height segments. |
| `openEnded` | `boolean` | Read | Gets or sets a value indicating whether this cylinder is open ended. |
| `thetaStart` | `double` | Read | Gets or sets theta start. |
| `thetaLength` | `double` | Read | Gets or sets length of theta. |
| `visible` | `boolean` | Read | Gets the visible. |
| `castShadows` | `boolean` | Read | Gets the cast shadows. |
| `receiveShadows` | `boolean` | Read | Gets the receive shadows. |
| `controlPoints` | `java.util.List` | Read | Gets the control points. |
| `vertexElements` | `java.util.List` | Read | Gets the vertex elements. |
| `deformers` | `java.util.List` | Read | Gets the deformers. |
| `deformers2` | `java.util.Collection` | Read | Gets the deformers2. |
| `parentNode` | `Node` | Read | Gets the parent node. |
| `parentNodes` | `ArrayList` | Read | Gets the parent nodes. |
| `excluded` | `boolean` | Read | Gets the excluded. |
| `boundingBox` | `BoundingBox` | Read | Gets the bounding box. |
| `scene` | `Scene` | Read | Gets the scene. |
| `name` | `String` | Read | Gets the name. |
| `properties` | `PropertyCollection` | Read | Gets the properties. |

## Methods

| Signature | Description |
|-----------|-------------|
| `Cylinder()` | Initializes a new instance of Cylinder class. |
| `Cylinder(radius: double, height: double)` | Initializes a new instance of Cylinder class. |
| `Cylinder(radiusTop: double, radiusBottom: double, height: double)` | Initializes a new instance of Cylinder class. |
| `Cylinder(radiusTop: double, radiusBottom: double, height: double, radialSegments: int, heightSegments: int, openEnded: boolean)` | Initializes a new instance of Cylinder class. |
| `Cylinder(name: String, radiusTop: double, radiusBottom: double, height: double, radialSegments: int, heightSegments: int, openEnded: boolean, thetaStart: double, thetaLength: double)` | Initializes a new instance of Cylinder class. |
| `getOffsetBottom()` → `Vector3` | Gets or sets the vertices transformation offset of the bottom side. |
| `setOffsetBottom(value: Vector3)` | Sets the offset bottom value. |
| `getOffsetTop()` → `Vector3` | Gets or sets the vertices transformation offset of the top side. |
| `setOffsetTop(value: Vector3)` | Sets the offset top value. |
| `getGenerateFanCylinder()` → `boolean` | Gets or sets whether to generate fan-style cylinder when ThetaLength is less than 2*PI. |
| `setGenerateFanCylinder(value: boolean)` | Sets the generate fan cylinder value. |
| `getShearBottom()` → `Vector2` | Gets or sets shear transform of the bottom side. |
| `setShearBottom(value: Vector2)` | Sets the shear bottom value. |
| `getShearTop()` → `Vector2` | Gets or sets shear transform of the top side. |
| `setShearTop(value: Vector2)` | Sets the shear top value. |
| `getRadiusTop()` → `double` | Gets or sets radius of cylinder's top cap. |
| `setRadiusTop(value: double)` | Sets the radius top value. |
| `getRadiusBottom()` → `double` | Gets or sets radius of cylinder's bottom cap. |
| `setRadiusBottom(value: double)` | Sets the radius bottom value. |
| `getHeight()` → `double` | Gets or sets height of the cylinder. |
| `setHeight(value: double)` | Sets the height value. |
| `getRadialSegments()` → `int` | Gets or sets radial segments. |
| `setRadialSegments(value: int)` | Sets the radial segments value. |
| `getHeightSegments()` → `int` | Gets or sets height segments. |
| `setHeightSegments(value: int)` | Sets the height segments value. |
| `getOpenEnded()` → `boolean` | Gets or sets a value indicating whether this cylinder is open ended. |
| `setOpenEnded(value: boolean)` | Sets the open ended value. |
| `getThetaStart()` → `double` | Gets or sets theta start. |
| `setThetaStart(value: double)` | Sets the theta start value. |
| `getThetaLength()` → `double` | Gets or sets length of theta. |
| `setThetaLength(value: double)` | Sets the theta length value. |
| `toMesh()` → `Mesh` | Convert current object to mesh. |
| `Geometry()` | Calls Geometry on this Cylinder instance. |
| `getVisible()` → `boolean` | Returns the visible. |
| `setVisible(value: boolean)` | Sets the visible value. |
| `getCastShadows()` → `boolean` | Returns the cast shadows. |
| `setCastShadows(value: boolean)` | Initializes a new instance of Box class. |
| `getReceiveShadows()` → `boolean` | Returns the receive shadows. |
| `setReceiveShadows(value: boolean)` | Initializes a new instance of Cylinder class. |
| `getControlPoints()` → `java.util.List` | Returns the control points. |
| `getVertexElements()` → `java.util.List` | Returns the vertex elements. |
| `getDeformers()` → `java.util.List` | Returns the deformers. |
| `getElement(type: VertexElementType)` → `VertexElement` | Gets or sets width segments. |
| `createElement(type: VertexElementType)` → `VertexElement` | Gets or sets the height segments. |
| `addElement(element: VertexElement)` | Calls addElement(element) on this Cylinder instance. |
| `addDeformer(deformer: Deformer)` | Adds a deformer to this geometry and sets the owner reference. |
| `getVertexElementOfUV(mapping: TextureMapping)` → `VertexElementUV` | Calls getVertexElementOfUV(mapping) on this Cylinder instance. |
| `createElementUV(mapping: TextureMapping)` → `VertexElementUV` | Calls createElementUV(mapping) on this Cylinder instance. |
| `getDeformers2()` → `java.util.Collection` | Returns the deformers2. |
| `Entity()` | NURBS curve is a curve represented by NURBS(Non-uniform rational basis spline), A NURBS curve is defined by its getOrder(), a set of weighted Geometry.getControlPoints() and a getKnotVectors() The w component in control point is used as control point's weight, whatever it is a CurveDimension.TWO_DIMENSIONAL or CurveDimension.THREE_DIMENSIONAL |
| `getParentNode()` → `Node` | Constructor of instance. |
| `setParentNode(value: Node)` | The Boolean operator used in the operation to create the result mesh. |
| `getParentNodes()` → `ArrayList` | Protected constructor to allow derived classes to set name. |
| `getExcluded()` → `boolean` | The Boolean operator used in the operation to create the result mesh. |
| `setExcluded(value: boolean)` | Sets the excluded value. |
| `getBoundingBox()` → `BoundingBox` | The first operand of the Boolean operator. |
| `SceneObject()` | Boolean operator allows you to apply Boolean operation on two IMeshConvertible instances. |
| `getScene()` → `Scene` | Constructor of BooleanOperator. |
| `A3DObject()` | Parameterized Cylinder. It can also be used to represent a cone when one of radiusTop/radiusBottom is zero. |
| `getName()` → `String` | The segments of the curve. |
| `setName(name: String)` | Constructs a CircleShape profile with specified radius. |
| `getProperties()` → `PropertyCollection` | Initializes a new instance of Cylinder class. |
| `findProperty(name: String)` → `Property` | Initializes a new instance of the Bone class. |
| `getProperty(name: String)` → `Object` | Gets the transform matrix of the node in current pose. |
| `setProperty(name: String, value: Object)` | Gets the width segments. |
| `removeProperty(name: String)` → `boolean` | Gets flip coordinate system of control points/normal during importing/exporting. |

## See Also

- [Aspose.3D — Enterprise API Reference](https://reference.aspose.com/3d/)