gfm.math.shapes

This module implements some abstract geometric shapes:

  • Line segments.
  • Triangle.
  • Circles/spheres.
  • Rays
  • Planes
  • Frustum

Members

Aliases

DimensionType
alias DimensionType(T : Segment!U, U...) = U[0]
alias DimensionType(T : Triangle!U, U...) = U[0]
alias DimensionType(T : Sphere!U, U...) = U[0]
alias DimensionType(T : Ray!U, U...) = U[0]
alias DimensionType(T : Plane!U, U) = U
alias DimensionType(T : Frustum!U, U) = U

Get the numeric type used to measure a shape's dimensions.

Structs

Frustum
struct Frustum(T)

3D frustum.

Plane
struct Plane(T)

3D plane.

Ray
struct Ray(T, int N)

A Ray ir a point + a direction.

Segment
struct Segment(T, int N)

A Segment is 2 points. When considered like a vector, it represents the arrow from a to b.

Sphere
struct Sphere(T, int N)

A Sphere is a point + a radius.

Triangle
struct Triangle(T, int N)

A Triangle is 3 points.

Meta