R/swap_yz.R

Defines functions swap_yz

Documented in swap_yz

#' Extrude Sides of Polygon
#'
#' @keywords internal
swap_yz = function(mesh) {
  for(i in seq_along(mesh$vertices)) {
    mesh$vertices[[i]] = mesh$vertices[[i]][,c(1,3,2)]
    mesh$vertices[[i]][,1] = -mesh$vertices[[i]][,1]
  }
  # for(i in seq_along(mesh$shapes)) {
  #   mesh$shapes[[i]]$indices = mesh$shapes[[i]]$indices[,3:1]
  #   mesh$shapes[[i]]$norm_indices = mesh$shapes[[i]]$norm_indices[,3:1]
  #   mesh$shapes[[i]]$tex_indices = mesh$shapes[[i]]$tex_indices[,3:1]
  # }
  return(mesh)
}

Try the raybevel package in your browser

Any scripts or data that you put into this service are public.

raybevel documentation built on April 4, 2025, 2:42 a.m.