Class VulkanViewport.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanViewport.Builder
- Enclosing class:
VulkanViewport
Builds instances of type
VulkanViewport.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newVulkanViewport.final VulkanViewport.Builderfrom(VulkanViewportType instance) Fill a builder with attribute values from the providedVulkanViewportTypeinstance.final VulkanViewport.BuildersetHeight(float height) Initializes the value for theheightattribute.final VulkanViewport.BuildersetMaxDepth(float maxDepth) Initializes the value for themaxDepthattribute.final VulkanViewport.BuildersetMinDepth(float minDepth) Initializes the value for theminDepthattribute.final VulkanViewport.BuildersetWidth(float width) Initializes the value for thewidthattribute.final VulkanViewport.BuildersetX(float x) Initializes the value for thexattribute.final VulkanViewport.BuildersetY(float y) Initializes the value for theyattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanViewportTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setX
-
setY
-
setWidth
-
setHeight
-
setMinDepth
-
setMaxDepth
-
build
Builds a newVulkanViewport.- Returns:
- An immutable instance of VulkanViewport
- Throws:
IllegalStateException- if any required attributes are missing
-