IShapeRasterizer

Description

interface Tinman.Terrain.Shapes.IShapeRasterizer
<T in ref : ISampleBufferBase>

Extended by

ShapeRasterizer abstract

Base interface for classes that rasterize vector shapes.

Public / Methods

Range

2 overloads


public method Range1 → ()

returns → RangeD

The distance value range.

Returns the distance value range that will be used by shape rasterizers.


public method Range2 → (1)

target in : T

[not-null]
The target sample buffer.

returns → RangeD

The distance value range for the given sample buffer.

Returns the distance value range that will be used by shape rasterizers.

Rasterize


public method Rasterize → (6)

target in : T

[not-null]
The target sample buffer.

bounds opt : Box2D = default(Box2D)

The bounds of the target sample buffer, in the input coordinate system:
Box2D.X1 and Box2D.Y1 refer to the top-left corner of the top-left sample in target in, and Box2D.X2 and Box2D.Y2 refer to the bottom-right corner of the bottom-right sample. When target in has PixelCoverage.PixelIsPoint coverage (see coverage opt), the top-left and bottom-right corners of a sample coincide. If bounds opt is empty (see Box2D.IsEmpty) , the visible shape bounds will be used (see IShape.VisibleBounds).

scale opt : float64 = 1

Scale factor that will be applied to shape distance values (see IShape.DistanceTo1), before using them for rasterization. If applicable, this scale factor should include the scaling from the output coordinate system to the input coordinate system.

coverage opt : PixelCoverage = PixelCoverage.PixelIsArea

The coverage semantic of the samples if target in.

face opt : CubemapFace = CubemapFace.None

The cubemap face. This is only relevant for cubemap shapes (see ShapeType.Cube) and will be ignored for other shape types.

transform opt : ITransform2D = null

Specifies an optional coordinate transformation to apply during rasterization:
If null, the input and output coordinate systems are both equivalent to the shape coordinate system (see IShapeInfo.Georef) and thus identical.
If not null, points in the input coordinate system (see bounds opt) will be passed to ITransform2D.TransformCoordinates and the returned points will be interpreted in the output coordinate system, which is equivalent to the shape coordinate system.

returns → bool

true if target in has been updated with rasterized samples, false if bounds opt did not intersect the shape.

Rasterizes this shape.

Public / Attributes

Color​Ramp


public attribute ColorRamp → (get)

value : IColorRamp

The color ramp or null if this rasterizer does not use a color ramp.

Returns the color ramp that this rasterizer is using.

Factory


public attribute Factory → (get)

value : IShapeRasterizerFactory<T>

[not-null]
The factory.

The factory that has created this shape rasterizer.

Has​Exterior


public attribute HasExterior → (get)

value : bool

true if this rasterizer produces exterior samples,
false if all interior samples are empty.

Does this rasterizer compute samples for distances that are greater than RangeD.End of Range?

Has​Interior


public attribute HasInterior → (get)

value : bool

true if this rasterizer produces interior samples,
false if all interior samples are empty.

Does this rasterizer compute samples for distances that are less than RangeD.Start of Range?