Change Position of Light

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
MikeD
Posts: 16
Joined: 27 Jan 2015, 17:45

Change Position of Light

Post by MikeD » 09 Feb 2015, 16:56

Hi,

what is like the best way to change the position of the light source(s)?

I'm using either

Code: Select all

F3DN.Navigator3D.Lights[0].Position.Translate(vec4f);
or

Code: Select all

F3DN.Navigator3D.Lights[0].Translate(80, 80, 80);
but nothing seems to happen. Not even when I change those values for all light sources.
Whereas changing the color of the light works perferctly fine with the following line

Code: Select all

diffColor.SetColor(0, 0, 120);
F3DN.Navigator3D.Light[0].Diffuse := diffcolor
Any ideas why?

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Change Position of Light

Post by support » 10 Feb 2015, 19:27

Hello Mike,

The position of the light source(s) isn't changed because it is set each time when the F3DN.Navigator3D.GLDCScene.Position.OnNotifyChange event fires. You may try to suppress this behaviour by using some custom OnNotifyChange event handler.


Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply