Package com.io7m.jspatial.api.octtrees
Class OctTreeConfigurationD.Builder
- java.lang.Object
-
- com.io7m.jspatial.api.octtrees.OctTreeConfigurationD.Builder
-
- Enclosing class:
- OctTreeConfigurationD
public static final class OctTreeConfigurationD.Builder extends java.lang.ObjectBuilds instances of typeOctTreeConfigurationD. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OctTreeConfigurationDbuild()Builds a newOctTreeConfigurationD.OctTreeConfigurationD.Builderfrom(OctTreeConfigurationDType instance)Fill a builder with attribute values from the providedOctTreeConfigurationDTypeinstance.OctTreeConfigurationD.BuildersetMinimumOctantDepth(double minimumOctantDepth)Initializes the value for theminimumOctantDepthattribute.OctTreeConfigurationD.BuildersetMinimumOctantHeight(double minimumOctantHeight)Initializes the value for theminimumOctantHeightattribute.OctTreeConfigurationD.BuildersetMinimumOctantWidth(double minimumOctantWidth)Initializes the value for theminimumOctantWidthattribute.OctTreeConfigurationD.BuildersetTrimOnRemove(boolean trimOnRemove)Initializes the value for thetrimOnRemoveattribute.OctTreeConfigurationD.BuildersetVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeD volume)Initializes the value for thevolumeattribute.
-
-
-
Method Detail
-
from
public final OctTreeConfigurationD.Builder from(OctTreeConfigurationDType instance)
Fill a builder with attribute values from the providedOctTreeConfigurationDTypeinstance. 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
-
setVolume
public final OctTreeConfigurationD.Builder setVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeD volume)
Initializes the value for thevolumeattribute.- Parameters:
volume- The value for volume- Returns:
thisbuilder for use in a chained invocation
-
setMinimumOctantWidth
public final OctTreeConfigurationD.Builder setMinimumOctantWidth(double minimumOctantWidth)
Initializes the value for theminimumOctantWidthattribute.If not set, this attribute will have a default value as returned by the initializer of
minimumOctantWidth.- Parameters:
minimumOctantWidth- The value for minimumOctantWidth- Returns:
thisbuilder for use in a chained invocation
-
setMinimumOctantHeight
public final OctTreeConfigurationD.Builder setMinimumOctantHeight(double minimumOctantHeight)
Initializes the value for theminimumOctantHeightattribute.If not set, this attribute will have a default value as returned by the initializer of
minimumOctantHeight.- Parameters:
minimumOctantHeight- The value for minimumOctantHeight- Returns:
thisbuilder for use in a chained invocation
-
setMinimumOctantDepth
public final OctTreeConfigurationD.Builder setMinimumOctantDepth(double minimumOctantDepth)
Initializes the value for theminimumOctantDepthattribute.If not set, this attribute will have a default value as returned by the initializer of
minimumOctantDepth.- Parameters:
minimumOctantDepth- The value for minimumOctantDepth- Returns:
thisbuilder for use in a chained invocation
-
setTrimOnRemove
public final OctTreeConfigurationD.Builder setTrimOnRemove(boolean trimOnRemove)
Initializes the value for thetrimOnRemoveattribute.If not set, this attribute will have a default value as returned by the initializer of
trimOnRemove.- Parameters:
trimOnRemove- The value for trimOnRemove- Returns:
thisbuilder for use in a chained invocation
-
build
public OctTreeConfigurationD build()
Builds a newOctTreeConfigurationD.- Returns:
- An immutable instance of OctTreeConfigurationD
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-