vcgQEdecim: Performs Quadric Edge Decimation on triangular meshes.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/vcgQEdecim.r

Description

Decimates a mesh by adapting the faces of a mesh either to a target face number, a percentage or an approximate mesh resolution (a.k.a. mean edge length

Usage

1
2
3
4
vcgQEdecim(mesh, tarface = NULL, percent = NULL, edgeLength = NULL,
  topo = FALSE, quality = TRUE, bound = FALSE, optiplace = TRUE,
  scaleindi = TRUE, normcheck = FALSE, qweightFactor = 100,
  qthresh = 0.3, boundweight = 1, normalthr = pi/2, silent = FALSE)

Arguments

mesh

Triangular mesh of class "mesh3d"

tarface

Integer: set number of target faces.

percent

Numeric: between 0 and 1. Set amount of reduction relative to existing face number. Overrides tarface argument.

edgeLength

Numeric: tries to decimate according to a target mean edge length. Under the assumption of regular triangles, the edges are half as long by dividing the triangle into 4 regular smaller triangles.

topo

logical: if TRUE, mesh topology is preserved.

quality

logical: if TRUE, vertex quality is considered.

bound

logical: if TRUE, mesh boundary is preserved.

optiplace

logical: if TRUE, mesh boundary is preserved.

scaleindi

logical: if TRUE, decimatiion is scale independent.

normcheck

logical: if TRUE, normal directions are considered.

qweightFactor

numeric: >= 1. Quality range is mapped into a squared 01 and than into the 1 - QualityWeightFactor range.

qthresh

numeric: Quality threshold for decimation process.

boundweight

numeric: Weight assigned to mesh boundaries.

normalthr

numeric: threshold for normal check in radians.

silent

logical, if TRUE no console output is issued.

Details

This is basically an adaption of the cli tridecimator from vcglib

Value

Returns a reduced mesh of class mesh3d.

Author(s)

Stefan Schlager

See Also

vcgSmooth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(humface)
##reduce faces to 50% 
decimface <- vcgQEdecim(humface, percent=0.5)
## view
## Not run: 
require(rgl)
shade3d(decimface, col=3)

## some light smoothing
decimface <- vcgSmooth(decimface,iteration = 1)

## End(Not run) 

zarquon42b/Rvcg documentation built on Jan. 17, 2019, 9:10 a.m.