Enum Class OutsideKernelPolicy
- All Implemented Interfaces:
Serializable
,Comparable<OutsideKernelPolicy>
,Constable
How to handle voxels whose neighbors are outside the scene.
- Author:
- Owen Feehan
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPretend any parts of the neighborhood that lie outside the scene are being off-valued.Pretend any parts of the neighborhood that lie outside the scene are being on-valued.Ignore any parts of the neighborhood that lie outside the scene. -
Method Summary
Modifier and TypeMethodDescriptionstatic OutsideKernelPolicy
as
(boolean on) boolean
When true, any parts of the neighborhood that lie outside the scene are not considered in kernel neighborhoods.boolean
In cases whereisIgnoreOutside()
is false, then whether to treat voxels that lie outside the scene as on (if true) or off (if false).int
multiplex
(int ignored, int asOn, int asOff) Multiplexes between three-values depending on which policy is currently selected.static OutsideKernelPolicy
of
(boolean ignoreOutside, boolean outsideHigh) Multiplexes between all three possible enums.static OutsideKernelPolicy
Returns the enum constant of this class with the specified name.static OutsideKernelPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IGNORE_OUTSIDE
Ignore any parts of the neighborhood that lie outside the scene. The second parameter here is arbtirary. -
AS_ON
Pretend any parts of the neighborhood that lie outside the scene are being on-valued. -
AS_OFF
Pretend any parts of the neighborhood that lie outside the scene are being off-valued.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
as
-
of
Multiplexes between all three possible enums.- Parameters:
ignoreOutside
- if true, thenIGNORE_OUTSIDE
is selected.outsideHigh
- ifignoreOutside==false
, and determines whetherAS_ON
(if true) is selected orAS_OFF
(if false).- Returns:
- either
AS_ON
andAS_OFF
orIGNORE_OUTSIDE
.
-
isIgnoreOutside
public boolean isIgnoreOutside()When true, any parts of the neighborhood that lie outside the scene are not considered in kernel neighborhoods.- Returns:
- true if parts of the neighborhood that lie outside the scene should be ignored.
-
isOutsideOn
public boolean isOutsideOn()In cases whereisIgnoreOutside()
is false, then whether to treat voxels that lie outside the scene as on (if true) or off (if false).- Returns:
- true if voxels lying outside the scene should be treated as on in the above circumstances, otherwise they are treated as off.
-
multiplex
public int multiplex(int ignored, int asOn, int asOff) Multiplexes between three-values depending on which policy is currently selected.- Parameters:
ignored
- the value to return if current policy isIGNORE_OUTSIDE
asOn
- the value to return if current policy isAS_ON
asOff
- the value to return if current policy isAS_OFF
- Returns:
- one of the three values above.
-