Planet v0.1.1 GEOF.Planet.Geometry.Mesh

Functions for translating a Planet’s geometry into an ordinary 3D solid.

Link to this section Summary

Types

The payload given to the 3D environment

Maps flattened Field indexes to the vertex index

Functions

Produces a mesh with a polygon for each field. Deprecated outside of testing and examples

Produces a mesh with a polygon for each field. Vertices are copied for each polygon

Link to this section Types

Link to this type mesh()
mesh() :: [
  position: [float(), ...],
  normal: [float(), ...],
  index: [non_neg_integer(), ...],
  vertex_order: vertex_order()
]

The payload given to the 3D environment.

Link to this type vertex_order()
vertex_order() :: %{optional(non_neg_integer()) => non_neg_integer()}

Maps flattened Field indexes to the vertex index.

Link to this section Functions

Link to this function poly_per_field(divisions)
poly_per_field(GEOF.Planet.Sphere.divisions()) :: mesh()

Produces a mesh with a polygon for each field. Deprecated outside of testing and examples.

Produces a mesh with a polygon for each field. Vertices are copied for each polygon.