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
ConstructorDescriptionBuilder()
Creates a new Builder to initialize a newTLspShapeDiscretizationParameters
instance. -
Method Summary
Modifier and TypeMethodDescriptionall
(TLspShapeDiscretizationParameters aParams) Initializes this builder with all settings of the providedTLspShapeDiscretizationParameters
instance.allowPrimitiveType
(TLcd3DPrimitiveType aPrimitiveType) Allows the given primitive type to be part of the generated mesh.bufferCapsPrecision
(int aBufferCapsPrecision) Sets the precision forILcdGeoBuffer
s to use.build()
Creates a newTLspShapeDiscretizationParameters
instance with settings derived from this builder.maximalEdgeLength
(double aMaxEdgeLength) Sets the maximum edge length for non-straight outlines of theTLspShapeDiscretizationParameters
to build.maximalFillEdgeLength
(double aMaxEdgeLength) Sets the maximum edge length for fills of theTLspShapeDiscretizationParameters
to build.modelXYZWorldTransformation
(ILcdModelXYZWorldTransformation aTransformation) Sets a customILcdModelXYZWorldTransformation
to be used by the shape discretizer.modes
(TLspShapeDiscretizationMode... aModes) Sets the modes of theTLspShapeDiscretizationParameters
to build.modes
(Collection<TLspShapeDiscretizationMode> aModes) Sets the modes of theTLspShapeDiscretizationParameters
to build.Sets the styles of theTLspShapeDiscretizationParameters
to build.
-
Constructor Details
-
Builder
public Builder()Creates a new Builder to initialize a newTLspShapeDiscretizationParameters
instance.By default the builder creates a
TLspShapeDiscretizationParameters
instance with no styles or maximal edge length constraints andTLspShapeDiscretizationParameters.getModes()
containing bothTLspShapeDiscretizationMode.INTERIOR
andTLspShapeDiscretizationMode.OUTLINE
.
-
-
Method Details
-
modes
public TLspShapeDiscretizationParameters.Builder modes(Collection<TLspShapeDiscretizationMode> aModes) Sets the modes of theTLspShapeDiscretizationParameters
to build.- Parameters:
aModes
- the given modes- Returns:
this
-
modes
Sets the modes of theTLspShapeDiscretizationParameters
to build.- Parameters:
aModes
- the given modes- Returns:
this
-
maximalEdgeLength
Sets the maximum edge length for non-straight outlines of theTLspShapeDiscretizationParameters
to build.- Parameters:
aMaxEdgeLength
- the given maximum edge length for outlines- Returns:
this
-
maximalFillEdgeLength
Sets the maximum edge length for fills of theTLspShapeDiscretizationParameters
to build.- Parameters:
aMaxEdgeLength
- the given maximum edge length for fills- Returns:
this
-
styles
Sets the styles of theTLspShapeDiscretizationParameters
to build.- Parameters:
aStylesList
- the given styles- Returns:
this
-
bufferCapsPrecision
Sets the precision forILcdGeoBuffer
s 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 providedTLspShapeDiscretizationParameters
instance.- Parameters:
aParams
- the providedTLspShapeDiscretizationParameters
instance.- Returns:
this
-
modelXYZWorldTransformation
public TLspShapeDiscretizationParameters.Builder modelXYZWorldTransformation(ILcdModelXYZWorldTransformation aTransformation) Sets a customILcdModelXYZWorldTransformation
to be used by the shape discretizer. By default this transformation is set tonull
. In this case the shape discretizer uses theILcdModelXYZWorldTransformation
instance provided by the givenTLspContext
.- Parameters:
aTransformation
- the customILcdModelXYZWorldTransformation
to be used by the shape discretizer.- Returns:
this
-
build
Creates a newTLspShapeDiscretizationParameters
instance with settings derived from this builder.- Returns:
- a new
TLspShapeDiscretizationParameters
instance
-