Learn R Programming

rTLS (version 0.2.5.6)

rotate3D: Rotate a Point Cloud

Description

Rotate point cloud based on the roll, pitch, and yaw angles.

Usage

rotate3D(cloud, roll = 0, pitch = 0, yaw = 0, threads = 1)

Value

A data.table with the rotation applied to cloud.

Arguments

cloud

A data.table with three columns describing the *XYZ* coordinates of a point cloud.

roll

A numeric vector describing the degrees of rotation angles for roll (*X*).

pitch

A numeric vector describing the degrees of rotation angles for pitch (*Y*).

yaw

A numeric vector describing the degrees of rotation angles for yaw (*Z*). for the roll, pitch, and yaw.

threads

An integer specifying the number of threads to use. Experiment to see what works best for your data on your hardware.

Author

J. Antonio Guzmán Q.

Details

The *XYZ* coordinates are transformed to E-N-U coordinates (ENU system, East-North-Up).

Examples

Run this code

data(pc_tree)
rgl::plot3d(pc_tree)
rgl::plot3d(rotate3D(pc_tree, roll = 45, pitch = 45, yaw = 0))

Run the code above in your browser using DataLab