Module pix_engine::shape

source ·
Expand description

Shape methods for drawing.

Methods for drawing and interacting with shapes such as points, lines, rectangles, etc.

Provided traits:

Provided PixState methods;

Modules

  • A shape type representing circles and ellipses used for drawing.
  • A shape type representing lines used for drawing.
  • A N-dimensional shape type representing geometric points used for drawing.
  • A shape type representing quadrilaterals used for drawing.
  • A shape type representing squares and rectangles used for drawing.
  • A shape type representing spheres used for drawing.
  • A shape type representing triangles used for drawing.

Macros

  • Constructs a circle Ellipse at position (x, y) with radius.
  • Constructs an Ellipse at position (x, y) with width and height.
  • Constructs a Line with two points.
  • Constructs a Point with N coordinates.
  • Constructs a Quad with four points.
  • Constructs a Rect at position (x, y) with width and height.
  • Constructs a Sphere at position (x, y, z) with radius.
  • Constructs a square Rect at position (x, y) with the same width and height.
  • Constructs a Triangle with three points.

Structs

  • An Ellipse positioned at (x, y), with width and height. A circle is an Ellipse where width and height are equal.
  • A Line with start and end Points.
  • A Point in N-dimensional space.
  • A Quad or quadrilateral, a four-sided polygon.
  • A Rectangle positioned at (x, y) with width and height. A square is a Rectangle where width and height are equal.
  • A Sphere positioned at (x, y, z) with radius.
  • A Triangle with three Points.

Traits

  • Trait for shape containing operations.
  • Trait for shape intersection operations.