# Primitives

Meshes.PrimitiveType
Primitive{Dim,T}

We say that a geometry is a primitive when it can be expressed as a single entity with no parts (a.k.a. atomic). For example, a sphere is a primitive described in terms of a mathematical expression involving a metric and a radius. See https://en.wikipedia.org/wiki/Geometric_primitive.

source
Meshes.RayType
Ray(p, v)

A ray originating at point p, pointed in direction v. It can be called as r(t) with t > 0 to cast it at p + t * v.

source
Meshes.PlaneType
Plane(p₀, v, w)

A plane coincident with point p₀, defined by non-parallel vectors v and w. It can be called as p(s, t) with numeric parameters s and t to cast it at p₀ + s*v + t*w.

source
Meshes.BoxType
Box(min, max)

An axis-aligned box with min and max corners. See https://en.wikipedia.org/wiki/Hyperrectangle.

Example

Box(Point(0,0,0), Point(1,1,1)) # unit cube
source
Meshes.CylinderType
Cylinder(start, finish, radius)

A right circular cylinder with start and finish points, and radius of revolution. See https://en.wikipedia.org/wiki/Cylinder.

source