mesh_translate_it: Translate vertex IDs to coordinates in the mesh triangle...

View source: R/transMeshIT.R

mesh_translate_itR Documentation

Translate vertex IDs to coordinates in the mesh triangle definitions

Description

Translates triangle definitions (mesh3d$it) to a dataframe containing vertex coordinates instead of vertex IDs.

Usage

mesh_translate_it(mesh)

Arguments

mesh

mesh3d, or mesh3d-like object

Value

data.frame object

Note

Only the first three rows of the mesh3d$it and mesh3d$vb matrices are used at the moment. For each row in the mesh3d$it matrix, which contains a list of column IDs from the mesh3d$vb matrix, three columns are created, in input order, for a total of 9 columns. These columns contain the row data from the mesh3d$vb matrix for the specified columns. Note that value types are not modified (e.g. double in the input == double in the output)

Examples

data(demoSphere)
coords <- mesh_translate_it(demoSphere)
head(coords)

cornelmpop/Lithics3D documentation built on Feb. 10, 2024, 11:54 p.m.