Skip to content

Commit

Permalink
added option silent for vcgImport, vcgIsolated, vcgQEdecim and vcgUpd…
Browse files Browse the repository at this point in the history
…ateNormals.
  • Loading branch information
zarquon42b committed Sep 18, 2014
1 parent d9138e8 commit 1cf6f27
Show file tree
Hide file tree
Showing 18 changed files with 1,397 additions and 124 deletions.
5 changes: 3 additions & 2 deletions R/vcgImport.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#' vertex normals will be (re)calculated. Otherwise, normals will be a matrix containing zeros.
#' @param readcolor if TRUE, vertex colors and texture (face and vertex) coordinates will be processed - if available, otherwise all vertices will be colored white.
#' @param clean if TRUE, duplicated and unreferenced vertices as well as duplicate faces are removed (be careful when importing point clouds).
#' @param silent logical, if TRUE no console output is issued.
#' @note currently only meshes with either color or texture can be processed. If both are present, the function will mark the mesh as non-readable.
#' @return Object of class "mesh3d"
#'
Expand All @@ -25,7 +26,7 @@
#' @keywords ~kwd1 ~kwd2
#' @export

vcgImport <- function(file, updateNormals = TRUE, readcolor=FALSE, clean = TRUE) {
vcgImport <- function(file, updateNormals = TRUE, readcolor=FALSE, clean = TRUE,silent=FALSE) {

ncfile <- nchar(file)
ext <- substr(file,ncfile-2,ncfile)
Expand All @@ -46,7 +47,7 @@ vcgImport <- function(file, updateNormals = TRUE, readcolor=FALSE, clean = TRUE)
clean <- as.logical(clean)


tmp <- .Call("RallRead", file, updateNormals, readcolor, clean)
tmp <- .Call("RallRead", file, updateNormals, readcolor, clean, silent)
if (!is.list(tmp))
stop("mesh is not readable")
## go back to current wd
Expand Down
5 changes: 3 additions & 2 deletions R/vcgIsolated.r
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#' with the most faces is kept.
#' @param diameter numeric: all connected pieces smaller diameter are removed
#' removed. \code{diameter = 0} removes all component but the largest ones. This option overrides the option \code{facenum}.
#' @param silent logical, if TRUE no console output is issued.
#' @return returns the reduced mesh.
#' @author Stefan Schlager
#' @seealso \code{\link{vcgPlyRead}}
Expand All @@ -23,7 +24,7 @@
#'
#'
#' @export vcgIsolated
vcgIsolated <- function(mesh,facenum=NULL,diameter=NULL) {
vcgIsolated <- function(mesh,facenum=NULL,diameter=NULL,silent=FALSE) {
if (!inherits(mesh,"mesh3d"))
stop("argument 'mesh' needs to be object of class 'mesh3d'")
if (is.null(facenum))
Expand All @@ -41,7 +42,7 @@ vcgIsolated <- function(mesh,facenum=NULL,diameter=NULL) {
it <- mesh$it-1
dimit <- dim(it)[2]
dimvb <- dim(vb)[2]
tmp <- .Call("Risolated", vb, it, diameter, facenum)
tmp <- .Call("Risolated", vb, it, diameter, facenum,silent)
class(tmp) <- "mesh3d"
tmp$vb <- rbind(tmp$vb,1)
tmp$it <- tmp$it
Expand Down
5 changes: 3 additions & 2 deletions R/vcgQEdecim.r
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#' @param qthresh numeric: Quality threshold for decimation process.
#' @param boundweight numeric: Weight assigned to mesh boundaries.
#' @param normalthr numeric: threshold for normal check in radians.
#' @param silent logical, if TRUE no console output is issued.
#' @return Returns a reduced mesh of class mesh3d.
#' @author Stefan Schlager
#' @seealso \code{\link{vcgSmooth}}
Expand All @@ -42,7 +43,7 @@
#' decimface <- vcgSmooth(decimface,iteration = 1)
#' }
#' @export vcgQEdecim
vcgQEdecim <- function(mesh,tarface=NULL,percent=NULL,edgeLength=NULL, topo=FALSE,quality=TRUE,bound=FALSE, optiplace = TRUE, scaleindi = TRUE, normcheck = FALSE, safeheap =FALSE, qthresh=0.3, boundweight = 1, normalthr = pi/2)
vcgQEdecim <- function(mesh,tarface=NULL,percent=NULL,edgeLength=NULL, topo=FALSE,quality=TRUE,bound=FALSE, optiplace = TRUE, scaleindi = TRUE, normcheck = FALSE, safeheap =FALSE, qthresh=0.3, boundweight = 1, normalthr = pi/2,silent=FALSE)
{
if (!inherits(mesh,"mesh3d"))
stop("argument 'mesh' needs to be object of class 'mesh3d'")
Expand Down Expand Up @@ -77,7 +78,7 @@ vcgQEdecim <- function(mesh,tarface=NULL,percent=NULL,edgeLength=NULL, topo=FALS
doubleparams <- c(qthresh, boundweight, normalthr)
storage.mode(doubleparams) <- "double"
###tmp <- .C("RQEdecim",vb,ncol(vb),it,ncol(it),tarface,vb,as.integer(topo),as.integer(quality),as.integer(bound))
tmp <- .Call("RQEdecim", vb, it, tarface, boolparams, doubleparams)
tmp <- .Call("RQEdecim", vb, it, tarface, boolparams, doubleparams,silent)
outmesh$vb <- rbind(tmp$vb,1)

outmesh$it <- tmp$it
Expand Down
5 changes: 3 additions & 2 deletions R/vcgUpdateNormals.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#' @param mesh triangular mesh of class 'mesh3d' or a n x 3 matrix containing 3D-coordinates.
#' @param type select the method to compute per-vertex normals: 0=area weighted average of surrounding face normals; 1 = angle weighted vertex normals.
#' @param pointcloud integer vector of length 2: containing optional parameters for normal calculation of point clouds. The first enty specifies the number of neighbouring points to consider. The second entry specifies the amount of smoothing iterations to be performed.
#' @param silent logical, if TRUE no console output is issued.
#'
#' @return mesh with updated/created normals, or in case \code{mesh} is a matrix, a list of class "mesh3d" with
#' \item{vb }{4 x n matrix containing coordinates (as homologous coordinates}
Expand All @@ -21,7 +22,7 @@
#' }
#' @export

vcgUpdateNormals <- function(mesh,type = 0, pointcloud=c(10,0))
vcgUpdateNormals <- function(mesh,type = 0, pointcloud=c(10,0), silent=FALSE)
{
if (is.matrix(mesh)) {
tmp <- list()
Expand All @@ -38,7 +39,7 @@ vcgUpdateNormals <- function(mesh,type = 0, pointcloud=c(10,0))
pointcloud <- c(10,0)
if (! type %in% c(0,1))
stop("please set valid type")
normals <- .Call("RupdateNormals", vb, it, type, pointcloud)
normals <- .Call("RupdateNormals", vb, it, type, pointcloud, silent)
mesh$normals <- rbind(normals,1)

return(mesh)
Expand Down
281 changes: 281 additions & 0 deletions config.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by RVCG configure 0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = anthro-TERRA-WS
uname -m = x86_64
uname -r = 3.13.0-35-generic
uname -s = Linux
uname -v = #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /home/schlager/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1901: checking for C++ compiler version
configure:1910: g++ --version >&5
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:1921: $? = 0
configure:1910: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
configure:1921: $? = 0
configure:1910: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:1921: $? = 4
configure:1910: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'
g++: fatal error: no input files
compilation terminated.
configure:1921: $? = 4
configure:1941: checking whether the C++ compiler works
configure:1963: g++ -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -pedantic -Wl,-Bsymbolic-functions -Wl,-z,relro conftest.cpp >&5
configure:1967: $? = 0
configure:2015: result: yes
configure:2018: checking for C++ compiler default output file name
configure:2020: result: a.out
configure:2026: checking for suffix of executables
configure:2033: g++ -o conftest -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -pedantic -Wl,-Bsymbolic-functions -Wl,-z,relro conftest.cpp >&5
configure:2037: $? = 0
configure:2059: result:
configure:2081: checking whether we are cross compiling
configure:2089: g++ -o conftest -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -pedantic -Wl,-Bsymbolic-functions -Wl,-z,relro conftest.cpp >&5
configure:2093: $? = 0
configure:2100: ./conftest
configure:2104: $? = 0
configure:2119: result: no
configure:2124: checking for suffix of object files
configure:2146: g++ -c -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -pedantic conftest.cpp >&5
configure:2150: $? = 0
configure:2171: result: o
configure:2175: checking whether we are using the GNU C++ compiler
configure:2194: g++ -c -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -pedantic conftest.cpp >&5
configure:2194: $? = 0
configure:2203: result: yes
configure:2212: checking whether g++ accepts -g
configure:2232: g++ -c -g -pedantic conftest.cpp >&5
configure:2232: $? = 0
configure:2273: result: yes
configure:2304: checking whether g++ supports C++11 features by default
configure:2330: g++ -c -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -pedantic conftest.cpp >&5
conftest.cpp:13:21: error: expected identifier before 'sizeof'
static_assert(sizeof(int) <= sizeof(T), "not big enough");
^
conftest.cpp:13:21: error: expected ',' or '...' before 'sizeof'
conftest.cpp:13:63: error: ISO C++ forbids declaration of 'static_assert' with no type [-fpermissive]
static_assert(sizeof(int) <= sizeof(T), "not big enough");
^
conftest.cpp:16:29: error: '>>' should be '> >' within a nested template argument list
typedef check<check<bool>> right_angle_brackets;
^
conftest.cpp:19:13: error: expected constructor, destructor, or type conversion before '(' token
decltype(a) b;
^
conftest.cpp:23:15: error: expected unqualified-id before '&&' token
check_type&& cr = static_cast<check_type&&>(c);
^
conftest.cpp:25:10: error: 'd' does not name a type
auto d = a;
^
configure:2330: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "RVCG"
| #define PACKAGE_TARNAME "rvcg"
| #define PACKAGE_VERSION "0.6"
| #define PACKAGE_STRING "RVCG 0.6"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| template <typename T>
| struct check
| {
| static_assert(sizeof(int) <= sizeof(T), "not big enough");
| };
|
| typedef check<check<bool>> right_angle_brackets;
|
| int a;
| decltype(a) b;
|
| typedef check<int> check_type;
| check_type c;
| check_type&& cr = static_cast<check_type&&>(c);
|
| auto d = a;
|
configure:2337: result: no
configure:2348: checking whether g++ supports C++11 features with -std=c++11
configure:2376: g++ -c -std=c++11 -pedantic conftest.cpp >&5
configure:2376: $? = 0
configure:2385: result: yes
configure:2423: checking for ISO C++ TR1 include files
configure:2449: g++ -c -std=c++11 -pedantic conftest.cpp >&5
configure:2449: $? = 0
configure:2463: result: yes
configure:2475: checking for inttypes.h
configure:2500: g++ -c -std=c++11 -pedantic conftest.cpp >&5
configure:2500: $? = 0
configure:2514: result: yes
configure:2642: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by RVCG config.status 0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status

on anthro-TERRA-WS

config.status:788: creating src/Makevars
config.status:788: creating src/config.h
config.status:958: src/config.h is unchanged

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_cxx_compiler_gnu=yes
ac_cv_cxx_stdcxx_inttypes=yes
ac_cv_cxx_stdcxx_tr1=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_objext=o
ac_cv_prog_cxx_g=yes
ax_cv_cxx_compile_cxx11=no
ax_cv_cxx_compile_cxx11__std_cpp11=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

CPPFLAGS='-pedantic'
CXX='g++'
CXXFLAGS='-std=c++11'
DEFS='-DHAVE_CONFIG_H'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
HAVE_CXX11='1'
LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='RVCG'
PACKAGE_STRING='RVCG 0.6'
PACKAGE_TARNAME='rvcg'
PACKAGE_URL=''
PACKAGE_VERSION='0.6'
PATH_SEPARATOR=':'
SHELL='/bin/bash'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "RVCG"
#define PACKAGE_TARNAME "rvcg"
#define PACKAGE_VERSION "0.6"
#define PACKAGE_STRING "RVCG 0.6"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define HAVE_CXX11 1
#define HAVE_TR1 /**/
#define HAVE_INTTYPES /**/

configure: exit 0
Loading

0 comments on commit 1cf6f27

Please sign in to comment.