bevy_math

Module primitives

Source
Expand description

This module defines primitive shapes. The origin is (0, 0) for 2D primitives and (0, 0, 0) for 3D primitives, unless stated otherwise.

Structs§

  • A primitive shape formed by the region between two circles, also known as a ring.
  • A primitive representing an arc between two points on a circle.
  • A polygon with a variable number of vertices, allocated on the heap in a Box<[Vec2]>.
  • A series of connected line segments in 2D space, allocated on the heap in a Box<[Vec2]>.
  • A series of connected line segments in 3D space, allocated on the heap in a Box<[Vec3]>.
  • A 2D capsule primitive, also known as a stadium or pill shape.
  • A 3D capsule primitive centered on the origin A three-dimensional capsule is defined as a surface at a distance (radius) from a line
  • A circle primitive, representing the set of points some distance from the origin
  • A primitive representing a circular sector: a pie slice of a circle.
  • A primitive representing a circular segment: the area enclosed by the arc of a circle and its chord (the line between its endpoints).
  • A cone primitive centered on the midpoint between the tip of the cone and the center of its base.
  • A conical frustum primitive. A conical frustum can be created by slicing off a section of a cone.
  • A convex polygon with N vertices.
  • A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not required to be the same.
  • A cylinder primitive centered on the origin
  • An ellipse primitive, which is like a circle, but the width and height can be different
  • A 3D shape representing an extruded 2D base_shape.
  • An unbounded plane in 3D space. It forms a separating surface through the origin, stretching infinitely far
  • An infinite line going through the origin along a direction in 2D space.
  • An infinite line going through the origin along a direction in 3D space.
  • An unbounded plane in 2D space. It forms a separating surface through the origin, stretching infinitely far
  • A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.
  • A polygon with N vertices.
  • A series of connected line segments in 2D space.
  • A series of connected line segments in 3D space.
  • A rectangle primitive, which is like a square, except that the width and height can be different
  • A polygon centered on the origin where all vertices lie on a circle, equally far apart.
  • A rhombus primitive, also known as a diamond shape. A four sided polygon, centered on the origin, where opposite sides are parallel but without requiring right angles.
  • A segment of a line going through the origin along a direction in 2D space.
  • A segment of a line going through the origin along a direction in 3D space.
  • A sphere primitive, representing the set of all points some distance from the origin
  • A tetrahedron primitive.
  • A torus primitive, often representing a ring or donut shape The set of points some distance from a circle centered at the origin
  • A triangle in 2D space
  • A 3D triangle primitive.

Enums§

Traits§