com.aspose.threed

Interfaces

Classes

Enums

Exceptions

com.aspose.threed

Class Cylinder

  • All Implemented Interfaces:
    IMeshConvertible


    public class Cylinder
    extends Primitive
    Parameterized Cylinder. It can also be used to represent the cone when one of radiusTop/radiusBottom is zero.
    • Constructor Detail

      • Cylinder

        public Cylinder()
        Initializes a new instance of the Cylinder class.
      • Cylinder

        public Cylinder(double radius,
                        double height)
        Initializes a new instance of the Cylinder class.
        Parameters:
        radius - Radius of the top and bottom cap.
        height - Height.
      • Cylinder

        public Cylinder(double radiusTop,
                        double radiusBottom,
                        double height)
        Initializes a new instance of the Cylinder class.
        Parameters:
        radiusTop - Radius top.
        radiusBottom - Radius bottom.
        height - Height.
      • Cylinder

        public Cylinder(double radiusTop,
                        double radiusBottom,
                        double height,
                        int radialSegments,
                        int heightSegments,
                        boolean openEnded)
        Initializes a new instance of the Cylinder class.
        Parameters:
        radiusTop - Radius of cylinder's top cap.
        radiusBottom - Radius of cylinder's bottom cap.
        height - Height of the cylinder.
        radialSegments - Radial segments of both top and bottom circles..
        heightSegments - Height segments.
        openEnded - If set to true the cylinder would have no bottom/top caps..
      • Cylinder

        public Cylinder(java.lang.String name,
                        double radiusTop,
                        double radiusBottom,
                        double height,
                        int radialSegments,
                        int heightSegments,
                        boolean openEnded,
                        double thetaStart,
                        double thetaLength)
        Initializes a new instance of the Cylinder class.
        Parameters:
        name - The name of this object
        radiusTop - Radius of cylinder's top cap.
        radiusBottom - Radius of cylinder's bottom cap.
        height - Height of the cylinder.
        radialSegments - Radial segments of both top and bottom circles..
        heightSegments - Height segments.
        openEnded - If set to true the cylinder would have no bottom/top caps..
        thetaStart - Theta start.
        thetaLength - Theta length.
    • Method Detail

      • getOffsetBottom

        public Vector3 getOffsetBottom()
        Gets the vertices transformation offset of the bottom side.
      • setOffsetBottom

        public void setOffsetBottom(Vector3 value)
        Sets the vertices transformation offset of the bottom side.
        Parameters:
        value - New value
      • getOffsetTop

        public Vector3 getOffsetTop()
        Gets the vertices transformation offset of the top side.
      • setOffsetTop

        public void setOffsetTop(Vector3 value)
        Sets the vertices transformation offset of the top side.
        Parameters:
        value - New value
      • getGenerateFanCylinder

        public boolean getGenerateFanCylinder()
        Gets whether to generate the fan-style cylinder when the ThetaLength is less than 2*PI, otherwise the model will not be cut.
      • setGenerateFanCylinder

        public void setGenerateFanCylinder(boolean value)
        Sets whether to generate the fan-style cylinder when the ThetaLength is less than 2*PI, otherwise the model will not be cut.
        Parameters:
        value - New value
      • getShearBottom

        public Vector2 getShearBottom()
        Gets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
      • setShearBottom

        public void setShearBottom(Vector2 value)
        Sets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
        Parameters:
        value - New value
      • getShearTop

        public Vector2 getShearTop()
        Gets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
      • setShearTop

        public void setShearTop(Vector2 value)
        Sets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
        Parameters:
        value - New value
      • getRadiusTop

        public double getRadiusTop()
        Gets the radius of cylinder's top cap.
      • setRadiusTop

        public void setRadiusTop(double value)
        Sets the radius of cylinder's top cap.
        Parameters:
        value - New value
      • getRadiusBottom

        public double getRadiusBottom()
        Gets the radius bottoof cylinder's bottom cap.
      • setRadiusBottom

        public void setRadiusBottom(double value)
        Sets the radius bottoof cylinder's bottom cap.
        Parameters:
        value - New value
      • getHeight

        public double getHeight()
        Gets the height of the cylinder.
      • setHeight

        public void setHeight(double value)
        Sets the height of the cylinder.
        Parameters:
        value - New value
      • getRadialSegments

        public int getRadialSegments()
        Gets the radial segments.
      • setRadialSegments

        public void setRadialSegments(int value)
        Sets the radial segments.
        Parameters:
        value - New value
      • getHeightSegments

        public int getHeightSegments()
        Gets the height segments.
      • setHeightSegments

        public void setHeightSegments(int value)
        Sets the height segments.
        Parameters:
        value - New value
      • getOpenEnded

        public boolean getOpenEnded()
        Gets a value indicating whether this Cylinder open ended. The default value is false.
      • setOpenEnded

        public void setOpenEnded(boolean value)
        Sets a value indicating whether this Cylinder open ended. The default value is false.
        Parameters:
        value - New value
      • getThetaStart

        public double getThetaStart()
        Gets the theta start. The default value is 0.
      • setThetaStart

        public void setThetaStart(double value)
        Sets the theta start. The default value is 0.
        Parameters:
        value - New value
      • getThetaLength

        public double getThetaLength()
        Gets the length of the theta. The default value is 2π.
      • setThetaLength

        public void setThetaLength(double value)
        Sets the length of the theta. The default value is 2π.
        Parameters:
        value - New value
      • equals

        public boolean equals(java.lang.Object obj)
        Check if two cylinders equal
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The object to check equality.
        Returns:
        True if all properties are identically equal.
      • hashCode

        public int hashCode()
        Gets the hash code of current primitive instance
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code of the Cylinder