Class VulkanViewport
java.lang.Object
com.io7m.jcoronado.api.VulkanViewport
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanViewport.Builderbuilder()Creates a builder forVulkanViewport.static VulkanViewportcopyOf(VulkanViewportType instance) Creates an immutable copy of aVulkanViewportTypevalue.booleanThis instance is equal to all instances ofVulkanViewportthat have equal attribute values.inthashCode()Computes a hash code from attributes:x,y,width,height,minDepth,maxDepth.floatheight()floatmaxDepth()floatminDepth()static VulkanViewportof(float x, float y, float width, float height, float minDepth, float maxDepth) Construct a new immutableVulkanViewportinstance.toString()Prints the immutable valueVulkanViewportwith attribute values.floatwidth()final VulkanViewportwithHeight(float value) Copy the current immutable object by setting a value for theheightattribute.final VulkanViewportwithMaxDepth(float value) Copy the current immutable object by setting a value for themaxDepthattribute.final VulkanViewportwithMinDepth(float value) Copy the current immutable object by setting a value for theminDepthattribute.final VulkanViewportwithWidth(float value) Copy the current immutable object by setting a value for thewidthattribute.final VulkanViewportwithX(float value) Copy the current immutable object by setting a value for thexattribute.final VulkanViewportwithY(float value) Copy the current immutable object by setting a value for theyattribute.floatx()floaty()
-
Method Details
-
x
public float x()- Specified by:
xin interfaceVulkanViewportType- Returns:
- the viewport’s upper left corner
-
y
public float y()- Specified by:
yin interfaceVulkanViewportType- Returns:
- the viewport’s upper left corner
-
width
public float width()- Specified by:
widthin interfaceVulkanViewportType- Returns:
- the viewport’s width
-
height
public float height()- Specified by:
heightin interfaceVulkanViewportType- Returns:
- the viewport’s height
-
minDepth
public float minDepth()- Specified by:
minDepthin interfaceVulkanViewportType- Returns:
- the viewport’s depth range (minimum)
-
maxDepth
public float maxDepth()- Specified by:
maxDepthin interfaceVulkanViewportType- Returns:
- the viewport’s depth range (maximum)
-
withX
Copy the current immutable object by setting a value for thexattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for x- Returns:
- A modified copy of the
thisobject
-
withY
Copy the current immutable object by setting a value for theyattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for y- Returns:
- A modified copy of the
thisobject
-
withWidth
Copy the current immutable object by setting a value for thewidthattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for width- Returns:
- A modified copy of the
thisobject
-
withHeight
Copy the current immutable object by setting a value for theheightattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for height- Returns:
- A modified copy of the
thisobject
-
withMinDepth
Copy the current immutable object by setting a value for theminDepthattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minDepth- Returns:
- A modified copy of the
thisobject
-
withMaxDepth
Copy the current immutable object by setting a value for themaxDepthattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxDepth- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanViewport of(float x, float y, float width, float height, float minDepth, float maxDepth) Construct a new immutableVulkanViewportinstance.- Parameters:
x- The value for thexattributey- The value for theyattributewidth- The value for thewidthattributeheight- The value for theheightattributeminDepth- The value for theminDepthattributemaxDepth- The value for themaxDepthattribute- Returns:
- An immutable VulkanViewport instance
-
copyOf
Creates an immutable copy of aVulkanViewportTypevalue. 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
-
builder
Creates a builder forVulkanViewport.VulkanViewport.builder() .setX(float) // requiredx.setY(float) // requiredy.setWidth(float) // requiredwidth.setHeight(float) // requiredheight.setMinDepth(float) // requiredminDepth.setMaxDepth(float) // requiredmaxDepth.build();- Returns:
- A new VulkanViewport builder
-