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

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

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.

Value

A data.table with the rotation applied to cloud.

Details

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

Author

J. Antonio Guzmán Q.

Examples


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