rotate_coord

The C++ interface for rotate wrapper for affine transformations. More...

array rotate_coord (const array &vertices, const unsigned axis, const float theta)
 

Detailed Description

The C++ interface for rotate wrapper for affine transformations.

The rotation wrapper for affine transforms takes as input the vertex array as in the transform_coord function, an axis about which to rotate the coordinates (0 = x, 1 = y, 2 = z) and the angle in radian to rotate the coordinates.

The wrapper creates a transformation matrix and computes the homogeneous transform. The array of rotated coordinates is returned.

Function Documentation

array af::rotate_coord ( const array &  vertices,
const unsigned  axis,
const float  theta 
)
Parameters
[in]verticesarray of vertices
[in]axiscoordinate axis to rotate about (0 = x, 1 = y, 2 = z)
[in]thetarotation angle in radians
Returns
array of vertices rotated by theta about the axis
Note
to rotate about a different vector (other that x, y, z axes), create a transformation matrix and use the affine function