Class Shape<S extends Shape<S>>

    • Field Detail

      • DEFAULT_POSITION

        public static final Point3D DEFAULT_POSITION
    • Constructor Detail

      • Shape

        public Shape()
    • Method Detail

      • belongsToAGUI

        public final boolean belongsToAGUI()
        Returns:
        true if the current Shape belongs to a GUI.
      • getPosition

        public final Point3D getPosition()
        Returns:
        the position of the current Shape.
      • getRefRenderObject

        public final <RO> RO getRefRenderObject()
        Type Parameters:
        RO - is the type of the returned render object.
        Returns:
        the render object of the current Shape.
        Throws:
        ArgumentDoesNotHaveAttributeException - if the current Shape does not have a render object.
      • getXPosition

        public final double getXPosition()
        Returns:
        the x-position of the current Shape.
      • getXPositionAsFloat

        public final float getXPositionAsFloat()
        Returns:
        the x-position of the current Shape as float.
      • getYPosition

        public final double getYPosition()
        Returns:
        the y-position of the current Shape.
      • getYPositionAsFloat

        public final float getYPositionAsFloat()
        Returns:
        the xy-position of the current Shape as float.
      • getZPosition

        public final double getZPosition()
        Returns:
        the z-position of the current Shape.
      • getZPositionAsFloat

        public final float getZPositionAsFloat()
        Returns:
        the z-position of the current Shape as float.
      • hasRole

        public boolean hasRole​(java.lang.String role)
        Returns:
        true if the current Shape has the given role.
      • render

        public final void render()
        Renders the current Shape.
      • renderRecursively

        public final void renderRecursively()
        Renders the current Shape recursively.
      • setGUI

        public final S setGUI​(GUI3D<?> pGUI)
        Sets the GUI the current Shape will belong to.
        Parameters:
        pGUI -
        Returns:
        the current Shape.
      • setPosition

        public final S setPosition​(Point2D position)
        Sets the position of the current Shape with z-position=0.0.
        Parameters:
        position -
        Returns:
        the current Shape.
      • setPosition

        public final S setPosition​(Point3D position)
        Sets the position of this frame.
        Parameters:
        position -
        Returns:
        this frame.
        Throws:
        ArgumentIsNullException - if the given position is null.
      • setPosition

        public final S setPosition​(double xPosition,
                                   double yPosition)
        Sets the position of the current Shape with z-position=0.0.
        Parameters:
        xPosition -
        yPosition -
        Returns:
        the current Shape.
      • setPosition

        public final S setPosition​(double xPosition,
                                   double yPosition,
                                   double zPosition)
        Sets the position of the current Shape.
        Parameters:
        xPosition -
        yPosition -
        zPosition -
        Returns:
        the current Shape.
      • translate

        public final S translate​(double xDelta,
                                 double yDelta,
                                 double zDelta)
        Translates the current Shape.
        Parameters:
        xDelta -
        yDelta -
        zDelta -
        Returns:
        the current Shape.