Crate dungen_minion_geometry[][src]

Expand description

Defines various geometry enums, structs, traits, and types for the dungen_minion crate. As such, dungen_minion_geometry is not suitable as a general geometry crate.

As the purpose of this crate is to provide data types for dungen_minion and dungen_minion’s other dependent crates to consume, the data types are defined here, while their general usages are defined in those other crates.

Structs

Defines an Area by a Position and Size.

Provides a range of Areas, from a minimum area to a maximum area.

Provides a range of Counts, from a minimum count to a maximum count.

Inverts the Containment and intersection of the contained PlacedShape.

Defines an oval by a Position and Size.

Contains a slice of PlacedShape and implements PlacedShape for the collection.

A position on a cartesian coordinate system.

Provides a range of Positions, from a start position to an end position.

Iterates all valid local positions of a Shape.

Defines a Size with the given height and width, in Length units.

Provides a range of Sizes, from a minimum size to a maximum size.

Enums

Defines a direction on a cartesian plane where each direction is an orthogonal, and cardinal, 90-degree vector.

Defines rotation on a cartesian plane where each rotation is constructed out of 90-degree angles.

An enum that specifies the intersection of two shapes to a more precise level of detail.

Defines whether something is included.

Traits

Defines a containment operation between an instance and a local Position.

Defines a containment operation between an instance and a Position.

Defines a type that has an Area, but is not necessarily itself an Area (see IsArea).

The trait for objects which have a bottom coordinate.

The trait for objects which have a height.

The trait for objects which have a left coordinate.

Defines a type that has a Position, but is not necessarily itself a Position (see IsPosition).

The trait for objects which have a right coordinate.

Defines a type that has a Size, but is not necessarily itself a Size (see IsSize).

The trait for objects which have a top coordinate.

The trait for objects which have a width.

Defines an intersection operation between an instance and a local Position.

Defines an intersection operation between this instance and a PlacedShape.

Defines an intersection operation between an instance and a Position.

Defines an intersection operation between this instance and a Shape at a specific Position.

IsArea is defined as both HasPosition, HasSize, and IsSize.

Designates that the type is definable as a position

Designates that the type is definable as a size.

Defines a something that has been Placed at a Position.

Defines a generic object that has an Area and has been Placed at a Position.

Defines a 2D tile-based shape with a Position.

A trait for any type that can provide a Area when queried.

A trait for any type that can provide a Size when queried.

A trait for any type that can provide a PlacedShape when queried.

A trait for any type that can provide a Position when queried.

A trait for any type that can provide a Shape when queried.

A trait for any type that can provide a Size when queried.

Defines a 2D tile-based shape that does not have a Position.

Type Definitions

A coordinate, or a component of a coordinate or coordinate system. Coord can be a negative, zero, or positive integer.

An unsigned integer equal to usize, and specifically used to count the number of “things”.

Defines a distance. As such, Length can be zero, or a positive integer.