% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/brain-mesh.R
\name{resolve_brain_mesh}
\alias{resolve_brain_mesh}
\title{Resolve brain surface mesh}
\usage{
resolve_brain_mesh(
  hemisphere = c("lh", "rh"),
  surface = c("inflated", "semi-inflated", "white", "pial", "sphere", "smoothwm", "orig"),
  brain_meshes = NULL
)
}
\arguments{
\item{hemisphere}{`"lh"` or `"rh"`}

\item{surface}{Surface type: `"inflated"`, `"semi-inflated"`, `"white"`,
`"pial"`, `"sphere"`, `"smoothwm"`, `"orig"`}

\item{brain_meshes}{Optional user-supplied mesh data. Passed through to
[ggseg.formats::get_brain_mesh()] for format details.}
}
\value{
list with vertices (data.frame with x, y, z) and faces
  (data.frame with i, j, k), or NULL if mesh not found
}
\description{
Resolves and prepares a brain surface mesh for rendering. Delegates to
[ggseg.formats::get_brain_mesh()] for inflated surfaces and to
[ggseg.meshes::get_cortical_mesh()] for pial, white, semi-inflated, and
other surfaces. Returned meshes use the shared anatomical axis convention
(`x` = left-right, `y` = anterior-posterior, `z` = superior-inferior) with
`lh` positioned at `x <= 0` and `rh` at `x >= 0`, medial edges meeting at
the midline (`x = 0`).
}
\examples{
mesh <- resolve_brain_mesh("lh", "inflated")
str(mesh, max.level = 1)

}
