tida.shape

This module describes shapes for drawing, checking and other things related to the work of shapes.

Forms are of the following types: * Unknown - Forms are of the following types: * Point - Dot. The simplest of the simplest forms. Only origin parameters are valid. * line - More complex form. Has the origin and the end of the coordinates of its two points. By default, this is a line. * 'rectangle' - Rectangle shape. By default, such a rectangle is considered to be solid. * circle - Circle shape. By default, it is considered to be solid. * triangle - Triangle shape. It is believed to be solid. * multi - A shape that combines several shapes, which will eventually give a single shape. Here you can, for example, create a non-solid polygon:

/*
    Such a rectangle can also be created using the function
    `Shape.RectangleLine(begin,end)`.
*/
auto rectangle_nonSolid = Shape.Multi([
    Shape.Line(Vecf(0,0),Vecf(32,0)),
    Shape.Line(Vecf(32,0),Vecf(32,32)),
    Shape.Line(Vecf(0,0),Vecf(0,32)),
    Shape.Line(Vecf(0,32),Vecf(32,32))
], Vecf(0,0));

All such types are specified in enum ShapeType.

Members

Aliases

Shapef
alias Shapef = Shape!float
Undocumented in source.

Enums

ShapeType
enum ShapeType

Shape type.

Functions

rectVertexs
Shape!T rectVertexs(Vector!T[] vertexArray)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Shape
struct Shape(T : float)

Figure description structure.

Templates

isShape
template isShape(T)

Checks if the given type is a shape

isShapeFloatingPoint
template isShapeFloatingPoint(T)

Checks if the shape is float.

isShapeIntegral
template isShapeIntegral(T)

Checks if the shape is integers.

Meta

Authors

License