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
Provides a range of Area
s, from a minimum area to a maximum area.
Provides a range of Count
s, from a minimum count to a maximum count.
Inverts the Containment
and intersection of the contained PlacedShape
.
Contains a slice of PlacedShape
and implements PlacedShape
for the collection.
A position on a cartesian coordinate system.
Provides a range of Position
s, 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 Size
s, 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
.
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.
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
.
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 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
.