MCPcopy Create free account
hub / github.com/Kitware/VTK / rotate

Function rotate

Web/Python/vtkmodules/web/camera.py:59–65  ·  view source on GitHub ↗
(axis, angle, center, point)

Source from the content-addressed store, hash-verified

57
58
59def rotate(axis, angle, center, point):
60 angleInRad = 3.141592654 * angle / 180.0
61 rotation = axisangle_to_q(axis, angleInRad)
62 tPoint = tuple((point[i] - center[i]) for i in range(3))
63 rtPoint = qv_mult(rotation, tPoint)
64 rPoint = tuple((rtPoint[i] + center[i]) for i in range(3))
65 return rPoint
66
67
68# -----------------------------------------------------------------------------

Callers 7

__init__Method · 0.70
__init__Method · 0.70
UpdateTransformMethod · 0.50
GetInterpolatedDataMethod · 0.50
StackAboveMethod · 0.50
RequestDataMethod · 0.50

Calls 3

axisangle_to_qFunction · 0.85
qv_multFunction · 0.85
rangeClass · 0.50

Tested by

no test coverage detected