public enum OperatorType extends java.lang.Enum<OperatorType>
Represents the set operator applied to a ComplexShape
Enum Constant and Description |
---|
Complement
Complement of any number of sets
|
Intersection
Intersection of any number of sets
|
None
Default operator type
|
Union
Union of any number of sets
|
Modifier and Type | Method and Description |
---|---|
static OperatorType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OperatorType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OperatorType None
Default operator type
When rendering, None should be taken to mean "invisible". A ComplexShape with this type should have no effect on its parent.
public static final OperatorType Union
Union of any number of sets
The result of a union may be disjoint, meaning that the child shapes may be separated with no points in common.
public static final OperatorType Intersection
Intersection of any number of sets
The intersection of more than 2 sets is defined as
((A_1 intersection A_2) intersection A_3) ...
public static final OperatorType Complement
Complement of any number of sets
Unlike the union and intersection operators, the order of shapes is important when applying the multi-valued complement operator. For more than two shapes, the multi-valued complement is defined as
A_1 / A_2 / A_3 / ..
where "/" is the complement operator. The first shape has significance as the only additive shape in the final result of the operation.
public static OperatorType[] values()
for (OperatorType c : OperatorType.values()) System.out.println(c);
public static OperatorType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null