imath_rotate_point: Rotate Point

View source: R/api.R

imath_rotate_pointR Documentation

Rotate Point

Description

This rotates a point around the origin at the angles specified. This function is primarily just included as an example of integrating the Imath library into a package. See imath-info.cpp in the source for the corresponding C++ code.

Usage

imath_rotate_point(point, angles)

Arguments

point

A length-3 numeric vector (x, y, z)

angles

A length-3 numeric vector (rotation angles in radians)

Value

The rotated point as an R numeric vector

Examples

# This rotates a point around an angle.
point = c(1.0, 0.0, 0.0)
angles = c(0.0, pi/4, 0.0)
imath_rotate_point(point, angles)

libimath documentation built on Feb. 22, 2026, 5:08 p.m.