Package com.io7m.smfj.processing.main
Class SMFMemoryMeshFilterTrianglesOptimizeConfiguration
- java.lang.Object
-
- com.io7m.smfj.processing.main.SMFMemoryMeshFilterTrianglesOptimizeConfiguration
-
- All Implemented Interfaces:
SMFMemoryMeshFilterTrianglesOptimizeConfigurationType
public final class SMFMemoryMeshFilterTrianglesOptimizeConfiguration extends java.lang.Object implements SMFMemoryMeshFilterTrianglesOptimizeConfigurationType
A specification of how triangles should be processed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SMFMemoryMeshFilterTrianglesOptimizeConfiguration.Builder
Builds instances of typeSMFMemoryMeshFilterTrianglesOptimizeConfiguration
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFMemoryMeshFilterTrianglesOptimizeConfiguration.Builder
builder()
Creates a builder forSMFMemoryMeshFilterTrianglesOptimizeConfiguration
.static SMFMemoryMeshFilterTrianglesOptimizeConfiguration
copyOf(SMFMemoryMeshFilterTrianglesOptimizeConfigurationType instance)
Creates an immutable copy of aSMFMemoryMeshFilterTrianglesOptimizeConfigurationType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofSMFMemoryMeshFilterTrianglesOptimizeConfiguration
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:optimize
,validate
.static SMFMemoryMeshFilterTrianglesOptimizeConfiguration
of(java.util.OptionalInt optimize, boolean validate)
Construct a new immutableSMFMemoryMeshFilterTrianglesOptimizeConfiguration
instance.java.util.OptionalInt
optimize()
A specification of whether triangles should be optimized.java.lang.String
toString()
Prints the immutable valueSMFMemoryMeshFilterTrianglesOptimizeConfiguration
with attribute values.boolean
validate()
A specification of whether or not triangle indices should be validated.SMFMemoryMeshFilterTrianglesOptimizeConfiguration
withOptimize(int value)
Copy the current immutable object by setting a present value for the optionaloptimize
attribute.SMFMemoryMeshFilterTrianglesOptimizeConfiguration
withOptimize(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for theoptimize
attribute.SMFMemoryMeshFilterTrianglesOptimizeConfiguration
withValidate(boolean value)
Copy the current immutable object by setting a value for thevalidate
attribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.io7m.smfj.processing.main.SMFMemoryMeshFilterTrianglesOptimizeConfigurationType
checkPreconditions
-
-
-
-
Method Detail
-
optimize
public java.util.OptionalInt optimize()
A specification of whether triangles should be optimized. If a value is provided, it represents the smallest size in bits that an implementation is allowed to use for triangle indices. If no value is specified, optimization is not performed.- Specified by:
optimize
in interfaceSMFMemoryMeshFilterTrianglesOptimizeConfigurationType
- Returns:
- The minimum size of triangle indices, if any
-
validate
public boolean validate()
A specification of whether or not triangle indices should be validated. A triangle index is valid iff there is an existing vertex with the same index value.- Specified by:
validate
in interfaceSMFMemoryMeshFilterTrianglesOptimizeConfigurationType
- Returns:
true
iff triangle indices should be validated
-
withOptimize
public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withOptimize(int value)
Copy the current immutable object by setting a present value for the optionaloptimize
attribute.- Parameters:
value
- The value for optimize- Returns:
- A modified copy of
this
object
-
withOptimize
public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withOptimize(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for theoptimize
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for optimize- Returns:
- A modified copy of
this
object
-
withValidate
public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withValidate(boolean value)
Copy the current immutable object by setting a value for thevalidate
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for validate- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofSMFMemoryMeshFilterTrianglesOptimizeConfiguration
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:optimize
,validate
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSMFMemoryMeshFilterTrianglesOptimizeConfiguration
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration of(java.util.OptionalInt optimize, boolean validate)
Construct a new immutableSMFMemoryMeshFilterTrianglesOptimizeConfiguration
instance.- Parameters:
optimize
- The value for theoptimize
attributevalidate
- The value for thevalidate
attribute- Returns:
- An immutable SMFMemoryMeshFilterTrianglesOptimizeConfiguration instance
-
copyOf
public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration copyOf(SMFMemoryMeshFilterTrianglesOptimizeConfigurationType instance)
Creates an immutable copy of aSMFMemoryMeshFilterTrianglesOptimizeConfigurationType
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 SMFMemoryMeshFilterTrianglesOptimizeConfiguration instance
-
builder
public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration.Builder builder()
Creates a builder forSMFMemoryMeshFilterTrianglesOptimizeConfiguration
.SMFMemoryMeshFilterTrianglesOptimizeConfiguration.builder() .setOptimize(int) // optional
optimize
.setValidate(boolean) // requiredvalidate
.build();- Returns:
- A new SMFMemoryMeshFilterTrianglesOptimizeConfiguration builder
-
-