Class TLspShapeDiscretizationParameters.Builder
java.lang.Object
com.luciad.view.lightspeed.geometry.discretization.TLspShapeDiscretizationParameters.Builder
- Enclosing class:
TLspShapeDiscretizationParameters
Builder for creating instances of
TLspShapeDiscretizationParameters.- Since:
- 2012.0
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Creates a new Builder to initialize a newTLspShapeDiscretizationParametersinstance. -
Method Summary
Modifier and TypeMethodDescriptionall(TLspShapeDiscretizationParameters aParams) Initializes this builder with all settings of the providedTLspShapeDiscretizationParametersinstance.allowPrimitiveType(TLcd3DPrimitiveType aPrimitiveType) Allows the given primitive type to be part of the generated mesh.bufferCapsPrecision(int aBufferCapsPrecision) Sets the precision forILcdGeoBuffers to use.build()Creates a newTLspShapeDiscretizationParametersinstance with settings derived from this builder.maximalEdgeLength(double aMaxEdgeLength) Sets the maximum edge length for non-straight outlines of theTLspShapeDiscretizationParametersto build.maximalFillEdgeLength(double aMaxEdgeLength) Sets the maximum edge length for fills of theTLspShapeDiscretizationParametersto build.modelXYZWorldTransformation(ILcdModelXYZWorldTransformation aTransformation) Sets a customILcdModelXYZWorldTransformationto be used by the shape discretizer.modes(TLspShapeDiscretizationMode... aModes) Sets the modes of theTLspShapeDiscretizationParametersto build.modes(Collection<TLspShapeDiscretizationMode> aModes) Sets the modes of theTLspShapeDiscretizationParametersto build.Sets the styles of theTLspShapeDiscretizationParametersto build.
-
Constructor Details
-
Builder
public Builder()Creates a new Builder to initialize a newTLspShapeDiscretizationParametersinstance.By default the builder creates a
TLspShapeDiscretizationParametersinstance with no styles or maximal edge length constraints andTLspShapeDiscretizationParameters.getModes()containing bothTLspShapeDiscretizationMode.INTERIORandTLspShapeDiscretizationMode.OUTLINE.
-
-
Method Details
-
modes
public TLspShapeDiscretizationParameters.Builder modes(Collection<TLspShapeDiscretizationMode> aModes) Sets the modes of theTLspShapeDiscretizationParametersto build.- Parameters:
aModes- the given modes- Returns:
this
-
modes
Sets the modes of theTLspShapeDiscretizationParametersto build.- Parameters:
aModes- the given modes- Returns:
this
-
maximalEdgeLength
Sets the maximum edge length for non-straight outlines of theTLspShapeDiscretizationParametersto build.- Parameters:
aMaxEdgeLength- the given maximum edge length for outlines- Returns:
this
-
maximalFillEdgeLength
Sets the maximum edge length for fills of theTLspShapeDiscretizationParametersto build.- Parameters:
aMaxEdgeLength- the given maximum edge length for fills- Returns:
this
-
styles
Sets the styles of theTLspShapeDiscretizationParametersto build.- Parameters:
aStylesList- the given styles- Returns:
this
-
bufferCapsPrecision
Sets the precision forILcdGeoBuffers to use. The precision represents the amount of edges per quarter-circle used for discretization of caps and joins. Default value is 8. Recommended values are in the range of 1 to 12.- Parameters:
aBufferCapsPrecision- The precision to use.- Returns:
this- Since:
- 2022.1
-
allowPrimitiveType
public TLspShapeDiscretizationParameters.Builder allowPrimitiveType(TLcd3DPrimitiveType aPrimitiveType) Allows the given primitive type to be part of the generated mesh. Primitives of other types will be converted, if possible, to one of the allowed primitive types. If no conversion is possible, the primitive should be discarded from the mesh.- Parameters:
aPrimitiveType- a primitive type that can be used to generate the resulting mesh.- Returns:
this
-
all
Initializes this builder with all settings of the providedTLspShapeDiscretizationParametersinstance.- Parameters:
aParams- the providedTLspShapeDiscretizationParametersinstance.- Returns:
this
-
modelXYZWorldTransformation
public TLspShapeDiscretizationParameters.Builder modelXYZWorldTransformation(ILcdModelXYZWorldTransformation aTransformation) Sets a customILcdModelXYZWorldTransformationto be used by the shape discretizer. By default this transformation is set tonull. In this case the shape discretizer uses theILcdModelXYZWorldTransformationinstance provided by the givenTLspContext.- Parameters:
aTransformation- the customILcdModelXYZWorldTransformationto be used by the shape discretizer.- Returns:
this
-
build
Creates a newTLspShapeDiscretizationParametersinstance with settings derived from this builder.- Returns:
- a new
TLspShapeDiscretizationParametersinstance
-