setRotation: Rotate View

View source: R/NGLVieweR.R

setRotationR Documentation

Rotate View

Description

Set rotation for the representation

Usage

setRotation(NGLVieweR, x = 0, y = 0, z = 0, degrees = TRUE)

Arguments

NGLVieweR

A NGLVieweR object.

x

Rotation angle around the x-axis. Default is 0.

y

Rotation angle around the y-axis. Default is 0.

z

Rotation angle around the z-axis. Default is 0.

degrees

A logical value. If TRUE (default), the input angles are assumed to be in degrees and will be converted to radians. If FALSE, the angles are assumed to be in radians.

Value

NGLVieweR object with updated rotateView parameters.

See Also

  • setScale()

  • zoomMove()

  • setPosition()

Other transformations: setPosition(), setScale(), zoomMove()

Examples

NGLVieweR("7CID") %>%
stageParameters(backgroundColor = "white") %>%
addRepresentation("cartoon", param=list(name="cartoon", colorValue="red")) %>%
addRepresentation("ball+stick", param=list(name="ball+stick",
colorValue="yellow",
colorScheme="element",
sele="200")) %>%
setRotation(30, 45, 60, degrees = TRUE)

NGLVieweR documentation built on April 4, 2025, 4:33 a.m.