Class Tube


  • public class Tube
    extends Primitive

    a tube primitive. radius is in xy-plane and height is in z-axis
    • Constructor Summary

      Constructors 
      Constructor Description
      Tube​(float radius, float thickness, float height)
      Constructs tube primitive with the specified setup

      The tube is aligned with the height in the z-direction such that tube extends height/2
      above and below the xy-plane.

      Tube​(float radius, float thickness, float height, int levels)
      Constructs tube primitive with the specified setup

      The tube is aligned with the height in the z-direction such that tube extends height/2
      above and below the xy-plane.

      Tube​(long cPtr, boolean cMemoryOwn)  
      Tube​(Q initQ)
      Constructs tube primitive based on vector with parameters

      Tube​(Q initQ, int levels)
      Constructs tube primitive based on vector with parameters

    • Constructor Detail

      • Tube

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

        public Tube​(float radius,
                    float thickness,
                    float height,
                    int levels)
        Constructs tube primitive with the specified setup

        The tube is aligned with the height in the z-direction such that tube extends height/2
        above and below the xy-plane.

        Parameters:
        radius - [in] inner radius of the tube.
        thickness - [in] thickness of the tube.
        height - [in] height of the cylinder.
        levels - [in] granularity of the mesh.
      • Tube

        public Tube​(float radius,
                    float thickness,
                    float height)
        Constructs tube primitive with the specified setup

        The tube is aligned with the height in the z-direction such that tube extends height/2
        above and below the xy-plane.

        Parameters:
        radius - [in] inner radius of the tube.
        thickness - [in] thickness of the tube.
        height - [in] height of the cylinder.
      • Tube

        public Tube​(Q initQ,
                    int levels)
        Constructs tube primitive based on vector with parameters

        Parameters:
        initQ - [in] vector of (radius, height)
        levels - [in] granularity of the mesh
      • Tube

        public Tube​(Q initQ)
        Constructs tube primitive based on vector with parameters

        Parameters:
        initQ - [in] vector of (radius, height)
    • Method Detail

      • getCPtr

        public static long getCPtr​(Tube obj)
      • getInnerRadius

        public float getInnerRadius()
        Get the inner radius of the tube.
        Returns:
        the radius
      • getThickness

        public float getThickness()
        Get the thickness of the tube.
        Returns:
        the thickness.
      • getHeight

        public float getHeight()
        Get the height of the tube.
        Returns:
        the height
      • 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