IShapeExtruderTexture

Description

interface Tinman.Engine.Models.IShapeExtruderTexture

Extended by

ShapeExtruderTexture abstract

Base interface for classes that compute texture coordinates for IModel objects that are built by a IShapeExtruder.

Public / Methods

Clear


public method Clear → ()

This method is called after IShapeExtruder.Extrude has finished.

Implementations may perform cleanup and discard temporary data here.

Prepare


public method Prepare → (4)

shape in : IShape

[not-null]
The shape, as passed to IShapeExtruder.Extrude.

vertical in : RangeD

The extrusion range, as passed to IShapeExtruder.Extrude.

caps in : bool

Need to generate texture coordinates for the caps, i.e. will TextureCap be called?

sides in : bool

Need to generate texture coordinates for the extruded silhouette, i.e. will TextureSide be called?

Performs preparations for computing texture coordinates for the given shape in.

Texture​Cap


public method TextureCap → (2)

vertex in : Vec2D

The shape vertex, see IShape.VertexAt.

vertical in : float64

The vertical coordinate within the extrusion range.

returns → Vec2F

The computed texture coordinates.

Computes the texture coordinates of the given shape vertex for a face of a cap.

Texture​Side


public method TextureSide → (5)

vertex0 in : Vec2D

The first shape vertex of the shape edge, see IShape.EdgeAt.

vertex1 in : Vec2D

The second shape vertex of the shape edge, see IShape.EdgeAt.

vertical in : float64

The vertical coordinate within the extrusion range.

texCoords0 out : Vec2F

The generated texture coordinates for vertex0 in.

texCoords1 out : Vec2F

The generated texture coordinates for vertex1 in.

Computes the texture coordinates of the given shape edge for a face of a side.