Daylight v4.9
Release Date: 1 February 2008


dt_rotate - rotate the coordinates of an object

Generic Prototype

dt_rotate(dt_Handle, dt_Real, dt_Real, dt_Real, dt_Real) => dt_Boolean

C Prototype

#include "dt_depict.h"

dt_Boolean dt_rotate(dt_Handle object, dt_Real dx, dt_Real dy, dt_Real dz, dt_Real rot_angle)

FORTRAN Prototype

include ''

logical dt_f_rotate(object, dx, dy, dz, rot_angle)

integer*4 object
real*4 dx
real*4 dy
real*4 dz
real*4 rot_angle


Modifies the (x,y) or (x,y,z) coordinates of a depiction or conformation 'object' by rotating the x, y, and z coordinates of each atom by the angle 'rot_angle' around the vector (dx, dy, dz). The angle of rotation 'rot_angle' is expressed in radians. The direction of the angle is given by the right-hand rule: if you curl your fingers around the vector with your thumb pointing in the direction of the vector, your fingers curl around in the direction of positive 'rot_angle'.

If 'object' is a depiction, dx, dy, and dz are ignored. Rotation occurs around the origin, with positive 'rot_angle' corresponding to counterclockwise rotation.

Return Value

Returns the success (TRUE) or failure (FALSE) of the operation.

Related Topics

dt_alloc_conformation(3) dt_alloc_depiction(3) dt_calcxy(3) dt_depict(3) dt_getcoord(3) dt_project(3) dt_scale(3) dt_setcoord(3) dt_translate(3) dt_zerocoord(3)