public enum AlignType extends Enum<AlignType>
Enum Constant and Description |
---|
CENTER
Aligns to the middle of the models.
|
MAX
|
MAX_IN
Aligns to the higher parts on the axis, means the right, back and top.
|
MAX_OUT
Aligns to the higher parts on the axis, means the right, back and top.
|
MIN
Deprecated.
use
MIN_IN or MIN_OUT instead |
MIN_IN
Aligns to the lower parts on the axis, means the left, front and bottom.
|
MIN_OUT
Aligns to the lower parts on the axis, means the left, front and bottom.
|
NONE
Don't change anything.
|
Modifier and Type | Method and Description |
---|---|
protected double |
calculateCoordinate(Boundary model,
Boundary relateTo)
Used internally to calculate the coordinate on the given axis.
|
protected double |
calculateCoordinate(Boundary model,
double relateTo)
Used internally to calculate the coordinate on the given axis.
|
AlignType |
convertTo(boolean inside)
Return with the corresponding inside or outside alignment of this alignment type based on
the given parameter.
|
AlignType |
convertToInside()
Return with the corresponding inside alignment of this alignment type.
|
AlignType |
convertToOutside()
Return with the corresponding outside alignment of this alignment type.
|
double |
getAlignedValue(Boundary boundary)
Returns with the side of the given boundary denoted by this align.
|
static AlignType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AlignType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AlignType MIN_IN
public static final AlignType MIN_OUT
public static final AlignType MIN
MIN_IN
or MIN_OUT
insteadAligns to the lower parts on the axis, means the left, front and bottom.
This behaves exactly the same as MIN_OUT
for backward compatibility reasons.
public static final AlignType MAX_IN
public static final AlignType MAX_OUT
public static final AlignType MAX
Aligns to the higher parts on the axis, means the right, back and top.
This behaves exactly the same as MAX_OUT
for backward compatibility reasons.
public static final AlignType CENTER
public static final AlignType NONE
public static AlignType[] values()
for (AlignType c : AlignType.values()) System.out.println(c);
public static AlignType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic AlignType convertToInside()
public AlignType convertToOutside()
public AlignType convertTo(boolean inside)
inside
- determine if we want to get the inside or outside version of this aligmentpublic double getAlignedValue(Boundary boundary)
boundary
- the boundary we want to getprotected double calculateCoordinate(Boundary model, Boundary relateTo)
model
- the model we want to moverelateTo
- the model we use as a referenceinside
- controls which side of the aligned model will be alignedprotected double calculateCoordinate(Boundary model, double relateTo)
model
- the model we want to moverelateTo
- the coordinate we want to use as a reference in the alignment processCopyright © 2014–2020, Printing in 3D. All rights reserved.