PixelPyramidShape

Description

sealed class Tinman.Terrain.Pyramids.PixelPyramidShape

A 2D vector shape for on-the-fly rasterization with a IPixelPyramidShape.

Shape distance scale factors and offset values that may be specified for rasterization (see Rasterize* methods) must be given in pyramid tile pixels, independently of the coordinate system of map shapes.

Public / Constructors

For


public static method For → (2)

shape in : IShape

[not-null]
The vector shape.

layer opt : int32 = 0

The shape layer (see IMapShape.Layer).

returns → PixelPyramidShape

The pixel pyramid shape.

Creates a new instance of PixelPyramidShape.

Public / Methods

Ground​Sample​Distance​From


public method GroundSampleDistanceFrom → (1)

groundSampleDistance in : float64

The start value of the ground sample distance range, in metres. The end value will be set to Maths.MaxDouble.

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Sets the ground sample distance range (see GroundSampleDistance).

Ground​Sample​Distance​Set


public method GroundSampleDistanceSet → (1)

groundSampleDistance in : RangeD

The ground sample distance range, in metres.

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Sets the ground sample distance range (see GroundSampleDistance).

Ground​Sample​Distance​To


public method GroundSampleDistanceTo → (1)

groundSampleDistance in : float64

The end value of the ground sample distance range, in metres. The start value will be set to 0.

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Sets the ground sample distance range (see GroundSampleDistance).

Level​From


public method LevelFrom → (1)

from in : int32

The minimum level (inclusive).

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Set the minimum pyramid level (see Levels).

Level​Range

2 overloads


public method LevelRange1 → (1)

range in : RangeI

The levels.

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Set the pyramid levels (see Levels).


public method LevelRange2 → (2)

from in : int32

The minimum level (inclusive).

to in : int32

The maximum level (inclusive).

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Set the pyramid levels (see Levels).

Level​To


public method LevelTo → (1)

to in : int32

The maximum level (inclusive).

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Set the maximum pyramid level (see Levels).

Rasterize

4 overloads


public method Rasterize1 → ()

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Set a rasterizer via Shape.RasterizerFactory4 that uses Colors.White for the inside of the shape and Colors.Opaque0 for the outside of the shape.


public method Rasterize2 → (5)

colorRamp in : IColorRamp

[not-null]
The color ramp to use.

color opt : int64 = Colors.White

The modulate color (see IColorRamp.Modulate).

offset opt : float64 = 0

The distance offset value (see IColorRamp.Transform).

scale opt : float64 = 1

The distance scale factor (see IColorRamp.Transform).

mode opt : ColorOp = ColorOp.Blend

The color mode.

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Set a rasterizer via Shape.RasterizerFactory4, using the given settings.


public method Rasterize3 → (6)

colorRamp in : IColorRamp

[not-null]
The color ramp to use.

lineStipple in : LineStipple

The line stipple pattern.

color opt : int64 = Colors.White

The modulate color (see IColorRamp.Modulate).

offset opt : float64 = 0

The distance offset value (see IColorRamp.Transform).

scale opt : float64 = 1

The distance scale factor (see IColorRamp.Transform).

mode opt : ColorOp = ColorOp.Blend

The color mode.

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Set a rasterizer via Shape.RasterizerFactory4, using the given settings.


public method Rasterize4 → (2)

rasterizer in : IShapeRasterizerFactory<ColorBuffer>

[not-null]
The rasterizer to use.

mode opt : ColorOp = ColorOp.Blend

The color mode.

returns → PixelPyramidShape

The resulting pixel pyramid shape.

Sets the rasterizer (see ShapeRasterizer) to use for this shape.

Public / Attributes

Ground​Sample​Distance


public attribute GroundSampleDistance → (get)

value : RangeD

The ground sample distance range, in metres.

Limits the visibility of this shape to pyramid tiles that have an intersecting range of ground sample distance values.

Defaults to RangeD.Max.

Levels


public attribute Levels → (get)

value : RangeI

The pyramid level range.

The range of pyramid levels (see IPyramidBase.Levels) on which the shape shall be visible.

By default, the shape will be visible on all pyramid levels.

Mode


public attribute Mode → (get)

value : ColorOp

The color operation.

The color operation to use for combining the rasterized shape pixels with the current buffer contents.

Defaults to ColorOp.Blend.

Rasterizer


public attribute Rasterizer → (get)

value : IShapeRasterizer<ColorBuffer>

The current rasterizer or null.

The shape rasterizer.

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<PixelPyramidShape>

[not-null]
The configurator object.

The configurator object for this type.