Class Cone


  • public class Cone
    extends Primitive

    cone primitive. Like a cylinder though where a radius can be
    specified for both ends.

    The cone is aligned with the z-axis such that top is in the positive z-axis
    and the bottom is in the negative z-axis. The center of the cone will be
    in (0,0,0) which is inside the cone.
    • Constructor Detail

      • Cone

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

        public Cone​(Q initQ,
                    int levels)
        constructor
      • Cone

        public Cone​(Q initQ)
        constructor
      • Cone

        public Cone​(double height,
                    double radiusTop,
                    double radiusBot,
                    int levels)
        constructor
        Parameters:
        height - [in] height of cone
        radiusTop - [in] radius of the top end
        radiusBot - [in] radius of the bottom end
        levels - [in] granularity of the mesh
      • Cone

        public Cone​(double height,
                    double radiusTop,
                    double radiusBot)
        constructor
        Parameters:
        height - [in] height of cone
        radiusTop - [in] radius of the top end
        radiusBot - [in] radius of the bottom end
    • Method Detail

      • getCPtr

        public static long getCPtr​(Cone obj)
      • getHeight

        public double getHeight()
        the height
      • getTopRadius

        public double getTopRadius()
        the top radius
      • getBottomRadius

        public double getBottomRadius()
        the bottom radius
      • 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