Class VulkanViewport

  • All Implemented Interfaces:
    VulkanViewportType

    public final class VulkanViewport
    extends java.lang.Object
    implements VulkanViewportType
    Structure specifying a viewport.
    See Also:
    "VkViewport"
    • Method Detail

      • x

        public float x()
        Specified by:
        x in interface VulkanViewportType
        Returns:
        the viewport’s upper left corner
      • y

        public float y()
        Specified by:
        y in interface VulkanViewportType
        Returns:
        the viewport’s upper left corner
      • width

        public float width()
        Specified by:
        width in interface VulkanViewportType
        Returns:
        the viewport’s width
      • height

        public float height()
        Specified by:
        height in interface VulkanViewportType
        Returns:
        the viewport’s height
      • minDepth

        public float minDepth()
        Specified by:
        minDepth in interface VulkanViewportType
        Returns:
        the viewport’s depth range (minimum)
      • maxDepth

        public float maxDepth()
        Specified by:
        maxDepth in interface VulkanViewportType
        Returns:
        the viewport’s depth range (maximum)
      • withX

        public final VulkanViewport withX​(float value)
        Copy the current immutable object by setting a value for the x attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for x
        Returns:
        A modified copy of the this object
      • withY

        public final VulkanViewport withY​(float value)
        Copy the current immutable object by setting a value for the y attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for y
        Returns:
        A modified copy of the this object
      • withWidth

        public final VulkanViewport withWidth​(float value)
        Copy the current immutable object by setting a value for the width attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for width
        Returns:
        A modified copy of the this object
      • withHeight

        public final VulkanViewport withHeight​(float value)
        Copy the current immutable object by setting a value for the height attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for height
        Returns:
        A modified copy of the this object
      • withMinDepth

        public final VulkanViewport withMinDepth​(float value)
        Copy the current immutable object by setting a value for the minDepth attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for minDepth
        Returns:
        A modified copy of the this object
      • withMaxDepth

        public final VulkanViewport withMaxDepth​(float value)
        Copy the current immutable object by setting a value for the maxDepth attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for maxDepth
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of VulkanViewport that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: x, y, width, height, minDepth, maxDepth.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value VulkanViewport with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static VulkanViewport of​(float x,
                                        float y,
                                        float width,
                                        float height,
                                        float minDepth,
                                        float maxDepth)
        Construct a new immutable VulkanViewport instance.
        Parameters:
        x - The value for the x attribute
        y - The value for the y attribute
        width - The value for the width attribute
        height - The value for the height attribute
        minDepth - The value for the minDepth attribute
        maxDepth - The value for the maxDepth attribute
        Returns:
        An immutable VulkanViewport instance
      • copyOf

        public static VulkanViewport copyOf​(VulkanViewportType instance)
        Creates an immutable copy of a VulkanViewportType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable VulkanViewport instance