public class FacetGenerationContext extends ColorHandlingContext
Modifier and Type | Field and Description |
---|---|
static FacetGenerationContext |
DEFAULT
Default context.
|
parent, tag, tagColors
Constructor and Description |
---|
FacetGenerationContext(ITagColors tagColors,
FacetGenerationContext parent,
int tag)
Creates a new context with the given tag-color pairs, parent context and tag.
|
Modifier and Type | Method and Description |
---|---|
FacetGenerationContext |
applyTag(int tag)
Apply the given tag to this context - creates a new one if anything changed.
|
int |
calculateNumberOfSlices(Radius r)
Calculate the number of slices for the given radius based on the $fs and $fa values set.
|
Color |
getColor()
Returns with the color of the object in the current context.
|
void |
setFsAndFa(double fs,
int fa)
Sets the values of the $fs and $fa variables in the SCAD which is set in the
Consts class. |
public static final FacetGenerationContext DEFAULT
public FacetGenerationContext(ITagColors tagColors, FacetGenerationContext parent, int tag)
tagColors
- the tag-color pairs to be usedparent
- the parent contexttag
- the tag of the contextpublic void setFsAndFa(double fs, int fa)
Consts
class.fs
- the $fs valuefa
- the $fa valuepublic int calculateNumberOfSlices(Radius r)
r
- the radius of the objectpublic FacetGenerationContext applyTag(int tag)
applyTag
in interface IColorGenerationContext
applyTag
in class ColorHandlingContext
tag
- the tag to be appliedpublic Color getColor()
IColorGenerationContext
getColor
in interface IColorGenerationContext
getColor
in class ColorHandlingContext
Copyright © 2014–2020, Printing in 3D. All rights reserved.