Primitives
Abstract
Meshes.Primitive
— TypePrimitive{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.
Concrete
Meshes.Line
— TypeMeshes.Ray
— TypeRay(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
.
Meshes.Plane
— TypePlane(p, u, v)
A plane embedded in R³ passing through point p
, defined by non-parallel vectors u
and v
.
Plane(p, n)
Alternatively specify point p
and a given normal vector n
to the plane.
Meshes.Box
— TypeBox(min, max)
An axis-aligned box with min
and max
corners. See https://en.wikipedia.org/wiki/Hyperrectangle.
Examples
Box(Point(0,0,0), Point(1,1,1)) # unit cube
Meshes.Cylinder
— TypeCylinder(radius, bottom, top)
A solid circular cylinder embedded in R³ with given radius
, delimited by bottom
and top
planes.
Cylinder(radius, segment)
Alternatively, construct a right circular cylinder with given radius
and segment
between origin of bottom
and top
planes.
Cylinder(radius)
Finally, construct a right vertical circular cylinder with given radius
.
See https://en.wikipedia.org/wiki/Cylinder.
Meshes.Ball
— TypeMeshes.Sphere
— Type