Class Pyramid

    • Constructor Detail

      • Pyramid

        public Pyramid()
        Construct a new pyramid instance with default bottom area(10, 10) and default height(5)
      • Pyramid

        public Pyramid​(double xbottom,
                       double ybottom,
                       double height)
        Construct a new pyramid instance with specified bottom area
        Parameters:
        xbottom - The x-direction length of the bottom
        ybottom - The y-direction length of the bottom
        height - The height of the pyramid
      • Pyramid

        public Pyramid​(double xbottom,
                       double ybottom,
                       double xtop,
                       double ytop,
                       double height)
        Construct a new pyramid instance with specified bottom area and top area and height.
        Parameters:
        xbottom - The x-direction length of the bottom area
        ybottom - The y-direction length of the bottom area
        xtop - The x-direction length of the top area
        ytop - The y-direction length of the top area
        height - The height of the pyramid
      • Pyramid

        public Pyramid​(java.lang.String name,
                       double xbottom,
                       double ybottom,
                       double xtop,
                       double ytop,
                       double height)
        Construct a new pyramid instance with specified bottom area and top area and height.
        Parameters:
        name - The name of the pyramid
        xbottom - The x-direction length of the bottom area
        ybottom - The y-direction length of the bottom area
        xtop - The x-direction length of the top area
        ytop - The y-direction length of the top area
        height - The height of the pyramid
    • Method Detail

      • getBottomArea

        public Vector2 getBottomArea()
        Area of the bottom cap
      • setBottomArea

        public void setBottomArea​(Vector2 value)
        Area of the bottom cap
        Parameters:
        value - New value
      • getTopArea

        public Vector2 getTopArea()
        Area of the top cap
      • setTopArea

        public void setTopArea​(Vector2 value)
        Area of the top cap
        Parameters:
        value - New value
      • getBottomOffset

        public Vector3 getBottomOffset()
        Offset for bottom vertices
      • setBottomOffset

        public void setBottomOffset​(Vector3 value)
        Offset for bottom vertices
        Parameters:
        value - New value
      • getHeight

        public double getHeight()
        Height of the pyramid
      • setHeight

        public void setHeight​(double value)
        Height of the pyramid
        Parameters:
        value - New value