% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geodesic.R
\name{ensure.tmesh3d}
\alias{ensure.tmesh3d}
\title{Ensure the mesh is a tmesh3d instance. Will convert fs.surfaces to one automatically.}
\usage{
ensure.tmesh3d(mesh)
}
\arguments{
\item{mesh}{whatever, but hopefully an \code{rgl::tmesh3d} or \code{freesurferformats::fs.surface} instance. Can be a character string, which will be loaded as a surface file if it exists.}
}
\value{
tmesh3d instance, the input or converted from the input.
}
\description{
Ensure the mesh is a tmesh3d instance. Will convert fs.surfaces to one automatically.
}
\note{
This function will stop if the mesh cannot be converted to tmesh3d.
}
\keyword{internal}
