Problem 2460 - /vis/viewer/set/lightsMove cam doesn't work right
Summary: /vis/viewer/set/lightsMove cam doesn't work right
Status: ASSIGNED
Alias: None
Product: Geant4
Classification: Unclassified
Component: visualization (show other problems)
Version: 10.7
Hardware: All All
: P4 minor
Assignee: Laurent Garnier
URL:
Depends on:
Blocks:
 
Reported: 2022-01-04 00:12 CET by Ben Loer
Modified: 2022-01-10 12:05 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ben Loer 2022-01-04 00:12:02 CET
The command "/vis/viewer/set/lightsMove cam" is supposed to cause the light source to move with the camera. Looking at the function that handles this command G4ViewParameters::SetViewAndLights, one should be able to set "/vis/viewer/set/lightsVector 0 0 1" to have lights always pointing at the target from the camera's location.  

It doesn't work because there is a typo at L. 268 in version 10.7 https://geant4.kek.jp/lxr/source/visualization/management/src/G4ViewParameters.cc?v=10.7.p3#L269 

269       fRelativeLightpointDirection.x () * zprime;     

which should be

269       fRelativeLightpointDirection.z () * zprime;
Comment 1 garnier 2022-01-10 12:05:51 CET
Hi, 

Good catch, I'll fix it and it will be available in next patch release.
Thanks, 

Laurent