Class Cylinder


  • public class Cylinder
    extends Primitive

    a cylinder primitive. By default the radius is in the x-y plane and height is along
    the z-axis
    • Constructor Summary

      Constructors 
      Constructor Description
      Cylinder()
      constructor
      Cylinder​(float radius, float height)
      Constructs cylinder primitive with the specified setup

      The cylinder is aligned with the height in the z-direction.

      Cylinder​(float radius, float height, int levels)
      Constructs cylinder primitive with the specified setup

      The cylinder is aligned with the height in the z-direction.

      Cylinder​(int levels)
      constructor
      Cylinder​(long cPtr, boolean cMemoryOwn)  
      Cylinder​(Q initQ)
      Constructor.
      Cylinder​(Q initQ, int levels)
      Constructor.
      Cylinder​(Transform3D transform, float radius, float height)
      Construct cylinder primitive with specified radius and height and with the given
      transform.

      The cylinder will be centered in the position of transform and oriented in the
      direction of the third column of the rotation matrix of transform.
      Cylinder​(Transform3D transform, float radius, float height, int levels)
      Construct cylinder primitive with specified radius and height and with the given
      transform.

      The cylinder will be centered in the position of transform and oriented in the
      direction of the third column of the rotation matrix of transform.
    • Constructor Detail

      • Cylinder

        public Cylinder​(long cPtr,
                        boolean cMemoryOwn)
      • Cylinder

        public Cylinder​(int levels)
        constructor
      • Cylinder

        public Cylinder()
        constructor
      • Cylinder

        public Cylinder​(float radius,
                        float height,
                        int levels)
        Constructs cylinder primitive with the specified setup

        The cylinder is aligned with the height in the z-direction.

        Parameters:
        radius - [in] radius of the cylinder.
        height - [in] height of the cylinder.
        levels - [in] granularity of the mesh
      • Cylinder

        public Cylinder​(float radius,
                        float height)
        Constructs cylinder primitive with the specified setup

        The cylinder is aligned with the height in the z-direction.

        Parameters:
        radius - [in] radius of the cylinder.
        height - [in] height of the cylinder.
      • Cylinder

        public Cylinder​(Q initQ,
                        int levels)
        Constructor.
        Parameters:
        initQ - [in] vector with (height, radius)
        levels - [in] granularity of the mesh
      • Cylinder

        public Cylinder​(Q initQ)
        Constructor.
        Parameters:
        initQ - [in] vector with (height, radius)
      • Cylinder

        public Cylinder​(Transform3D transform,
                        float radius,
                        float height,
                        int levels)
        Construct cylinder primitive with specified radius and height and with the given
        transform.

        The cylinder will be centered in the position of transform and oriented in the
        direction of the third column of the rotation matrix of transform.
        Parameters:
        transform - [in] The transform specifying how the pose of the cylinder
        radius - [in] radius of the cylinder.
        height - [in] height of the cylinder.
        levels - [in] granularity of the mesh
      • Cylinder

        public Cylinder​(Transform3D transform,
                        float radius,
                        float height)
        Construct cylinder primitive with specified radius and height and with the given
        transform.

        The cylinder will be centered in the position of transform and oriented in the
        direction of the third column of the rotation matrix of transform.
        Parameters:
        transform - [in] The transform specifying how the pose of the cylinder
        radius - [in] radius of the cylinder.
        height - [in] height of the cylinder.
    • Method Detail

      • getCPtr

        public static long getCPtr​(Cylinder obj)
      • getRadius

        public double getRadius()
        Get the radius of the cylinder.
        Returns:
        the radius.
      • getHeight

        public double getHeight()
        Get the height of the cylinder.
        Returns:
        the height.
      • getTransform

        public Transform3Df getTransform()
        Returns the transform of the cylinder.

        Default is the identity matrix unless a transform has been specified.
        Returns:
        Transform of the cylinder
      • createMesh

        public TriMeshPtr createMesh​(int resolution)
        Description copied from class: Primitive
        make a trimesh from this primitive. Use granularity to
        specify minimum number of line segments a half circle is split into
        Overrides:
        createMesh in class Primitive
        Parameters:
        resolution - [in]
      • getParameters

        public Q getParameters()
        Description copied from class: Primitive
        get the parameters that define this primitive
        Overrides:
        getParameters in class Primitive
      • setParameters

        public void setParameters​(Q q)
        Description copied from class: Primitive
        set the parameters that define this primitive
        Overrides:
        setParameters in class Primitive