BuildingOptions
Description
Set of options for ShapeExtruderTexture.Building.
The building side texture is assumed to be a seamlessly tiled image of a building front, usually having a repetitive pattern of one or more windows / stories, for example:
#|^^^^^^^^^^^^|##|^^^^^^^^^^^^|##|^^^^^^^^^^^^|# \ #| |##| |##| |# | #| .----. |##| .----. |##| .----. |# | #| | | |##| | | |##| | | |# | Vertical #| | #1 | |##| | #2 | |##| | #3 | |# | Repetition #| |____| |##| |____| |##| |____| |# | #| |##| |##| |# | #|____________|##|____________|##|____________|# / #|^^^^^^^^^^^^|##|^^^^^^^^^^^^|##|^^^^^^^^^^^^|# #| |##| |##| |# #| .----. |##| .----. |##| .----. |# #| | | |##| | | |##| | | |# #| | #4 | |##| | #5 | |##| | #6 | |# #| |____| |##| |____| |##| |____| |# #| |##| |##| |# #|____________|##|____________|##|____________|# \______________/ \__/ Horizontal Repetition Fill
The SideSize option scales the texture to model-space. The image X-axis / texture U-axis points along contour of the extrusion polygon (see IShape.ContourStart), where the left image border is mapped to the first vertex of each contour. The image Y-axis / texture V-axis points downwards, i.e. from RangeD.End of the extrusion range to RangeD.Start (which is mapped to the bottom image border). The SideRepeat option specifies the repetitions of the pattern (in this example, 3 and 2). This information is used to snap texture coordinates, so that only full repetitions are visible vertically and horizontally for each building edge.
Public / Attributes
SideAngle
The maximum angle (in degrees) between two consecutive shape edges that will be tolerated while merging edges, before applying the texture repetitions.
Will be clamped to 0
. Set to 0
to disable edge merging. Defaults to 0
.
SideFill
The width of the texture area (given in normalized texture coordinates) which shall be used to fill very short shape edges.
Will be clamped to 0
before use. Set to 0
to disable. Defaults to 0
.
- See also
SideFillAdjust
Optional coefficient that controls detection of very short shape edges.
Values greater than 1
detect short edges more aggressively, values less than 1
detect short edges in a more lenient way. Will be clamped to 0
before use. Defaults to 1
.
- See also
SideOffset
Optional offset to apply to texture coordinates.
Use this to shift tiled images, if repetitions straddle the image borders. Defaults to Vec2F.Zero.
SideRepeat
The tiling repetition count of the building side texture, along its X- and Y-axes.
Will be clamped to (1,1) before use. Defaults to (1,1).
SideSize
The size of the tiled building side texture, given in the length unit of the extrusion model.
If Vec2D.Zero, no texture coordinates will be generated for the sides of the extrusion model, see IShapeExtruder.Sides. For negative sizes, the respective texture axis will be flipped. Defaults to Vec2D.Zero.
TopMatrix
Optional matrix to use for transforming the shape vertex coordinates, before applying texturing.
Set to Mat2D.Zero or Mat2D.Identity to disable the transformation. Defaults to Mat2D.Zero.
TopSize
Size of the tiled building top texture, given in the length unit of the extrusion model.
If Vec2D.Zero, no texture coordinates will be generated for the caps of the extrusion model, see IShapeExtruder.CapStart and IShapeExtruder.CapEnd. Defaults to Vec2D.Zero.