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

Function PointCone

Rendering/Core/Testing/Python/SurfacePickerWithTexture.py:102–107  ·  view source on GitHub ↗
(actor, n)

Source from the content-addressed store, hash-verified

100
101# A function to point an actor along a vector n = (nx,ny.nz)
102def PointCone(actor, n):
103 if n[0] < 0.0:
104 actor.RotateWXYZ(180, 0, 1, 0)
105 actor.RotateWXYZ(180, (n[0] - 1.0) * 0.5, n[1] * 0.5, n[2] * 0.5)
106 else:
107 actor.RotateWXYZ(180, (n[0] + 1.0) * 0.5, n[1] * 0.5, n[2] * 0.5)
108
109# Pick the actor
110picker.Pick(104, 154, 0, ren)

Callers 1

Calls 1

RotateWXYZMethod · 0.80

Tested by

no test coverage detected