Skip to content

Commit af4466b

Browse files
committed
export
1 parent 4c9a32f commit af4466b

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
export(plot)
44
export(plot_xyzrgb)
55
importClassesFrom(lidR,LAS)
6+
importFrom(Rcpp,evalCpp)
7+
useDynLib(lidRviewer, .registration = TRUE)

R/RcppExports.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
22
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
33

4-
lidRviewer <- function(df) {
5-
invisible(.Call('_lidRviewer_lidRviewer', PACKAGE = 'lidRviewer', df))
4+
viewer <- function(df) {
5+
invisible(.Call(`_lidRviewer_viewer`, df))
66
}
77

R/plot.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#' @export
1010
#' @method plot LAS
1111
#' @importClassesFrom lidR LAS
12+
#' @useDynLib lidRviewer, .registration = TRUE
13+
#' @importFrom Rcpp evalCpp
1214
setGeneric("plot", function(x, y, ...) standardGeneric("plot"))
1315

1416
#' @rdname plot
@@ -19,7 +21,7 @@ setMethod("plot", signature(x = "LAS", y = "missing"), function(x, y, ...)
1921

2022
plot.LAS <- function(x, y, ...)
2123
{
22-
lidRviewer(x@data)
24+
viewer(x@data)
2325
}
2426

2527
#' @aliases plot
@@ -77,5 +79,5 @@ plot_xyzrgb <- function(x, y, z, r, g, b, id = NULL, size = 4)
7779
message("Point cloud viewer must be closed before to run other R code")
7880

7981
df = data.frame(X = x, Y = y, Z = z, R = r, G = g, B = b)
80-
lidRviewer(df)
82+
viewer(df)
8183
}

src/RcppExports.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
1010
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
1111
#endif
1212

13-
// lidRviewer
14-
void lidRviewer(DataFrame df);
15-
RcppExport SEXP _lidRviewer_lidRviewer(SEXP dfSEXP) {
13+
// viewer
14+
void viewer(DataFrame df);
15+
RcppExport SEXP _lidRviewer_viewer(SEXP dfSEXP) {
1616
BEGIN_RCPP
1717
Rcpp::RNGScope rcpp_rngScope_gen;
1818
Rcpp::traits::input_parameter< DataFrame >::type df(dfSEXP);
19-
lidRviewer(df);
19+
viewer(df);
2020
return R_NilValue;
2121
END_RCPP
2222
}
2323

2424
static const R_CallMethodDef CallEntries[] = {
25-
{"_lidRviewer_lidRviewer", (DL_FUNC) &_lidRviewer_lidRviewer, 1},
25+
{"_lidRviewer_viewer", (DL_FUNC) &_lidRviewer_viewer, 1},
2626
{NULL, NULL, 0}
2727
};
2828

src/lidRviewer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const float zFar = 100000;
55
const Uint32 time_per_frame = 1000 / 30;
66

77
// [[Rcpp::export]]
8-
void lidRviewer(DataFrame df)
8+
void viewer(DataFrame df)
99
{
1010
bool run = true;
1111

0 commit comments

Comments
 (0)